SlideShare a Scribd company logo
1 of 65
RESThub framework
Sébastien Deleuze
Baptiste Meurant
@sdeleuze
@bmeurant
Context Analysis
Before : alone and hand made
(image)
Some rights reserved by oaspetele_de_piatra
Step1:
Not invented here syndroma
Hand Made
Step 2:
Some rights reserved by Eric Hoffmann
The age of "In house" frameworks
Build Tools
Now : communities an reuse
(image)
Reuse
Standard tools
Some rights reserved by Johan Rd
Step 3:
Paradoxal situation
Specialization
Complementarity
Some rights reserved by centralasian
Image for business focus and
separation of concerns
Focus on businessImage: jscreationzs / FreeDigitalPhotos.net
Complexity is constantly growing
Image: jscreationzs / FreeDigitalPhotos.net
Some rights reserved by Rennett Stowe
Starting is difficult
Non productive situation
Some rights reserved by jpverkamp
Visibility reduced
Image by John Chroston
Things could fail
Toolkit needed
Some rights reserved by brian.ch
Extensibility
Plugability
Reusability
Capitalization
Context
Independance
Simplicity
Pragmatism
Allow
Progressive Complexity
Some rights reserved by vrogy
Do not reinvent the wheel
Reuse !
Standards
One framework to bring them all
One framework to bring them all
What is RESThub ?
http://resthub.org
Open Source
Framework
Hosted on
For building
Java apps
Principles
Java Middle Stack
Java Webservice Stack
Javascript StackTooling
GenericTests
Extendable
Architecture What is RESThub ?
Documentation
Extendable plugin-based architecture
Plugin-based Architecture
Build system
3
JEE6 Dependency injection
3
Multi-modules JPA entities scanning
• Layers based architecture
• Complementary stacks
• Modularity by Maven
• Plugability by Spring
• Autodiscovery
– Modules
– Entities
– Beans
Java Webservice StackJavascript Stack Java Middle Stack
Java Middle Stack
GenericDao
myDao
« extends »
HadesDao
« extends »
GenericService
myService
« extends »
Generic
Tested
Extendable
Specific
Testable
Customized
Interfaces
Java Middle Stack
DAO & Business Services
Implementations
GenericJpaDao
myJpaDao
« extends »
HadesJpaDao
« extends »
GenericServiceImpl
myServiceImpl
« extends »
Generic
Tested
Extendable
Specific
Testable
Customized
Java Middle Stack
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
> Focus on business
Java Middle Stack
DAO & Business Services
@Entity
public class StandaloneEntity {
private Long id;
private String name;
// ... getters and setters
}
How to … obtain a complete DAO layer for my POJO?
Java Middle Stack
StandaloneEntity entity = new StandaloneEntity ();
entity.
Example
Serializable
StandaloneEntity
« implements »
public interface StandaloneEntityDao extends GenericDao<StandaloneEntity, Long> {
// ... specific methods addition
List<StandaloneEntity> findByName(String name);
}
How to … obtain a complete DAO layer for my POJO?
Java Middle Stack
@Named("standaloneEntityDao")
public class StandaloneEntityDaoImpl extends GenericJpaDao<StandaloneEntity, Long>
implements StandaloneEntityDao {
// ... specific methods implementations
@SuppressWarnings("unchecked")
public List<StandaloneEntity> findByName(String name) {
String queryString = this.getQueryString("from %s where name = :name",
getDomainClass());
Query query = this.getEntityManager().createQuery(queryString);
query.setParameter("name", name);
return query.getResultList();
}
}
Example
How to … obtain a complete DAO layer for my POJO?
Java Middle Stack
@Inject
@Named("standaloneEntityDao")
StandaloneEntityDao standaloneEntityDao;
standaloneEntityDao.
> Allow Progressive Complexity
Example
Embeded database
Multi-modules JPA entities scanning
JSR 303 Bean validation
Generic DAO & Services
Generic tests
JEE6 Dependency injection
3
Generic DAO
Hades 2
Validator1.2
JPA2 Persistence engine
3.5
Java Middle Stack
DAO & Business Services
Java Webservices Stack
JAX-RS REST Webservices
Generic webservices
Generic tests
Jersey 1.4
JSON Serialization
Jackson 1.5
WADL explorer jQuery plugin
Java Webservice Stack
Webservices stack
XML Serialization
JAXB 2.1
GenericController
myController
« extends »
• Provides…
– Generic methods to access business services
– XML and JSON objects serialization
• Allows…
– Easily build applications REST-based architecture
Java Webservice Stack
Generic REST Services
@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();
}
How to… retrieve a persisted object in database ?
Java Webservice Stack
Generic REST Services
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
Java Middle StackJava Webservice Stack
Generic Tests
How to… entirely test my DAO layer ?
public class SampleResourceDaoTest extends
AbstractResourceDaoTest<SampleResource, SampleResourceDao> {
@Inject
@Named("sampleResourceDao")
@Override
public void setResourceDao(SampleResourceDao resourceDao) {
// Allow to override DI by annotation
super.setResourceDao(resourceDao);
}
// custom tests
}
Java Middle Stack
DAO example
Java Middle StackJava Webservice Stack
Webservice example
public class TestWebSampleResourceController extends
AbstractResourceControllerTest<WebSampleResource,
GenericResourceController<WebSampleResource,
GenericResourceService<WebSampleResource>>> {
@Inject
@Named("webSampleResourceController")
public void setController(GenericResourceController sampleController) {
super.setController(sampleController);
}
// custom tests
}
How to… entirely test my webservice layer ?
1. Done for you
– CRUD are already tested !
– Ready to « plug » your domain
– Technical tooling
2. Extensible
– Abstract classes to plug your own tests
– Extended CRUD & complex business methods
> Simple now, Advanced tomorow
> Focus on business added value
Java Middle StackJava Webservice Stack
Generic Tests
Javascript stack
DAO and Services
Tapestry5
website
Serverside
Webservices
Javascript Stack Java Middle StackJava Webservice Stack
Use case 1 : RESThub + MVC Framework
DAO
and
Services
Webservices
ServersideClientside
JavaScript stack
based Website
Javascript Stack Java Middle StackJava Webservice Stack
Use case 2 : RESThub full stack
Widgets
Route & session manager
Client side templatingScript loader
Sammy
ui 1.8
JavaScript compressor
JavaScript core library
1.4
Javascript stack
Javascript Stack
• 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
Javascript stack for RIA Webapps
Javascript Stack
Application server
SOAP
Web Services
DAO
Business Services
MVC framework
based Web GUI
Web browser
Reloading page for each action
Dynamic pages
SOAP proxy
to JSON
Webservice
SOAP
session
HTTP server
Javascript
CSS
Images
Javascript Stack Java Middle StackJava Webservice Stack
Well known webapp software design
Application server
Web browser
Changing the state of one widget on each action
HTTP credentials
JSON/XML Data
HTTP server
Javascript
CSS
Images
DAO
Business Services
REST Web Services
Other
REST
Webservices
HTML 5 based
session
Script loader
MVC Framework
HTML
Static pages
Javascript Stack Java Middle StackJava Webservice Stack
RESThub fullstack based software design
Route 1
Route 2
Route 3
Route 4
Controller A
Controller B
Controller C
View A
View B
View C
JavaScript HTML
Business services
DB
Web services
DAO
ClientsideServerside
URL Sammy
Controller D View D
Events
Client side routing
Javascript Stack
ViewControler
Client side template rendering
Javascript Stack
Hosting
• Server is stateless
– No session needed for anonymous webservices
– Session or similar mechanism needed for AuthN
– Hability to add/remove servers with no impact
• Client is statefull
– Recent browser provides « session storage »
– Manage the reloading of the page (F5)
Consequences on the architecture
• 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
RESThub on hosting side
Tooling
Build system
3
Run/Debug/Tests web application
7.1
WADL explorer jQuery plugin
Spring console
Default configuration
Project templates (archetypes)
Guidelines & Doc
Java Webservice StackJavascript Stack Java Middle Stack
Buildtime Runtime
Database console
1.2
Tooling
Java Middle Stack
Database console
Java Webservice Stack
WADL explorer
Demo
Bootstrap you project with
RESThub archetypes
RESThub example : Round Table
RESThub example: Booking
Status & Roadmap
RESThub, now !
• Work started about 1 year ago
• We are now close of the 1.0 final release
– Before the end of November, 2010
• Build iteratively on concrete business cases
• Used in multiple projects in production
– Different versions
• Don’t hesitate to join on http://resthub.org
OAuth2 based security
Identity manager
CouchDB persistence
Accessibility
Serverside template rendering
Xlink support
Semantic web
OSGI support
Client side validation based
on JSR 303 annotations
What’s next ?
@sdeleuze
@bmeurant
http://resthub.org
Questions ?

More Related Content

What's hot

#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentationsourabh aggarwal
 
Mule esb
Mule esbMule esb
Mule esbKhan625
 
Building and managing java projects with maven part-III
Building and managing java projects with maven part-IIIBuilding and managing java projects with maven part-III
Building and managing java projects with maven part-IIIprinceirfancivil
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 updateJoshua Long
 
Java Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom TagsJava Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom TagsIMC Institute
 
Java Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet BasicJava Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet BasicIMC Institute
 
Java Servlets
Java ServletsJava Servlets
Java ServletsNitin Pai
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJini Lee
 

What's hot (20)

Java Enterprise Edition
Java Enterprise EditionJava Enterprise Edition
Java Enterprise Edition
 
Data Access with JDBC
Data Access with JDBCData Access with JDBC
Data Access with JDBC
 
Advance Java
Advance JavaAdvance Java
Advance Java
 
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentation
 
Ant
AntAnt
Ant
 
Servlets
ServletsServlets
Servlets
 
JDBC
JDBCJDBC
JDBC
 
JDBC in Servlets
JDBC in ServletsJDBC in Servlets
JDBC in Servlets
 
Mule esb
Mule esbMule esb
Mule esb
 
Building and managing java projects with maven part-III
Building and managing java projects with maven part-IIIBuilding and managing java projects with maven part-III
Building and managing java projects with maven part-III
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 update
 
Java Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom TagsJava Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom Tags
 
Java Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet BasicJava Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet Basic
 
Cis 274 intro
Cis 274   introCis 274   intro
Cis 274 intro
 
J2 Ee Overview
J2 Ee OverviewJ2 Ee Overview
J2 Ee Overview
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Jsp servlets
Jsp servletsJsp servlets
Jsp servlets
 
Jdbc
JdbcJdbc
Jdbc
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparison
 

Similar to Resthub framework presentation

Java Technology
Java TechnologyJava Technology
Java Technologyifnu bima
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Eric Palakovich Carr
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture ComponentsDarshan Parikh
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architectureVitali Pekelis
 
Java Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreJava Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreIMC Institute
 
Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jerseyb_kathir
 
Joomla Day Austin Part 4
Joomla Day Austin Part 4Joomla Day Austin Part 4
Joomla Day Austin Part 4Kyle Ledbetter
 
EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)Montreal JUG
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterpriseDave Artz
 
Native REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11gNative REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11gMarcelo Ochoa
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsJeff Durta
 
Structural pattern 3
Structural pattern 3Structural pattern 3
Structural pattern 3Naga Muruga
 

Similar to Resthub framework presentation (20)

Java Technology
Java TechnologyJava Technology
Java Technology
 
Struts 1
Struts 1Struts 1
Struts 1
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
 
JSF 2.0 Preview
JSF 2.0 PreviewJSF 2.0 Preview
JSF 2.0 Preview
 
Json generation
Json generationJson generation
Json generation
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture Components
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architecture
 
Java Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreJava Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : Datastore
 
Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jersey
 
Life outside WO
Life outside WOLife outside WO
Life outside WO
 
Data access
Data accessData access
Data access
 
Introduction to Datastore
Introduction to DatastoreIntroduction to Datastore
Introduction to Datastore
 
Joomla Day Austin Part 4
Joomla Day Austin Part 4Joomla Day Austin Part 4
Joomla Day Austin Part 4
 
Unit 07: Design Patterns and Frameworks (3/3)
Unit 07: Design Patterns and Frameworks (3/3)Unit 07: Design Patterns and Frameworks (3/3)
Unit 07: Design Patterns and Frameworks (3/3)
 
EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
Native REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11gNative REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11g
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
Structural pattern 3
Structural pattern 3Structural pattern 3
Structural pattern 3
 

More from Sébastien Deleuze

More from 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
 
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
 
Resthub
ResthubResthub
Resthub
 

Recently uploaded

Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 

Recently uploaded (20)

Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 

Resthub framework presentation

  • 1. RESThub framework Sébastien Deleuze Baptiste Meurant @sdeleuze @bmeurant
  • 3. Before : alone and hand made (image) Some rights reserved by oaspetele_de_piatra Step1: Not invented here syndroma Hand Made
  • 4. Step 2: Some rights reserved by Eric Hoffmann The age of "In house" frameworks Build Tools
  • 5. Now : communities an reuse (image) Reuse Standard tools Some rights reserved by Johan Rd Step 3:
  • 8. Image for business focus and separation of concerns Focus on businessImage: jscreationzs / FreeDigitalPhotos.net
  • 9. Complexity is constantly growing Image: jscreationzs / FreeDigitalPhotos.net
  • 10. Some rights reserved by Rennett Stowe Starting is difficult
  • 12. Some rights reserved by jpverkamp Visibility reduced
  • 13. Image by John Chroston Things could fail
  • 14. Toolkit needed Some rights reserved by brian.ch
  • 17. Some rights reserved by vrogy Do not reinvent the wheel Reuse ! Standards
  • 18. One framework to bring them all
  • 19. One framework to bring them all
  • 20. What is RESThub ? http://resthub.org Open Source Framework Hosted on For building Java apps
  • 22. Java Middle Stack Java Webservice Stack Javascript StackTooling GenericTests Extendable Architecture What is RESThub ? Documentation
  • 24. Plugin-based Architecture Build system 3 JEE6 Dependency injection 3 Multi-modules JPA entities scanning • Layers based architecture • Complementary stacks • Modularity by Maven • Plugability by Spring • Autodiscovery – Modules – Entities – Beans Java Webservice StackJavascript Stack Java Middle Stack
  • 26. GenericDao myDao « extends » HadesDao « extends » GenericService myService « extends » Generic Tested Extendable Specific Testable Customized Interfaces Java Middle Stack DAO & Business Services
  • 27. Implementations GenericJpaDao myJpaDao « extends » HadesJpaDao « extends » GenericServiceImpl myServiceImpl « extends » Generic Tested Extendable Specific Testable Customized Java Middle Stack DAO & Business Services
  • 28. • Provides… – CRUD methods (Create, Retrieve, Update, Delete) • Allows… – Save time (↘ copy-paste-adjust) on technical layers – Improve efficiency on the development of business layers > Focus on business Java Middle Stack DAO & Business Services
  • 29. @Entity public class StandaloneEntity { private Long id; private String name; // ... getters and setters } How to … obtain a complete DAO layer for my POJO? Java Middle Stack StandaloneEntity entity = new StandaloneEntity (); entity. Example Serializable StandaloneEntity « implements »
  • 30. public interface StandaloneEntityDao extends GenericDao<StandaloneEntity, Long> { // ... specific methods addition List<StandaloneEntity> findByName(String name); } How to … obtain a complete DAO layer for my POJO? Java Middle Stack @Named("standaloneEntityDao") public class StandaloneEntityDaoImpl extends GenericJpaDao<StandaloneEntity, Long> implements StandaloneEntityDao { // ... specific methods implementations @SuppressWarnings("unchecked") public List<StandaloneEntity> findByName(String name) { String queryString = this.getQueryString("from %s where name = :name", getDomainClass()); Query query = this.getEntityManager().createQuery(queryString); query.setParameter("name", name); return query.getResultList(); } } Example
  • 31. How to … obtain a complete DAO layer for my POJO? Java Middle Stack @Inject @Named("standaloneEntityDao") StandaloneEntityDao standaloneEntityDao; standaloneEntityDao. > Allow Progressive Complexity Example
  • 32. Embeded database Multi-modules JPA entities scanning JSR 303 Bean validation Generic DAO & Services Generic tests JEE6 Dependency injection 3 Generic DAO Hades 2 Validator1.2 JPA2 Persistence engine 3.5 Java Middle Stack DAO & Business Services
  • 34. JAX-RS REST Webservices Generic webservices Generic tests Jersey 1.4 JSON Serialization Jackson 1.5 WADL explorer jQuery plugin Java Webservice Stack Webservices stack XML Serialization JAXB 2.1
  • 35. GenericController myController « extends » • Provides… – Generic methods to access business services – XML and JSON objects serialization • Allows… – Easily build applications REST-based architecture Java Webservice Stack Generic REST Services
  • 36. @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(); } How to… retrieve a persisted object in database ? Java Webservice Stack Generic REST Services
  • 38. • 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 Java Middle StackJava Webservice Stack Generic Tests
  • 39. How to… entirely test my DAO layer ? public class SampleResourceDaoTest extends AbstractResourceDaoTest<SampleResource, SampleResourceDao> { @Inject @Named("sampleResourceDao") @Override public void setResourceDao(SampleResourceDao resourceDao) { // Allow to override DI by annotation super.setResourceDao(resourceDao); } // custom tests } Java Middle Stack DAO example
  • 40. Java Middle StackJava Webservice Stack Webservice example public class TestWebSampleResourceController extends AbstractResourceControllerTest<WebSampleResource, GenericResourceController<WebSampleResource, GenericResourceService<WebSampleResource>>> { @Inject @Named("webSampleResourceController") public void setController(GenericResourceController sampleController) { super.setController(sampleController); } // custom tests } How to… entirely test my webservice layer ?
  • 41. 1. Done for you – CRUD are already tested ! – Ready to « plug » your domain – Technical tooling 2. Extensible – Abstract classes to plug your own tests – Extended CRUD & complex business methods > Simple now, Advanced tomorow > Focus on business added value Java Middle StackJava Webservice Stack Generic Tests
  • 43. DAO and Services Tapestry5 website Serverside Webservices Javascript Stack Java Middle StackJava Webservice Stack Use case 1 : RESThub + MVC Framework
  • 44. DAO and Services Webservices ServersideClientside JavaScript stack based Website Javascript Stack Java Middle StackJava Webservice Stack Use case 2 : RESThub full stack
  • 45. Widgets Route & session manager Client side templatingScript loader Sammy ui 1.8 JavaScript compressor JavaScript core library 1.4 Javascript stack Javascript Stack
  • 46. • 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 Javascript stack for RIA Webapps Javascript Stack
  • 47. Application server SOAP Web Services DAO Business Services MVC framework based Web GUI Web browser Reloading page for each action Dynamic pages SOAP proxy to JSON Webservice SOAP session HTTP server Javascript CSS Images Javascript Stack Java Middle StackJava Webservice Stack Well known webapp software design
  • 48. Application server Web browser Changing the state of one widget on each action HTTP credentials JSON/XML Data HTTP server Javascript CSS Images DAO Business Services REST Web Services Other REST Webservices HTML 5 based session Script loader MVC Framework HTML Static pages Javascript Stack Java Middle StackJava Webservice Stack RESThub fullstack based software design
  • 49. Route 1 Route 2 Route 3 Route 4 Controller A Controller B Controller C View A View B View C JavaScript HTML Business services DB Web services DAO ClientsideServerside URL Sammy Controller D View D Events Client side routing Javascript Stack
  • 50. ViewControler Client side template rendering Javascript Stack
  • 52. • Server is stateless – No session needed for anonymous webservices – Session or similar mechanism needed for AuthN – Hability to add/remove servers with no impact • Client is statefull – Recent browser provides « session storage » – Manage the reloading of the page (F5) Consequences on the architecture
  • 53. • 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 RESThub on hosting side
  • 55. Build system 3 Run/Debug/Tests web application 7.1 WADL explorer jQuery plugin Spring console Default configuration Project templates (archetypes) Guidelines & Doc Java Webservice StackJavascript Stack Java Middle Stack Buildtime Runtime Database console 1.2 Tooling
  • 58. Demo
  • 59. Bootstrap you project with RESThub archetypes
  • 60. RESThub example : Round Table
  • 63. RESThub, now ! • Work started about 1 year ago • We are now close of the 1.0 final release – Before the end of November, 2010 • Build iteratively on concrete business cases • Used in multiple projects in production – Different versions • Don’t hesitate to join on http://resthub.org
  • 64. OAuth2 based security Identity manager CouchDB persistence Accessibility Serverside template rendering Xlink support Semantic web OSGI support Client side validation based on JSR 303 annotations What’s next ?

Editor's Notes

  1. Why, not how (Martin Fowler, USI 2010) We will not start by explaining how RESThub is made but by resuming the fundamental reasons for which it is born
  2. To do that, let’s start by a quick context analysis …
  3. Few time ago, we were still alone and we used to always re-do things ourselves with our own hands. We manually managed transactions, database connections and mappings and so on.
  4. Then we understood that tools can help and started to developp internal tools
  5. Progressively, we learned to communicate, exchange and share experiences, tools and solution with our communities, a set of people working on the same problematics, in the same and convergent way.
  6. This is incontesable that it is a positive, constructive and efficiency-oriented evolution but this leaded to a paradox …
  7. The apparition of an always growing set of specialized and complementary technologies helped us to focus on our real needs. We don’t manage transactions ourselves because there is no added value for us or our clients, we delegate it to dedicated components that are often widely used in our technical world. Moreover, the global quality of these components is really better than that we were able to produce by ouselves : cannot be a specialist in every domain !
  8. This is called separation of concerns and allowed us to focus on business and added value and that is, I think, a good thing for everyone. But …
  9. The born of all these specialized components leads also to a constantly growing complexity Less programing More technologies Initialization Configuration setup
  10. Leraning curve Gap to undestand all aggregates technologies Difficulties to sort, identify these technologies and integrate everything in a global architecture Starting is difficult
  11. These difficulties could, paradoxaly, leed to non productive situation whereas these technology are designed to facilitate technical preoccupations – and they really do !
  12. Even when started (helped by an architect), we often have difficulties to advance in a compact fog made of a multiple of complementary components…
  13. Sometimes (rare) could leed to a real project fail !! Often because Knowledge management failed, etc.
  14. How to resolve this problem ? Ie. using multiple technical solutions allowing us to focus on business that means using most efficient solutions and, on the same time, being able to reuse parts and technologies of a given solution on a totally different context, keeping a good efficiency and quality ? We came at the conclusion that an upper toolkit is needed Provide complexity abstraction Simplify problematics Help to start And…
  15. match all these needs Extensibility Plugability Reusability Independance from the context (projects characteristics) Simplicity Pragmatism
  16. And resolve a complex equation between simplicity and complexity Start simple to accelerate initial efficiency and facilitate knowledge acquisition and technology adoption While … Preserving technology performance and added-value Keep the capacity reuse in multiple contexts Keep the capacity to increase complexity later Concept of progressive complexity Start simple on basis able to handle later more complexity
  17. For these reasons, we didn’t whant to reinvent the wheel by using Widely used technologies Standards Cannot choose each time a different toolkit for each different need but not exactly the same tool … common basis, specific approch for specific needs. We wanted to reuse parts of our toolkit on multiple contexts No new « dedicated » framework or language but …
  18. a « global toolkit » to rule them all - simplify the integration and the learning of each dedicated technology - in order to simplify access to technology, startup But with progressive complexity possible
  19. Selection of coherent technologies Generic DAO & Business Services Generic REST Web Services JavaScript libraries for RIA WebApps A security layer for its services Modular: use what you need, no more! Tool for quality: follow the best practices Reliability helper: generic tests on each layer
  20. Selection of coherent technologies Generic DAO & Business Services Generic REST Web Services JavaScript libraries for RIA WebApps A security layer for its services Modular: use what you need, no more! Tool for quality: follow the best practices Reliability helper: generic tests on each layer
  21. Selection of coherent technologies Generic DAO & Business Services Generic REST Web Services JavaScript libraries for RIA WebApps A security layer for its services Modular: use what you need, no more! Tool for quality: follow the best practices Reliability helper: generic tests on each layer
  22. Comparasation with Flex architecture
  23.  Plugability  modularity  reuse  efficiency
  24.  Plugability  modularity  reuse  efficiency
  25.  Plugability  modularity  reuse  efficiency