SlideShare une entreprise Scribd logo
1  sur  40
Full stackframework
Whatis RESThub ? Java Stack JavascriptStack
Don'tRepeatYourself
Keep It Simple, Stupid
Not reinventing the wheel ! Some rights reserved by vrogy
Java Stack
Java stack modules GenericRESTWebservice Tapestry 5 Integration Plugin Architecture Generic Middle classes Tooling - Testing Documentation
Software design Plugin based architecture Spring + naming convention classpath*: scanning Maven multi modules Runtime configurationwith SpEL Multilayered software design Interface - Implementation DAO - Service - View ,[object Object],[object Object]
Java Middle stack Validator JSR 303 Bean validation SpringDBUnitintegration Hades 2 Generic DAO Generic Services and tests 3.5 JPA2 Persistenceengine Cross modules scanningfor JPA entities Embedded database 1.3
Generic classes @Named("bookingDao")  public class JpaBookingDao extends GenericJpaResourceDao<Booking> implements BookingDao {      ...} @Named("bookingService")  public class BookingServiceImpl extends GenericResourceServiceImpl<Booking, BookingDao> implements BookingService {      ...}
Generic tests Default Spring behaviour (Rollback=true) isdisabled !In memory H2 database configuration ,[object Object]
AbstractResthubTransactionalTest: your test istransactional
AbstractResthubTransactionAwareTest: designed to test yourservice layer
AbstractResthubWebTest: embeddedpreconfiguredJetty
AbstractDaoTest, AbstractServiceTest, AbstractControlerTest:generic CRUD unit tests,[object Object]
REST webservices JAX-RS REST Webservices OAuth2 basedsecurity Jersey 1.6 GenericwebservicesGeneric tests JSON Serialization Jackson 1.7 7.3 WADL explorer jQuery plugin Run/Debug web application
Generic REST Services How to… retrieve a persisted object in database ? @GET @Path("/{ref}") @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response getResource(@PathParam("ref") String ref) { 	T entity = this.service.findByRef(ref); if(entity == null) { return Response.status(Status.NOT_FOUND).build(); 	} return Response.ok(entity).build(); }
OAuth2
Serialization ,[object Object]
JSON serialization
Not so simple to manage (cyclic object graphs)
« BadgerFish » or « Mapped » strategy are not easy to use
We have chosen Jackson  POJO serialization
Interesting features like parent/children bi–directional link support
Missing reference support,[object Object]
Use case 1 : server based MVC Framework Clientside Stateless Browser Dynamicpages Session MVC Framework Webservices(optional) MVCframework Server side Middle Templateprocessing
Use case 2 : client MVC with RESThub JS Session Browser MVCframework Client side HTML5/JavaScript RIA Templateprocessing Staticfiles Dynamicdata RESTWebservices       Static file(JS, HTML, CSS) Stateless Server side Middle
Why Java developpershate JS ? Contextloss, and no classes Scopes and closures No strongtyping Cross browser compatibility Damnit, it’s Web developpement !
But Web techno Rocks ! Concernsseparation Highlydynamic Productive and quick Apps are trendy and sexy
No restart needed !
Javascriptstack for RIA Webapps But why ? RIA vs Server sidepresentationframework So muchunused power on our desktop ! Competitorsalreadyprovideframework Allows… Use the latest web technologies consistently Reduce traffic and server load Reuse server-programming good practices
Javascriptstack Widgets JavaScript core library ui 1.8 1.4 Script loader andOptimizer Class support RESThub JS MVC
Script loading I wantmy imports ! define([ 'lib/resthub',  'routes',  'controllers/home' ], function() {  	...  });
Routing Only one  « real » page Using the hash > no reload $.route('#/home', function() {  	...  }); $.route('#/home');
Classes We’reused to OOP, not prototype define(['lib/class'], function(Class) { returnClass.extend('MyClass', { attribute: 'some value', method: function() {          }     }); }); Static, instance, single inheritance
Controllers & templates Controller: presentationlogic define(['lib/controller'], function(Controller) { returnController.extend('HomeController', { template : 'views/home.html', init : function() {  this.render({user:{name:'Tyler'}});         }     }); }); Template: readable DOM fragment <p>Hello ${user.name} !</p>
Widgets Interactive enhanced GUI Buildyour GUI, as in Swing/SWT init: function() {  this.render();     $('a.confirm', this.element)         .click($.proxy(this, '_confirmHandler')         .button({             label: i18n.buttons.confirm         }); }
Repositories Connection to REST servers define(['lib/repository'], function(Repository) { returnRepository.extend('UserRepository', { root: 'api/users/', findByName: function(name, callback) {  this._get(this.root + name, callback);         }     }); });
Bonus Local storage > client session Event bus > betweencontrollers I18n > like in Java Security > OAuth2 JSON > effective communication Console > like log4j …

Contenu connexe

Tendances

[스프링/Spring교육학원,자바교육,근로자교육,실업자교육추천학원_탑크리에듀]#6.스프링프레임워크 & 마이바티스 (Spring Framew...
[스프링/Spring교육학원,자바교육,근로자교육,실업자교육추천학원_탑크리에듀]#6.스프링프레임워크 & 마이바티스 (Spring Framew...[스프링/Spring교육학원,자바교육,근로자교육,실업자교육추천학원_탑크리에듀]#6.스프링프레임워크 & 마이바티스 (Spring Framew...
[스프링/Spring교육학원,자바교육,근로자교육,실업자교육추천학원_탑크리에듀]#6.스프링프레임워크 & 마이바티스 (Spring Framew...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
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
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentationsourabh aggarwal
 
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and MavenWebtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and MavenThorsten Kamann
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Arun Gupta
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample applicationAntoine Rey
 
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
 
MVC on the server and on the client
MVC on the server and on the clientMVC on the server and on the client
MVC on the server and on the clientSebastiano Armeli
 
Building and Managing Projects with Maven
Building and Managing Projects with MavenBuilding and Managing Projects with Maven
Building and Managing Projects with MavenKhan625
 
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
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 updateJoshua Long
 

Tendances (20)

JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter PilgrimJavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
 
[스프링/Spring교육학원,자바교육,근로자교육,실업자교육추천학원_탑크리에듀]#6.스프링프레임워크 & 마이바티스 (Spring Framew...
[스프링/Spring교육학원,자바교육,근로자교육,실업자교육추천학원_탑크리에듀]#6.스프링프레임워크 & 마이바티스 (Spring Framew...[스프링/Spring교육학원,자바교육,근로자교육,실업자교육추천학원_탑크리에듀]#6.스프링프레임워크 & 마이바티스 (Spring Framew...
[스프링/Spring교육학원,자바교육,근로자교육,실업자교육추천학원_탑크리에듀]#6.스프링프레임워크 & 마이바티스 (Spring Framew...
 
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
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentation
 
Advance Java
Advance JavaAdvance Java
Advance Java
 
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and MavenWebtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
 
JDBC in Servlets
JDBC in ServletsJDBC in Servlets
JDBC in Servlets
 
Java Enterprise Edition
Java Enterprise EditionJava Enterprise Edition
Java Enterprise Edition
 
JSF 2.0 Preview
JSF 2.0 PreviewJSF 2.0 Preview
JSF 2.0 Preview
 
JDBC
JDBCJDBC
JDBC
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample application
 
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
 
MVC on the server and on the client
MVC on the server and on the clientMVC on the server and on the client
MVC on the server and on the client
 
Building and Managing Projects with Maven
Building and Managing Projects with MavenBuilding and Managing Projects with Maven
Building and Managing Projects with Maven
 
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
 
Ant
AntAnt
Ant
 
Jsp servlets
Jsp servletsJsp servlets
Jsp servlets
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 update
 

Similaire à Resthub lyonjug

Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Tugdual Grall
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
Spring 3 - Der dritte Frühling
Spring 3 - Der dritte FrühlingSpring 3 - Der dritte Frühling
Spring 3 - Der dritte FrühlingThorsten Kamann
 
Boston Computing Review - Java Server Pages
Boston Computing Review - Java Server PagesBoston Computing Review - Java Server Pages
Boston Computing Review - Java Server PagesJohn Brunswick
 
Java, Ruby & Rails
Java, Ruby & RailsJava, Ruby & Rails
Java, Ruby & RailsPeter Lind
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationAndrew Rota
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Gunith Devasurendra
 
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
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfAppster1
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfAppster1
 
Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Pavel Kaminsky
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Codemotion
 

Similaire à Resthub lyonjug (20)

Resthub
ResthubResthub
Resthub
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007
 
J2EE jsp_01
J2EE jsp_01J2EE jsp_01
J2EE jsp_01
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
Spring 3 - Der dritte Frühling
Spring 3 - Der dritte FrühlingSpring 3 - Der dritte Frühling
Spring 3 - Der dritte Frühling
 
I Feel Pretty
I Feel PrettyI Feel Pretty
I Feel Pretty
 
Boston Computing Review - Java Server Pages
Boston Computing Review - Java Server PagesBoston Computing Review - Java Server Pages
Boston Computing Review - Java Server Pages
 
Jsp Comparison
 Jsp Comparison Jsp Comparison
Jsp Comparison
 
Java, Ruby & Rails
Java, Ruby & RailsJava, Ruby & Rails
Java, Ruby & Rails
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP Application
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)
 
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
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
 
AppengineJS
AppengineJSAppengineJS
AppengineJS
 
Full Stack Scala
Full Stack ScalaFull Stack Scala
Full Stack Scala
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 

Plus de Sébastien Deleuze

Plus de Sébastien Deleuze (7)

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
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Resthub lyonjug

  • 1.
  • 3. Whatis RESThub ? Java Stack JavascriptStack
  • 6. Not reinventing the wheel ! Some rights reserved by vrogy
  • 8. Java stack modules GenericRESTWebservice Tapestry 5 Integration Plugin Architecture Generic Middle classes Tooling - Testing Documentation
  • 9.
  • 10. Java Middle stack Validator JSR 303 Bean validation SpringDBUnitintegration Hades 2 Generic DAO Generic Services and tests 3.5 JPA2 Persistenceengine Cross modules scanningfor JPA entities Embedded database 1.3
  • 11. Generic classes @Named("bookingDao") public class JpaBookingDao extends GenericJpaResourceDao<Booking> implements BookingDao {      ...} @Named("bookingService") public class BookingServiceImpl extends GenericResourceServiceImpl<Booking, BookingDao> implements BookingService {      ...}
  • 12.
  • 16.
  • 17. REST webservices JAX-RS REST Webservices OAuth2 basedsecurity Jersey 1.6 GenericwebservicesGeneric tests JSON Serialization Jackson 1.7 7.3 WADL explorer jQuery plugin Run/Debug web application
  • 18. Generic REST Services How to… retrieve a persisted object in database ? @GET @Path("/{ref}") @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response getResource(@PathParam("ref") String ref) { T entity = this.service.findByRef(ref); if(entity == null) { return Response.status(Status.NOT_FOUND).build(); } return Response.ok(entity).build(); }
  • 20.
  • 22. Not so simple to manage (cyclic object graphs)
  • 23. « BadgerFish » or « Mapped » strategy are not easy to use
  • 24. We have chosen Jackson POJO serialization
  • 25. Interesting features like parent/children bi–directional link support
  • 26.
  • 27. Use case 1 : server based MVC Framework Clientside Stateless Browser Dynamicpages Session MVC Framework Webservices(optional) MVCframework Server side Middle Templateprocessing
  • 28. Use case 2 : client MVC with RESThub JS Session Browser MVCframework Client side HTML5/JavaScript RIA Templateprocessing Staticfiles Dynamicdata RESTWebservices Static file(JS, HTML, CSS) Stateless Server side Middle
  • 29. Why Java developpershate JS ? Contextloss, and no classes Scopes and closures No strongtyping Cross browser compatibility Damnit, it’s Web developpement !
  • 30. But Web techno Rocks ! Concernsseparation Highlydynamic Productive and quick Apps are trendy and sexy
  • 32. Javascriptstack for RIA Webapps But why ? RIA vs Server sidepresentationframework So muchunused power on our desktop ! Competitorsalreadyprovideframework Allows… Use the latest web technologies consistently Reduce traffic and server load Reuse server-programming good practices
  • 33. Javascriptstack Widgets JavaScript core library ui 1.8 1.4 Script loader andOptimizer Class support RESThub JS MVC
  • 34. Script loading I wantmy imports ! define([ 'lib/resthub', 'routes', 'controllers/home' ], function() { ... });
  • 35. Routing Only one « real » page Using the hash > no reload $.route('#/home', function() { ... }); $.route('#/home');
  • 36. Classes We’reused to OOP, not prototype define(['lib/class'], function(Class) { returnClass.extend('MyClass', { attribute: 'some value', method: function() { } }); }); Static, instance, single inheritance
  • 37. Controllers & templates Controller: presentationlogic define(['lib/controller'], function(Controller) { returnController.extend('HomeController', { template : 'views/home.html', init : function() { this.render({user:{name:'Tyler'}}); } }); }); Template: readable DOM fragment <p>Hello ${user.name} !</p>
  • 38. Widgets Interactive enhanced GUI Buildyour GUI, as in Swing/SWT init: function() { this.render(); $('a.confirm', this.element) .click($.proxy(this, '_confirmHandler') .button({ label: i18n.buttons.confirm }); }
  • 39. Repositories Connection to REST servers define(['lib/repository'], function(Repository) { returnRepository.extend('UserRepository', { root: 'api/users/', findByName: function(name, callback) { this._get(this.root + name, callback); } }); });
  • 40. Bonus Local storage > client session Event bus > betweencontrollers I18n > like in Java Security > OAuth2 JSON > effective communication Console > like log4j …
  • 41. Global view Application server Web browser View Controller Repository View Controller Routes DAO Business Services REST Web Services Repository View Controller Tools
  • 42. Demo
  • 46. Status and Roadmap RESThub 1.1-RC1 has just been released ! RESThub 1.2roadmap : SpringData integration (CouchDB, Redis) OAuth 2 final version support AsyncHttpClient for scalable architecture PushStatesupport on routing Client sidebean validation based on JSR-303 annotations Websocket support NodeJSbased server sidetemplateprocessing