SlideShare uma empresa Scribd logo
1 de 29
RESThub What is RESThub ? Three independant layers Security Hosting Demos
What is RESThub ? http://resthub.org
What is RESThub ? Javascript Stack Java WebserviceStack Security & Identity  Generic Tests Documentation Java Middle Stack
Keywords behind RESThub
Generic DAO & Business Services HadesDao TESTED Generic Tested Extendable « extends » GenericDao GenericService Specific Testable Customized « extends » « extends » myDao myService
Generic DAO & Business Services Provides… CRUD methods (Create, Retrieve, Update, Delete) Allows… Save time (↘ copy-paste-adjust) on technical layers Improve efficiency on the development of business layers
Basic Example How to… obtain a complete DAO layer for my POJO? @Named("plopDao") publicclass PlopJpaDao extends GenericJpaDao<Plop> implements PlopDao { // Nothing } What else ?
DAO & Business Services stack Out of the box configuration Identity manager Multi-modules JPA entities scanning Generic DAO & ServicesGeneric tests Embeded database JSR 303 Bean validation Validator 1.2 Dependency injection Generic DAO Hades 2 3 3.5 Build system 3 JPA2 Persistenceengine
Generic REST Web Services Provides… Generic methods to access business services XML and JSON objects serialization Allows… Easily build applications REST-based architecture GenericController « extends » myController
Basic Example How to… retrieve a persisted object in database ? @GET @Path("/{id}") @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response getResource(@PathParam("id") ID id) { 	T entity = this.service.findById(id); if(entity == null) { return Response.status(Status.NOT_FOUND).build(); 	} return Response.ok(entity).build(); }
Webservices stack JSON Serialization OAuth2 based security Jackson 1.5 7.1 Run/Debug/Tests web application Generic webservices Generic tests JAX-RS REST Webservices Project templates (archetypes) Jersey 1.2
Generic Tests Provides Generic methods to test your DAO, Business services and Webservices Better protection against side effects caused by code changes Allows Focus on testing your project functionnalities
Basic Example How to… entirely test my DAO layer ? publicclass PlopDaoTest extends AbstractDaoTest<Plop, PlopDao> { 	@Inject 	@Named("plopDao") publicvoid setResourceDao(PlopDao resourceDao) { 		super.setResourceDao(resourceDao); 	} }
Use case 1 : RESThub + MVC Framework         Tapestry5    website Webservices Server side DAO and Services
Use case 2 : RESThub full stack JavaScript stackbasedWebsite Client side Webservices Server side DAOandServices
Javascript Stack for RIA WebApps Provides… Script loader Route manager Templating language Allows… Use the latest web technologies consistently Create lightweight RIA WebApps based on jQuery Reduce traffic and server load
Wellknownwebapp software design Web browser Reloading page for each action Dynamic pages Application server SOAP proxytoJSON HTTP server Images SOAPWeb Services MVC framework based Web GUI session CSS Business Services Webservice  SOAP Javascript DAO
RESThub based webapp software design Web browser Changing the state of one widget on each action Script loader HTML 5 based session MVC Framework  HTTP credentials JSON/XML Data Static pages Application server HTTP server OtherRESTWebservices Images REST Web Services CSS Business Services Javascript DAO HTML
JavaScript stack JavaScript library 1.4 Client side templating JavaScript stack core RESThub controller JavaScript loading on route event Route & session manager Sammy WADL explorer jQuery plugin Script loader JavaScript compressor
Consequences on the architecture Server is stateless Can change just a small part of the page Each part is independent (jQuery widget) URL are semantic (example.com/product/list) Client is statefull Recent browser provides « session storage » Each widget should knows his status Manage the reloading of the page (F5)
RESThub on hostingside Clear separation between static and dynamic Static: interface HTML5, JS, CSS Dynamic: stateless secure webservices Out of the box caching compliancy Even when pages are user-customized More operations are computed on client side Better scalability thanks to stateless servers
Security based on OAuth2 OAuth 2.0 basedauthentication Work in progress IETF standard Tokenbased Used on Facebook and Twitter Maybenext version of OpenIDwill use ittoo Different profiles User Agent profile Webserver profile Single Sign On
OAuth2 use case
Current flow
Demos Bookingdemo Hotelbooking Web application Hotelsearchengine Consult & cancel bookings Roundtabledemo Doodlelike Pollsearchengine Dev console
RESThub sample : Roundtable
RESThub sample : Booking
JavaScript HTML Route 1 Controller A View A Route 2 Controller B View B Route 3 Controller C View C URL Sammy Client side Route 4 Controller D View D Controller E View E Route 5 Resthub controller Events Web services Business services Server side DAO DB
Booking example (2) booking/book.js mode=edit hotel/view.js click(proceed) booking/edit.js booking/book.js booking/book.js mode=view mode=edit hotel/view.js click(revise) booking/view.js click(confirm) resthub.controller.js Ajax request home.js

Mais conteúdo relacionado

Mais procurados

Berlin.JAR: Web future without web frameworks
Berlin.JAR: Web future without web frameworksBerlin.JAR: Web future without web frameworks
Berlin.JAR: Web future without web frameworksStephan Schmidt
 
Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1PawanMM
 
Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6PawanMM
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesPawanMM
 
Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5PawanMM
 
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsSession 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsPawanMM
 
Session 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsSession 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsPawanMM
 
Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4PawanMM
 
Overview of atg framework
Overview of atg frameworkOverview of atg framework
Overview of atg frameworkYousuf Roushan
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...Uniface
 
Session 26 - Servlets Part 2
Session 26 - Servlets Part 2Session 26 - Servlets Part 2
Session 26 - Servlets Part 2PawanMM
 
ATG Framework,Formhandlers,Pricing
ATG Framework,Formhandlers,PricingATG Framework,Formhandlers,Pricing
ATG Framework,Formhandlers,Pricingpraveen chinnam
 
Oracle JET CRUD and ADF BC REST
Oracle JET CRUD and ADF BC RESTOracle JET CRUD and ADF BC REST
Oracle JET CRUD and ADF BC RESTandrejusb
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design PatternsPawanMM
 
Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)PawanMM
 
Java Microservices with DropWizard
Java Microservices with DropWizardJava Microservices with DropWizard
Java Microservices with DropWizardBruno Buger
 
Introduction to asp .net
Introduction to asp .netIntroduction to asp .net
Introduction to asp .netumesh patil
 

Mais procurados (20)

Berlin.JAR: Web future without web frameworks
Berlin.JAR: Web future without web frameworksBerlin.JAR: Web future without web frameworks
Berlin.JAR: Web future without web frameworks
 
Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1
 
Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other Techniques
 
Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5
 
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsSession 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
 
Session 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsSession 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design Patterns
 
Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4
 
Overview of atg framework
Overview of atg frameworkOverview of atg framework
Overview of atg framework
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...
 
Spring and DWR
Spring and DWRSpring and DWR
Spring and DWR
 
Session 26 - Servlets Part 2
Session 26 - Servlets Part 2Session 26 - Servlets Part 2
Session 26 - Servlets Part 2
 
ATG Framework,Formhandlers,Pricing
ATG Framework,Formhandlers,PricingATG Framework,Formhandlers,Pricing
ATG Framework,Formhandlers,Pricing
 
Oracle JET CRUD and ADF BC REST
Oracle JET CRUD and ADF BC RESTOracle JET CRUD and ADF BC REST
Oracle JET CRUD and ADF BC REST
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design Patterns
 
Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)
 
JavaEE6 my way
JavaEE6 my wayJavaEE6 my way
JavaEE6 my way
 
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
 
Java Microservices with DropWizard
Java Microservices with DropWizardJava Microservices with DropWizard
Java Microservices with DropWizard
 
Introduction to asp .net
Introduction to asp .netIntroduction to asp .net
Introduction to asp .net
 

Semelhante a Resthub

Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformAlfresco Software
 
ASPNET Roadmap
ASPNET RoadmapASPNET Roadmap
ASPNET Roadmapukdpe
 
Cloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersCloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersBurr Sutter
 
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows AzureCloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows AzureDavid Chou
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETPeter Gfader
 
Dh2 Apps Training Part2
Dh2   Apps Training Part2Dh2   Apps Training Part2
Dh2 Apps Training Part2jamram82
 
An Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP ProgrammersAn Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP Programmersjphl
 
Java one 2010
Java one 2010Java one 2010
Java one 2010scdn
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web DevelopmentHong Jiang
 
Widget Platform
Widget PlatformWidget Platform
Widget Platformjosemataf
 
JavaScript on the server - Node.js
JavaScript on the server - Node.jsJavaScript on the server - Node.js
JavaScript on the server - Node.jsRody Middelkoop
 

Semelhante a Resthub (20)

Resthub lyonjug
Resthub lyonjugResthub lyonjug
Resthub lyonjug
 
Jsp Comparison
 Jsp Comparison Jsp Comparison
Jsp Comparison
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf Platform
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
ASPNET Roadmap
ASPNET RoadmapASPNET Roadmap
ASPNET Roadmap
 
JSF 2.0 Preview
JSF 2.0 PreviewJSF 2.0 Preview
JSF 2.0 Preview
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
Mashups
MashupsMashups
Mashups
 
Cloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersCloud State of the Union for Java Developers
Cloud State of the Union for Java Developers
 
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows AzureCloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Dh2 Apps Training Part2
Dh2   Apps Training Part2Dh2   Apps Training Part2
Dh2 Apps Training Part2
 
Customizing Oracle EBS OA Framework
Customizing Oracle EBS OA FrameworkCustomizing Oracle EBS OA Framework
Customizing Oracle EBS OA Framework
 
An Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP ProgrammersAn Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP Programmers
 
Java one 2010
Java one 2010Java one 2010
Java one 2010
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web Development
 
Widget Platform
Widget PlatformWidget Platform
Widget Platform
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
JavaScript on the server - Node.js
JavaScript on the server - Node.jsJavaScript on the server - Node.js
JavaScript on the server - Node.js
 

Mais de Sébastien Deleuze

Mais de Sébastien Deleuze (8)

Dart JUG 2013
Dart JUG 2013Dart JUG 2013
Dart JUG 2013
 
Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013
 
Resthub framework presentation
Resthub framework presentationResthub framework presentation
Resthub framework presentation
 
Presentation DVCS - Git - Mercurial au LyonJug
Presentation DVCS - Git - Mercurial au LyonJugPresentation DVCS - Git - Mercurial au LyonJug
Presentation DVCS - Git - Mercurial au LyonJug
 
Openscales Foss4g 2010 presentation
Openscales Foss4g 2010 presentationOpenscales Foss4g 2010 presentation
Openscales Foss4g 2010 presentation
 
02 create first-map
02 create first-map02 create first-map
02 create first-map
 
01 configure your-project
01 configure your-project01 configure your-project
01 configure your-project
 
03 add markers
03 add markers03 add markers
03 add markers
 

Último

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Resthub

  • 1. RESThub What is RESThub ? Three independant layers Security Hosting Demos
  • 2. What is RESThub ? http://resthub.org
  • 3. What is RESThub ? Javascript Stack Java WebserviceStack Security & Identity Generic Tests Documentation Java Middle Stack
  • 5. Generic DAO & Business Services HadesDao TESTED Generic Tested Extendable « extends » GenericDao GenericService Specific Testable Customized « extends » « extends » myDao myService
  • 6. Generic DAO & Business Services Provides… CRUD methods (Create, Retrieve, Update, Delete) Allows… Save time (↘ copy-paste-adjust) on technical layers Improve efficiency on the development of business layers
  • 7. Basic Example How to… obtain a complete DAO layer for my POJO? @Named("plopDao") publicclass PlopJpaDao extends GenericJpaDao<Plop> implements PlopDao { // Nothing } What else ?
  • 8. DAO & Business Services stack Out of the box configuration Identity manager Multi-modules JPA entities scanning Generic DAO & ServicesGeneric tests Embeded database JSR 303 Bean validation Validator 1.2 Dependency injection Generic DAO Hades 2 3 3.5 Build system 3 JPA2 Persistenceengine
  • 9. Generic REST Web Services Provides… Generic methods to access business services XML and JSON objects serialization Allows… Easily build applications REST-based architecture GenericController « extends » myController
  • 10. Basic Example How to… retrieve a persisted object in database ? @GET @Path("/{id}") @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response getResource(@PathParam("id") ID id) { T entity = this.service.findById(id); if(entity == null) { return Response.status(Status.NOT_FOUND).build(); } return Response.ok(entity).build(); }
  • 11. Webservices stack JSON Serialization OAuth2 based security Jackson 1.5 7.1 Run/Debug/Tests web application Generic webservices Generic tests JAX-RS REST Webservices Project templates (archetypes) Jersey 1.2
  • 12. Generic Tests Provides Generic methods to test your DAO, Business services and Webservices Better protection against side effects caused by code changes Allows Focus on testing your project functionnalities
  • 13. Basic Example How to… entirely test my DAO layer ? publicclass PlopDaoTest extends AbstractDaoTest<Plop, PlopDao> { @Inject @Named("plopDao") publicvoid setResourceDao(PlopDao resourceDao) { super.setResourceDao(resourceDao); } }
  • 14. Use case 1 : RESThub + MVC Framework Tapestry5 website Webservices Server side DAO and Services
  • 15. Use case 2 : RESThub full stack JavaScript stackbasedWebsite Client side Webservices Server side DAOandServices
  • 16. Javascript Stack for RIA WebApps Provides… Script loader Route manager Templating language Allows… Use the latest web technologies consistently Create lightweight RIA WebApps based on jQuery Reduce traffic and server load
  • 17. Wellknownwebapp software design Web browser Reloading page for each action Dynamic pages Application server SOAP proxytoJSON HTTP server Images SOAPWeb Services MVC framework based Web GUI session CSS Business Services Webservice SOAP Javascript DAO
  • 18. RESThub based webapp software design Web browser Changing the state of one widget on each action Script loader HTML 5 based session MVC Framework HTTP credentials JSON/XML Data Static pages Application server HTTP server OtherRESTWebservices Images REST Web Services CSS Business Services Javascript DAO HTML
  • 19. JavaScript stack JavaScript library 1.4 Client side templating JavaScript stack core RESThub controller JavaScript loading on route event Route & session manager Sammy WADL explorer jQuery plugin Script loader JavaScript compressor
  • 20. Consequences on the architecture Server is stateless Can change just a small part of the page Each part is independent (jQuery widget) URL are semantic (example.com/product/list) Client is statefull Recent browser provides « session storage » Each widget should knows his status Manage the reloading of the page (F5)
  • 21. RESThub on hostingside Clear separation between static and dynamic Static: interface HTML5, JS, CSS Dynamic: stateless secure webservices Out of the box caching compliancy Even when pages are user-customized More operations are computed on client side Better scalability thanks to stateless servers
  • 22. Security based on OAuth2 OAuth 2.0 basedauthentication Work in progress IETF standard Tokenbased Used on Facebook and Twitter Maybenext version of OpenIDwill use ittoo Different profiles User Agent profile Webserver profile Single Sign On
  • 25. Demos Bookingdemo Hotelbooking Web application Hotelsearchengine Consult & cancel bookings Roundtabledemo Doodlelike Pollsearchengine Dev console
  • 26. RESThub sample : Roundtable
  • 27. RESThub sample : Booking
  • 28. JavaScript HTML Route 1 Controller A View A Route 2 Controller B View B Route 3 Controller C View C URL Sammy Client side Route 4 Controller D View D Controller E View E Route 5 Resthub controller Events Web services Business services Server side DAO DB
  • 29. Booking example (2) booking/book.js mode=edit hotel/view.js click(proceed) booking/edit.js booking/book.js booking/book.js mode=view mode=edit hotel/view.js click(revise) booking/view.js click(confirm) resthub.controller.js Ajax request home.js