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

Contenu connexe

Tendances

Spring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrineSpring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrineSyrine Ben aziza
 
Java entreprise edition et industrialisation du génie logiciel par m.youssfi
Java entreprise edition et industrialisation du génie logiciel par m.youssfiJava entreprise edition et industrialisation du génie logiciel par m.youssfi
Java entreprise edition et industrialisation du génie logiciel par m.youssfiENSET, Université Hassan II Casablanca
 
Mohamed youssfi support architectures logicielles distribuées basées sue les ...
Mohamed youssfi support architectures logicielles distribuées basées sue les ...Mohamed youssfi support architectures logicielles distribuées basées sue les ...
Mohamed youssfi support architectures logicielles distribuées basées sue les ...ENSET, Université Hassan II Casablanca
 
Appalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPAppalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPYouness Boukouchi
 
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
 
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
 
Formation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataFormation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataLhouceine OUHAMZA
 

Tendances (20)

Support distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcastSupport distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcast
 
Spring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrineSpring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrine
 
Nouveautés de java 8
Nouveautés de java 8Nouveautés de java 8
Nouveautés de java 8
 
Support de cours entrepise java beans ejb m.youssfi
Support de cours entrepise java beans ejb m.youssfiSupport de cours entrepise java beans ejb m.youssfi
Support de cours entrepise java beans ejb m.youssfi
 
Java entreprise edition et industrialisation du génie logiciel par m.youssfi
Java entreprise edition et industrialisation du génie logiciel par m.youssfiJava entreprise edition et industrialisation du génie logiciel par m.youssfi
Java entreprise edition et industrialisation du génie logiciel par m.youssfi
 
Support programmation orientée aspect mohamed youssfi (aop)
Support programmation orientée aspect mohamed youssfi (aop)Support programmation orientée aspect mohamed youssfi (aop)
Support programmation orientée aspect mohamed youssfi (aop)
 
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
 
Spring Boot RestApi.pptx
Spring Boot RestApi.pptxSpring Boot RestApi.pptx
Spring Boot RestApi.pptx
 
Support POO Java Deuxième Partie
Support POO Java Deuxième PartieSupport POO Java Deuxième Partie
Support POO Java Deuxième Partie
 
Mohamed youssfi support architectures logicielles distribuées basées sue les ...
Mohamed youssfi support architectures logicielles distribuées basées sue les ...Mohamed youssfi support architectures logicielles distribuées basées sue les ...
Mohamed youssfi support architectures logicielles distribuées basées sue les ...
 
Appalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPAppalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSP
 
Maven et industrialisation du logiciel
Maven et industrialisation du logicielMaven et industrialisation du logiciel
Maven et industrialisation du logiciel
 
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...
 
Spring Data JPA
Spring Data JPASpring Data JPA
Spring Data JPA
 
Sécurité des Applications Web avec Json Web Token (JWT)
Sécurité des Applications Web avec Json Web Token (JWT)Sécurité des Applications Web avec Json Web Token (JWT)
Sécurité des Applications Web avec Json Web Token (JWT)
 
Support JEE Servlet Jsp MVC M.Youssfi
Support JEE Servlet Jsp MVC M.YoussfiSupport JEE Servlet Jsp MVC M.Youssfi
Support JEE Servlet Jsp MVC 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)
Développement d'un site web jee de e commerce basé sur spring (m.youssfi)
 
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
 
Formation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataFormation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-data
 
Support NodeJS avec TypeScript Express MongoDB
Support NodeJS avec TypeScript Express MongoDBSupport NodeJS avec TypeScript Express MongoDB
Support NodeJS avec TypeScript Express MongoDB
 

En vedette

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
 

En vedette (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
 

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

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

Plus de 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
 

Plus de 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.