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

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
 

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

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
 

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

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

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Dernier (20)

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

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