SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Tendances (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
 

Similaire à Resthub

Dh2 Apps Training Part2
Dh2   Apps Training Part2Dh2   Apps Training Part2
Dh2 Apps Training Part2
jamram82
 

Similaire à 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
 

Plus 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
 

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

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