SlideShare a Scribd company logo
RESThubWhat is RESThub ?Three independant layersSecurityHostingDemos
What is RESThub ?http://resthub.org
What is RESThub ?Javascript StackJava WebserviceStackSecurity & Identity Generic TestsDocumentationJava Middle Stack
Keywords behind RESThub
Generic DAO & Business ServicesHadesDaoTESTEDGenericTestedExtendable« extends »GenericDaoGenericServiceSpecificTestableCustomized« extends »« extends »myDaomyService
Generic DAO & Business ServicesProvides…CRUD methods (Create, Retrieve, Update, Delete)Allows…Save time (↘ copy-paste-adjust) on technical layersImprove efficiency on the development of business layers
Basic ExampleHow to… obtain a complete DAO layer for my POJO?@Named("plopDao")publicclass PlopJpaDao extends GenericJpaDao<Plop> implements PlopDao {// Nothing}What else ?
DAO & Business Services stackOut of the box configurationIdentity managerMulti-modules JPA entities scanningGeneric DAO & ServicesGeneric testsEmbeded databaseJSR 303 Bean validationValidator1.2Dependency injectionGeneric DAOHades 233.5Build system3JPA2 Persistenceengine
Generic REST Web ServicesProvides…Generic methods to access business servicesXML and JSON objects serializationAllows…Easily build applications REST-based architectureGenericController« extends »myController
Basic ExampleHow 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 stackJSON SerializationOAuth2 based securityJackson 1.57.1Run/Debug/Tests web applicationGeneric webservices Generic testsJAX-RS REST WebservicesProject templates (archetypes)Jersey 1.2
Generic TestsProvidesGeneric methods to test your DAO, Business services and WebservicesBetter protection against side effects caused by code changesAllowsFocus on testing your project functionnalities
Basic ExampleHow 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    websiteWebservicesServer sideDAO and Services
Use case 2 : RESThub full stackJavaScript stackbasedWebsiteClient sideWebservicesServer sideDAOandServices
Javascript Stack for RIA WebAppsProvides…Script loaderRoute managerTemplating languageAllows…Use the latest web technologies consistentlyCreate lightweight RIA WebApps based on jQueryReduce traffic and server load
Wellknownwebapp software designWeb browserReloading page for each actionDynamic pagesApplication serverSOAP proxytoJSONHTTP serverImagesSOAPWeb ServicesMVC frameworkbased Web GUIsessionCSSBusiness ServicesWebservice SOAPJavascriptDAO
RESThub based webapp software designWeb browserChanging the state of one widget on each actionScript loaderHTML 5 based sessionMVC Framework HTTP credentialsJSON/XML DataStatic pagesApplication serverHTTP serverOtherRESTWebservicesImagesREST Web ServicesCSSBusiness ServicesJavascriptDAOHTML
JavaScript stackJavaScript library1.4Client side templatingJavaScript stack coreRESThub controllerJavaScript loading on route eventRoute & session managerSammyWADL explorer jQuery pluginScript loaderJavaScript compressor
Consequences on the architectureServer is statelessCan change just a small part of the pageEach part is independent (jQuery widget)URL are semantic (example.com/product/list)Client is statefullRecent browser provides « session storage »Each widget should knows his statusManage the reloading of the page (F5)
RESThub on hostingsideClear separation between static and dynamicStatic: interface HTML5, JS, CSSDynamic: stateless secure webservicesOut of the box caching compliancyEven when pages are user-customizedMore operations are computed on client sideBetter scalability thanks to stateless servers
Security based on OAuth2OAuth 2.0 basedauthenticationWork in progress IETF standardTokenbasedUsed on Facebook and TwitterMaybenext version of OpenIDwill use ittooDifferent profilesUser Agent profileWebserver profileSingle Sign On
OAuth2 use case
Current flow
DemosBookingdemoHotelbooking Web applicationHotelsearchengineConsult & cancel bookingsRoundtabledemoDoodlelikePollsearchengineDev console
RESThub sample : Roundtable
RESThub sample : Booking
JavaScriptHTMLRoute 1Controller AView ARoute 2Controller BView BRoute 3Controller CView CURLSammyClient sideRoute 4Controller DView DController EView ERoute 5Resthub controllerEventsWeb servicesBusiness servicesServer sideDAODB
Booking example (2)booking/book.jsmode=edithotel/view.jsclick(proceed)booking/edit.jsbooking/book.jsbooking/book.jsmode=viewmode=edithotel/view.jsclick(revise)booking/view.jsclick(confirm)resthub.controller.jsAjax requesthome.js

More Related Content

PDF
JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...
PPTX
Session 32 - Session Management using Cookies
PPT
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
PPT
Silverlight 2
PPTX
ATG Architecture
PPTX
Session 36 - JSP - Part 1
PPTX
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
PPTX
Session 25 - Introduction to JEE, Servlets
JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...
Session 32 - Session Management using Cookies
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
Silverlight 2
ATG Architecture
Session 36 - JSP - Part 1
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Session 25 - Introduction to JEE, Servlets

What's hot (20)

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

Similar to Resthub (20)

PPTX
Resthub framework presentation
PPTX
Restful webservice
PPTX
Resthub lyonjug
PPT
APITalkMeetupSharable
PPT
RESTFul Web Services - Intro
PPTX
JAX-RS. Developing RESTful APIs with Java
PPTX
Building Software Backend (Web API)
PDF
Introduction to REST and Jersey
PDF
IRJET- Rest API for E-Commerce Site
PPTX
Digging deeper into service stack
PDF
Modern Architectures with Spring and JavaScript
ODP
RESTful Web Services with JAX-RS
PDF
From Open Source to Open API with Restlet
PPTX
RESTful Web Services
PDF
Rest web services
PDF
Restful Services
PPTX
REST Presentation
PDF
Applications of the REST Principle
PDF
Past, Present and Future of APIs of Mobile and Web Apps
Resthub framework presentation
Restful webservice
Resthub lyonjug
APITalkMeetupSharable
RESTFul Web Services - Intro
JAX-RS. Developing RESTful APIs with Java
Building Software Backend (Web API)
Introduction to REST and Jersey
IRJET- Rest API for E-Commerce Site
Digging deeper into service stack
Modern Architectures with Spring and JavaScript
RESTful Web Services with JAX-RS
From Open Source to Open API with Restlet
RESTful Web Services
Rest web services
Restful Services
REST Presentation
Applications of the REST Principle
Past, Present and Future of APIs of Mobile and Web Apps
Ad

More from Sébastien Deleuze (7)

PDF
Dart JUG 2013
PPTX
Dart : one language to rule them all - MixIT 2013
PDF
Presentation DVCS - Git - Mercurial au LyonJug
PPTX
Openscales Foss4g 2010 presentation
PPTX
02 create first-map
PPTX
01 configure your-project
PPTX
03 add markers
Dart JUG 2013
Dart : one language to rule them all - MixIT 2013
Presentation DVCS - Git - Mercurial au LyonJug
Openscales Foss4g 2010 presentation
02 create first-map
01 configure your-project
03 add markers

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PPTX
A Presentation on Artificial Intelligence
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
cuic standard and advanced reporting.pdf
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation theory and applications.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Cloud computing and distributed systems.
PDF
Encapsulation_ Review paper, used for researhc scholars
Modernizing your data center with Dell and AMD
A Presentation on Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
Encapsulation theory and applications.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Advanced methodologies resolving dimensionality complications for autism neur...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
Spectral efficient network and resource selection model in 5G networks
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
NewMind AI Monthly Chronicles - July 2025
Per capita expenditure prediction using model stacking based on satellite ima...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Cloud computing and distributed systems.
Encapsulation_ Review paper, used for researhc scholars

Resthub

  • 1. RESThubWhat is RESThub ?Three independant layersSecurityHostingDemos
  • 2. What is RESThub ?http://resthub.org
  • 3. What is RESThub ?Javascript StackJava WebserviceStackSecurity & Identity Generic TestsDocumentationJava Middle Stack
  • 5. Generic DAO & Business ServicesHadesDaoTESTEDGenericTestedExtendable« extends »GenericDaoGenericServiceSpecificTestableCustomized« extends »« extends »myDaomyService
  • 6. Generic DAO & Business ServicesProvides…CRUD methods (Create, Retrieve, Update, Delete)Allows…Save time (↘ copy-paste-adjust) on technical layersImprove efficiency on the development of business layers
  • 7. Basic ExampleHow 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 stackOut of the box configurationIdentity managerMulti-modules JPA entities scanningGeneric DAO & ServicesGeneric testsEmbeded databaseJSR 303 Bean validationValidator1.2Dependency injectionGeneric DAOHades 233.5Build system3JPA2 Persistenceengine
  • 9. Generic REST Web ServicesProvides…Generic methods to access business servicesXML and JSON objects serializationAllows…Easily build applications REST-based architectureGenericController« extends »myController
  • 10. Basic ExampleHow 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 stackJSON SerializationOAuth2 based securityJackson 1.57.1Run/Debug/Tests web applicationGeneric webservices Generic testsJAX-RS REST WebservicesProject templates (archetypes)Jersey 1.2
  • 12. Generic TestsProvidesGeneric methods to test your DAO, Business services and WebservicesBetter protection against side effects caused by code changesAllowsFocus on testing your project functionnalities
  • 13. Basic ExampleHow 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 websiteWebservicesServer sideDAO and Services
  • 15. Use case 2 : RESThub full stackJavaScript stackbasedWebsiteClient sideWebservicesServer sideDAOandServices
  • 16. Javascript Stack for RIA WebAppsProvides…Script loaderRoute managerTemplating languageAllows…Use the latest web technologies consistentlyCreate lightweight RIA WebApps based on jQueryReduce traffic and server load
  • 17. Wellknownwebapp software designWeb browserReloading page for each actionDynamic pagesApplication serverSOAP proxytoJSONHTTP serverImagesSOAPWeb ServicesMVC frameworkbased Web GUIsessionCSSBusiness ServicesWebservice SOAPJavascriptDAO
  • 18. RESThub based webapp software designWeb browserChanging the state of one widget on each actionScript loaderHTML 5 based sessionMVC Framework HTTP credentialsJSON/XML DataStatic pagesApplication serverHTTP serverOtherRESTWebservicesImagesREST Web ServicesCSSBusiness ServicesJavascriptDAOHTML
  • 19. JavaScript stackJavaScript library1.4Client side templatingJavaScript stack coreRESThub controllerJavaScript loading on route eventRoute & session managerSammyWADL explorer jQuery pluginScript loaderJavaScript compressor
  • 20. Consequences on the architectureServer is statelessCan change just a small part of the pageEach part is independent (jQuery widget)URL are semantic (example.com/product/list)Client is statefullRecent browser provides « session storage »Each widget should knows his statusManage the reloading of the page (F5)
  • 21. RESThub on hostingsideClear separation between static and dynamicStatic: interface HTML5, JS, CSSDynamic: stateless secure webservicesOut of the box caching compliancyEven when pages are user-customizedMore operations are computed on client sideBetter scalability thanks to stateless servers
  • 22. Security based on OAuth2OAuth 2.0 basedauthenticationWork in progress IETF standardTokenbasedUsed on Facebook and TwitterMaybenext version of OpenIDwill use ittooDifferent profilesUser Agent profileWebserver profileSingle Sign On
  • 25. DemosBookingdemoHotelbooking Web applicationHotelsearchengineConsult & cancel bookingsRoundtabledemoDoodlelikePollsearchengineDev console
  • 26. RESThub sample : Roundtable
  • 28. JavaScriptHTMLRoute 1Controller AView ARoute 2Controller BView BRoute 3Controller CView CURLSammyClient sideRoute 4Controller DView DController EView ERoute 5Resthub controllerEventsWeb servicesBusiness servicesServer sideDAODB