SlideShare a Scribd company logo
1 of 26
Présentation générale du framework Spring Auteur: RICHAND Nathaniel
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Spring  Core IOC AOP Spring  DAO Spring   Context Spring   Remoting … Spring ORM Spring JDBC Spring   Web RMI Web   Services … JDO Hibernate … Spring MVC Struts JSF …
[object Object],L’IOC n’est pas une  lubie , mais un enjeu primordial pour un développement propre et structuré. Inversion Of Control
[object Object],[object Object],[object Object],Classe A Classe B Dépendance Interface I Classe A Dépendance Classe B
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],+getNomForm() : String +getNomForm() : String FormulaireImpl FormulaireInterface Ceci est plutôt du  traitement  «  métier » Comment se fait le lien entre les deux couches?
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]
[object Object],[object Object],[object Object]
DispatcherServlet Controller View Model Request Response
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
import  org.springframework.web.servlet.mvc.SimpleFormController; public   class  FormController  extends  SimpleFormController {  // Méthode appelée avant l’affichage du formulaire, retourne un bean associé au formulaire protected  Object formBackingObject(HttpServletRequest request) { MyBean bean = (MyBean) request.getSession().getAttribute( "myBean" ); if  (bean ==  null ) bean =  new  MyBean(); return  bean; } // Méthode appelée lors du POST du formulaire, reçois le bean associé au formulaire protected  ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object springBean, BindException errors)  throws  Exception { MyBean bean = (MyBean) springBean; request.getSession().setAttribute( "myBean" , bean); return   new  ModelAndView(); } }
GET POST Retourne une instance de la « command » (JavaBean) associée. Initialisation des binders, convertisseurs des données de la requête. Permets de binder des données complémentaires. Typiquement les contenus de listes déroulantes. Le modèle est exposé et la vue est appelée.
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Beans Graph Beans View
[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Architecture jee principe de inversion de controle et injection des dependances
Architecture jee principe de inversion de controle et injection des dependancesArchitecture jee principe de inversion de controle et injection des dependances
Architecture jee principe de inversion de controle et injection des dependancesENSET, Université Hassan II Casablanca
 
Introduction à React JS
Introduction à React JSIntroduction à React JS
Introduction à React JSAbdoulaye Dieng
 
Introduction à spring boot
Introduction à spring bootIntroduction à spring boot
Introduction à spring bootAntoine Rey
 
Formation JAVA/J2EE
Formation JAVA/J2EEFormation JAVA/J2EE
Formation JAVA/J2EEInes Ouaz
 
Angular Framework présentation PPT LIGHT
Angular Framework présentation PPT LIGHTAngular Framework présentation PPT LIGHT
Angular Framework présentation PPT LIGHTtayebbousfiha1
 
Développement d'un site web jee de e commerce basé sur spring (m.youssfi)
Développement d'un site web jee de e commerce basé sur spring (m.youssfi)Développement d'un site web jee de e commerce basé sur spring (m.youssfi)
Développement d'un site web jee de e commerce basé sur spring (m.youssfi)ENSET, Université Hassan II Casablanca
 
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...
Support de cours EJB 3 version complète Par Mr  Youssfi, ENSET, Université Ha...Support de cours EJB 3 version complète Par Mr  Youssfi, ENSET, Université Ha...
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...ENSET, Université Hassan II Casablanca
 
Workshop spring session 2 - La persistance au sein des applications Java
Workshop spring   session 2 - La persistance au sein des applications JavaWorkshop spring   session 2 - La persistance au sein des applications Java
Workshop spring session 2 - La persistance au sein des applications JavaAntoine Rey
 
Présentation de JEE et de son écosysteme
Présentation de JEE et de son écosystemePrésentation de JEE et de son écosysteme
Présentation de JEE et de son écosystemeStéphane Traumat
 
Entreprise Java Beans (EJB)
Entreprise Java Beans (EJB)Entreprise Java Beans (EJB)
Entreprise Java Beans (EJB)Heithem Abbes
 
Concevoir, développer et sécuriser des micro-services avec Spring Boot
Concevoir, développer et sécuriser des micro-services avec Spring BootConcevoir, développer et sécuriser des micro-services avec Spring Boot
Concevoir, développer et sécuriser des micro-services avec Spring BootDNG Consulting
 
Appalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPAppalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPYouness Boukouchi
 
Workshop Spring - Session 1 - L'offre Spring et les bases
Workshop Spring  - Session 1 - L'offre Spring et les basesWorkshop Spring  - Session 1 - L'offre Spring et les bases
Workshop Spring - Session 1 - L'offre Spring et les basesAntoine Rey
 
Rapport j2ee: Gestion d’un compte bancaire En utilisant les EJB 3.0
Rapport j2ee: Gestion d’un compte bancaire En utilisant les EJB 3.0Rapport j2ee: Gestion d’un compte bancaire En utilisant les EJB 3.0
Rapport j2ee: Gestion d’un compte bancaire En utilisant les EJB 3.0Ayoub Rouzi
 

What's hot (20)

Architecture jee principe de inversion de controle et injection des dependances
Architecture jee principe de inversion de controle et injection des dependancesArchitecture jee principe de inversion de controle et injection des dependances
Architecture jee principe de inversion de controle et injection des dependances
 
Introduction à React JS
Introduction à React JSIntroduction à React JS
Introduction à React JS
 
Introduction à React
Introduction à ReactIntroduction à React
Introduction à React
 
Introduction à spring boot
Introduction à spring bootIntroduction à spring boot
Introduction à spring boot
 
Formation JAVA/J2EE
Formation JAVA/J2EEFormation JAVA/J2EE
Formation JAVA/J2EE
 
Site JEE de ECommerce Basé sur Spring IOC MVC Security JPA Hibernate
Site JEE de ECommerce  Basé sur Spring IOC MVC Security JPA HibernateSite JEE de ECommerce  Basé sur Spring IOC MVC Security JPA Hibernate
Site JEE de ECommerce Basé sur Spring IOC MVC Security JPA Hibernate
 
Angular Framework présentation PPT LIGHT
Angular Framework présentation PPT LIGHTAngular Framework présentation PPT LIGHT
Angular Framework présentation PPT LIGHT
 
Développement d'un site web jee de e commerce basé sur spring (m.youssfi)
Développement d'un site web jee de e commerce basé sur spring (m.youssfi)Développement d'un site web jee de e commerce basé sur spring (m.youssfi)
Développement d'un site web jee de e commerce basé sur spring (m.youssfi)
 
Support de Cours JSF2 Première partie Intégration avec Spring
Support de Cours JSF2 Première partie Intégration avec SpringSupport de Cours JSF2 Première partie Intégration avec Spring
Support de Cours JSF2 Première partie Intégration avec Spring
 
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...
Support de cours EJB 3 version complète Par Mr  Youssfi, ENSET, Université Ha...Support de cours EJB 3 version complète Par Mr  Youssfi, ENSET, Université Ha...
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...
 
Support Web Services SOAP et RESTful Mr YOUSSFI
Support Web Services SOAP et RESTful Mr YOUSSFISupport Web Services SOAP et RESTful Mr YOUSSFI
Support Web Services SOAP et RESTful Mr YOUSSFI
 
Workshop spring session 2 - La persistance au sein des applications Java
Workshop spring   session 2 - La persistance au sein des applications JavaWorkshop spring   session 2 - La persistance au sein des applications Java
Workshop spring session 2 - La persistance au sein des applications Java
 
Support programmation orientée objet c# .net version f8
Support programmation orientée objet c#  .net version f8Support programmation orientée objet c#  .net version f8
Support programmation orientée objet c# .net version f8
 
Introduction à React
Introduction à ReactIntroduction à React
Introduction à React
 
Présentation de JEE et de son écosysteme
Présentation de JEE et de son écosystemePrésentation de JEE et de son écosysteme
Présentation de JEE et de son écosysteme
 
Entreprise Java Beans (EJB)
Entreprise Java Beans (EJB)Entreprise Java Beans (EJB)
Entreprise Java Beans (EJB)
 
Concevoir, développer et sécuriser des micro-services avec Spring Boot
Concevoir, développer et sécuriser des micro-services avec Spring BootConcevoir, développer et sécuriser des micro-services avec Spring Boot
Concevoir, développer et sécuriser des micro-services avec Spring Boot
 
Appalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPAppalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSP
 
Workshop Spring - Session 1 - L'offre Spring et les bases
Workshop Spring  - Session 1 - L'offre Spring et les basesWorkshop Spring  - Session 1 - L'offre Spring et les bases
Workshop Spring - Session 1 - L'offre Spring et les bases
 
Rapport j2ee: Gestion d’un compte bancaire En utilisant les EJB 3.0
Rapport j2ee: Gestion d’un compte bancaire En utilisant les EJB 3.0Rapport j2ee: Gestion d’un compte bancaire En utilisant les EJB 3.0
Rapport j2ee: Gestion d’un compte bancaire En utilisant les EJB 3.0
 

Viewers also liked

Spring par la pratique chap-7 - mvc
Spring par la pratique  chap-7 - mvcSpring par la pratique  chap-7 - mvc
Spring par la pratique chap-7 - mvcFlorent Breton
 
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - TD
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - TDENIB cours CAI Web - Séance 4 - Frameworks/Spring - TD
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - TDHoracio Gonzalez
 
Egalite de chances
Egalite de chancesEgalite de chances
Egalite de chancesiesboliches
 
Valtech - Du BI au Big Data, une révolution dans l’entreprise
Valtech - Du BI au Big Data, une révolution dans l’entrepriseValtech - Du BI au Big Data, une révolution dans l’entreprise
Valtech - Du BI au Big Data, une révolution dans l’entrepriseValtech
 
Alphorm.com Formation Java, les fondamentaux
Alphorm.com Formation Java, les fondamentaux Alphorm.com Formation Java, les fondamentaux
Alphorm.com Formation Java, les fondamentaux Alphorm
 

Viewers also liked (6)

Tuto spring
Tuto springTuto spring
Tuto spring
 
Spring par la pratique chap-7 - mvc
Spring par la pratique  chap-7 - mvcSpring par la pratique  chap-7 - mvc
Spring par la pratique chap-7 - mvc
 
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - TD
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - TDENIB cours CAI Web - Séance 4 - Frameworks/Spring - TD
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - TD
 
Egalite de chances
Egalite de chancesEgalite de chances
Egalite de chances
 
Valtech - Du BI au Big Data, une révolution dans l’entreprise
Valtech - Du BI au Big Data, une révolution dans l’entrepriseValtech - Du BI au Big Data, une révolution dans l’entreprise
Valtech - Du BI au Big Data, une révolution dans l’entreprise
 
Alphorm.com Formation Java, les fondamentaux
Alphorm.com Formation Java, les fondamentaux Alphorm.com Formation Java, les fondamentaux
Alphorm.com Formation Java, les fondamentaux
 

Similar to Presentation Spring, Spring MVC

BordeauxJUG : Portails & Portlets Java
BordeauxJUG : Portails & Portlets JavaBordeauxJUG : Portails & Portlets Java
BordeauxJUG : Portails & Portlets JavaCamblor Frédéric
 
Présentation de JavaServer Faces
Présentation de JavaServer FacesPrésentation de JavaServer Faces
Présentation de JavaServer FacesJS Bournival
 
Prsentation de-javaserver-faces4124
Prsentation de-javaserver-faces4124Prsentation de-javaserver-faces4124
Prsentation de-javaserver-faces4124Mejdeddine Bouzouita
 
cours-gratuit.com--id-12477.pdf
cours-gratuit.com--id-12477.pdfcours-gratuit.com--id-12477.pdf
cours-gratuit.com--id-12477.pdfssuser192642
 
Symfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 PerformantSymfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 PerformantHugo Hamon
 
20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache MavenArnaud Héritier
 
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniterAtsé François-Xavier KOBON
 
Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database ConnectivityKorteby Farouk
 
Fondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application FlexFondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application Flexdavid deraedt
 
Fondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application FlexFondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application Flexdavid deraedt
 
Asp Au Service Des Mv Ps
Asp Au Service Des Mv PsAsp Au Service Des Mv Ps
Asp Au Service Des Mv PsGregory Renard
 
Spring Meetup Paris - Back to the basics of Spring (Boot)
Spring Meetup Paris - Back to the basics of Spring (Boot)Spring Meetup Paris - Back to the basics of Spring (Boot)
Spring Meetup Paris - Back to the basics of Spring (Boot)Eric SIBER
 

Similar to Presentation Spring, Spring MVC (20)

Spring 3.0
Spring 3.0Spring 3.0
Spring 3.0
 
BordeauxJUG : Portails & Portlets Java
BordeauxJUG : Portails & Portlets JavaBordeauxJUG : Portails & Portlets Java
BordeauxJUG : Portails & Portlets Java
 
Présentation de JavaServer Faces
Présentation de JavaServer FacesPrésentation de JavaServer Faces
Présentation de JavaServer Faces
 
Prsentation de-javaserver-faces4124
Prsentation de-javaserver-faces4124Prsentation de-javaserver-faces4124
Prsentation de-javaserver-faces4124
 
cours-gratuit.com--id-12477.pdf
cours-gratuit.com--id-12477.pdfcours-gratuit.com--id-12477.pdf
cours-gratuit.com--id-12477.pdf
 
Symfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 PerformantSymfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 Performant
 
Presentation jsf2
Presentation jsf2Presentation jsf2
Presentation jsf2
 
spring-api-rest.pdf
spring-api-rest.pdfspring-api-rest.pdf
spring-api-rest.pdf
 
Applets
AppletsApplets
Applets
 
20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven
 
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database Connectivity
 
Alt.net spring.net
Alt.net spring.netAlt.net spring.net
Alt.net spring.net
 
Alt.net spring.net
Alt.net spring.netAlt.net spring.net
Alt.net spring.net
 
Spring.NET
Spring.NETSpring.NET
Spring.NET
 
Fondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application FlexFondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application Flex
 
Fondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application FlexFondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application Flex
 
Asp Au Service Des Mv Ps
Asp Au Service Des Mv PsAsp Au Service Des Mv Ps
Asp Au Service Des Mv Ps
 
Spring Meetup Paris - Back to the basics of Spring (Boot)
Spring Meetup Paris - Back to the basics of Spring (Boot)Spring Meetup Paris - Back to the basics of Spring (Boot)
Spring Meetup Paris - Back to the basics of Spring (Boot)
 

More from Nathaniel Richand

Devenir une entreprise resiliente avec la permagilité
Devenir une entreprise resiliente avec la permagilitéDevenir une entreprise resiliente avec la permagilité
Devenir une entreprise resiliente avec la permagilitéNathaniel Richand
 
Proposition séminaire agile
Proposition séminaire agileProposition séminaire agile
Proposition séminaire agileNathaniel Richand
 
Devenir une organisation apprenante dans l'IT en 2014
Devenir une organisation apprenante dans l'IT en 2014Devenir une organisation apprenante dans l'IT en 2014
Devenir une organisation apprenante dans l'IT en 2014Nathaniel Richand
 
2013 brownbaglunch - lean startup
2013 brownbaglunch - lean startup2013 brownbaglunch - lean startup
2013 brownbaglunch - lean startupNathaniel Richand
 
Brownbaglunch Rétrospective
Brownbaglunch RétrospectiveBrownbaglunch Rétrospective
Brownbaglunch RétrospectiveNathaniel Richand
 
2010 agile conférence - Comment vendre les tests automatisés
2010 agile conférence - Comment vendre les tests automatisés2010 agile conférence - Comment vendre les tests automatisés
2010 agile conférence - Comment vendre les tests automatisésNathaniel Richand
 
2011 nri-pratiques tests-avancees
2011 nri-pratiques tests-avancees2011 nri-pratiques tests-avancees
2011 nri-pratiques tests-avanceesNathaniel Richand
 

More from Nathaniel Richand (18)

Devenir une entreprise resiliente avec la permagilité
Devenir une entreprise resiliente avec la permagilitéDevenir une entreprise resiliente avec la permagilité
Devenir une entreprise resiliente avec la permagilité
 
Proposition séminaire agile
Proposition séminaire agileProposition séminaire agile
Proposition séminaire agile
 
Permagilite
PermagilitePermagilite
Permagilite
 
2017 brownbaglunch Kanban
2017 brownbaglunch Kanban2017 brownbaglunch Kanban
2017 brownbaglunch Kanban
 
Présentation Dashing
Présentation DashingPrésentation Dashing
Présentation Dashing
 
Devenir une organisation apprenante dans l'IT en 2014
Devenir une organisation apprenante dans l'IT en 2014Devenir une organisation apprenante dans l'IT en 2014
Devenir une organisation apprenante dans l'IT en 2014
 
2013 brownbaglunch - lean startup
2013 brownbaglunch - lean startup2013 brownbaglunch - lean startup
2013 brownbaglunch - lean startup
 
Brownbaglunch Rétrospective
Brownbaglunch RétrospectiveBrownbaglunch Rétrospective
Brownbaglunch Rétrospective
 
Brown baglunch xebia
Brown baglunch xebiaBrown baglunch xebia
Brown baglunch xebia
 
Lean canvas brochure
Lean canvas brochureLean canvas brochure
Lean canvas brochure
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Josiane ScrumDay 2012
Josiane ScrumDay 2012Josiane ScrumDay 2012
Josiane ScrumDay 2012
 
2011 XKE - Kanban in action
2011 XKE - Kanban in action2011 XKE - Kanban in action
2011 XKE - Kanban in action
 
2010 agile conférence - Comment vendre les tests automatisés
2010 agile conférence - Comment vendre les tests automatisés2010 agile conférence - Comment vendre les tests automatisés
2010 agile conférence - Comment vendre les tests automatisés
 
2011 nri-pratiques tests-avancees
2011 nri-pratiques tests-avancees2011 nri-pratiques tests-avancees
2011 nri-pratiques tests-avancees
 
XKE - La communication
XKE - La communicationXKE - La communication
XKE - La communication
 
Presentation Zen
Presentation ZenPresentation Zen
Presentation Zen
 
Tests Logiciel
Tests LogicielTests Logiciel
Tests Logiciel
 

Presentation Spring, Spring MVC

  • 1. Présentation générale du framework Spring Auteur: RICHAND Nathaniel
  • 2.
  • 3.
  • 4.
  • 5. Spring Core IOC AOP Spring DAO Spring Context Spring Remoting … Spring ORM Spring JDBC Spring Web RMI Web Services … JDO Hibernate … Spring MVC Struts JSF …
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. DispatcherServlet Controller View Model Request Response
  • 13.
  • 14. import org.springframework.web.servlet.mvc.SimpleFormController; public class FormController extends SimpleFormController { // Méthode appelée avant l’affichage du formulaire, retourne un bean associé au formulaire protected Object formBackingObject(HttpServletRequest request) { MyBean bean = (MyBean) request.getSession().getAttribute( "myBean" ); if (bean == null ) bean = new MyBean(); return bean; } // Méthode appelée lors du POST du formulaire, reçois le bean associé au formulaire protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object springBean, BindException errors) throws Exception { MyBean bean = (MyBean) springBean; request.getSession().setAttribute( "myBean" , bean); return new ModelAndView(); } }
  • 15. GET POST Retourne une instance de la « command » (JavaBean) associée. Initialisation des binders, convertisseurs des données de la requête. Permets de binder des données complémentaires. Typiquement les contenus de listes déroulantes. Le modèle est exposé et la vue est appelée.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.