Presentation Spring, Spring MVC

Nathaniel Richand
Nathaniel RichandAgile Coach en AgileTribu
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]
1 de 26

Recomendados

Introduction à spring boot por
Introduction à spring bootIntroduction à spring boot
Introduction à spring bootAntoine Rey
17.8K vistas19 diapositivas
Presentation Spring por
Presentation SpringPresentation Spring
Presentation SpringNathaniel Richand
7.6K vistas23 diapositivas
Angular Avancé por
Angular AvancéAngular Avancé
Angular AvancéNizar MAATOUG -ISET Sidi Bouzid
806 vistas90 diapositivas
Support de cours Spring M.youssfi por
Support de cours Spring  M.youssfiSupport de cours Spring  M.youssfi
Support de cours Spring M.youssfiENSET, Université Hassan II Casablanca
97.9K vistas164 diapositivas
Workshop spring session 2 - La persistance au sein des applications Java por
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
10.4K vistas22 diapositivas
Architecture jee principe de inversion de controle et injection des dependances por
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
21K vistas48 diapositivas

Más contenido relacionado

La actualidad más candente

Spring Framework - AOP por
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOPDzmitry Naskou
8.4K vistas44 diapositivas
Fondamentaux java por
Fondamentaux javaFondamentaux java
Fondamentaux javaInes Ouaz
3K vistas117 diapositivas
Support JEE Servlet Jsp MVC M.Youssfi por
Support JEE Servlet Jsp MVC M.YoussfiSupport JEE Servlet Jsp MVC M.Youssfi
Support JEE Servlet Jsp MVC M.YoussfiENSET, Université Hassan II Casablanca
51.6K vistas119 diapositivas
Support cours angular por
Support cours angularSupport cours angular
Support cours angularNizar MAATOUG -ISET Sidi Bouzid
2K vistas162 diapositivas
Jsf 110530152515-phpapp01 por
Jsf 110530152515-phpapp01Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01Eric Bourdet
1.2K vistas175 diapositivas
Sécurité des Applications Web avec Json Web Token (JWT) por
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)ENSET, Université Hassan II Casablanca
58.8K vistas119 diapositivas

La actualidad más candente(20)

Fondamentaux java por Ines Ouaz
Fondamentaux javaFondamentaux java
Fondamentaux java
Ines Ouaz3K vistas
Jsf 110530152515-phpapp01 por Eric Bourdet
Jsf 110530152515-phpapp01Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01
Eric Bourdet1.2K vistas
Concevoir, développer et sécuriser des micro-services avec Spring Boot por DNG Consulting
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
DNG Consulting2.7K vistas
Presentation JEE et son écossystéme por Algeria JUG
Presentation JEE et son écossystémePresentation JEE et son écossystéme
Presentation JEE et son écossystéme
Algeria JUG2.2K vistas
Spring Boot in Action por Alex Movila
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila3K vistas
Spring Framework - Core por Dzmitry Naskou
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
Dzmitry Naskou34.8K vistas
Spring Web MVC por zeeshanhanif
Spring Web MVCSpring Web MVC
Spring Web MVC
zeeshanhanif10.6K vistas
Angular Framework présentation PPT LIGHT por tayebbousfiha1
Angular Framework présentation PPT LIGHTAngular Framework présentation PPT LIGHT
Angular Framework présentation PPT LIGHT
tayebbousfiha11.3K vistas

Destacado

Tuto spring por
Tuto springTuto spring
Tuto springsamba-somoko
1.1K vistas11 diapositivas
Spring par la pratique chap-7 - mvc por
Spring par la pratique  chap-7 - mvcSpring par la pratique  chap-7 - mvc
Spring par la pratique chap-7 - mvcFlorent Breton
2.2K vistas49 diapositivas
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - TD por
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
1.4K vistas15 diapositivas
Egalite de chances por
Egalite de chancesEgalite de chances
Egalite de chancesiesboliches
663 vistas10 diapositivas
Valtech - Du BI au Big Data, une révolution dans l’entreprise por
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
8.9K vistas50 diapositivas
Alphorm.com Formation Java, les fondamentaux por
Alphorm.com Formation Java, les fondamentaux Alphorm.com Formation Java, les fondamentaux
Alphorm.com Formation Java, les fondamentaux Alphorm
60.9K vistas368 diapositivas

Destacado(6)

Spring par la pratique chap-7 - mvc por Florent Breton
Spring par la pratique  chap-7 - mvcSpring par la pratique  chap-7 - mvc
Spring par la pratique chap-7 - mvc
Florent Breton2.2K vistas
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - TD por Horacio Gonzalez
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
Horacio Gonzalez1.4K vistas
Egalite de chances por iesboliches
Egalite de chancesEgalite de chances
Egalite de chances
iesboliches663 vistas
Valtech - Du BI au Big Data, une révolution dans l’entreprise por Valtech
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
Valtech8.9K vistas
Alphorm.com Formation Java, les fondamentaux por Alphorm
Alphorm.com Formation Java, les fondamentaux Alphorm.com Formation Java, les fondamentaux
Alphorm.com Formation Java, les fondamentaux
Alphorm60.9K vistas

Similar a Presentation Spring, Spring MVC

Spring 3.0 por
Spring 3.0Spring 3.0
Spring 3.0Spring User Group France
1.5K vistas63 diapositivas
BordeauxJUG : Portails & Portlets Java por
BordeauxJUG : Portails & Portlets JavaBordeauxJUG : Portails & Portlets Java
BordeauxJUG : Portails & Portlets JavaCamblor Frédéric
4.1K vistas36 diapositivas
Présentation de JavaServer Faces por
Présentation de JavaServer FacesPrésentation de JavaServer Faces
Présentation de JavaServer FacesJS Bournival
1.9K vistas37 diapositivas
Prsentation de-javaserver-faces4124 por
Prsentation de-javaserver-faces4124Prsentation de-javaserver-faces4124
Prsentation de-javaserver-faces4124Mejdeddine Bouzouita
429 vistas37 diapositivas
cours-gratuit.com--id-12477.pdf por
cours-gratuit.com--id-12477.pdfcours-gratuit.com--id-12477.pdf
cours-gratuit.com--id-12477.pdfssuser192642
25 vistas100 diapositivas
Symfony2 - Un Framework PHP 5 Performant por
Symfony2 - Un Framework PHP 5 PerformantSymfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 PerformantHugo Hamon
3.1K vistas64 diapositivas

Similar a Presentation Spring, Spring MVC(20)

BordeauxJUG : Portails & Portlets Java por Camblor Frédéric
BordeauxJUG : Portails & Portlets JavaBordeauxJUG : Portails & Portlets Java
BordeauxJUG : Portails & Portlets Java
Camblor Frédéric4.1K vistas
Présentation de JavaServer Faces por JS Bournival
Présentation de JavaServer FacesPrésentation de JavaServer Faces
Présentation de JavaServer Faces
JS Bournival1.9K vistas
cours-gratuit.com--id-12477.pdf por ssuser192642
cours-gratuit.com--id-12477.pdfcours-gratuit.com--id-12477.pdf
cours-gratuit.com--id-12477.pdf
ssuser19264225 vistas
Symfony2 - Un Framework PHP 5 Performant por Hugo Hamon
Symfony2 - Un Framework PHP 5 PerformantSymfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 Performant
Hugo Hamon3.1K vistas
20081113 - Nantes Jug - Apache Maven por Arnaud Héritier
20081113 - Nantes Jug - Apache Maven20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven
Arnaud Héritier1.2K vistas
Java Database Connectivity por Korteby Farouk
Java Database ConnectivityJava Database Connectivity
Java Database Connectivity
Korteby Farouk1.4K vistas
Fondamentaux d'architecture d'une application Flex por david deraedt
Fondamentaux d'architecture d'une application FlexFondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application Flex
david deraedt619 vistas
Fondamentaux d'architecture d'une application Flex por david deraedt
Fondamentaux d'architecture d'une application FlexFondamentaux d'architecture d'une application Flex
Fondamentaux d'architecture d'une application Flex
david deraedt1.7K vistas
Spring Meetup Paris - Back to the basics of Spring (Boot) por Eric SIBER
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 SIBER4.3K vistas

Más de Nathaniel Richand

Devenir une entreprise resiliente avec la permagilité por
Devenir une entreprise resiliente avec la permagilitéDevenir une entreprise resiliente avec la permagilité
Devenir une entreprise resiliente avec la permagilitéNathaniel Richand
190 vistas50 diapositivas
Proposition séminaire agile por
Proposition séminaire agileProposition séminaire agile
Proposition séminaire agileNathaniel Richand
420 vistas9 diapositivas
Permagilite por
PermagilitePermagilite
PermagiliteNathaniel Richand
2.9K vistas54 diapositivas
2017 brownbaglunch Kanban por
2017 brownbaglunch Kanban2017 brownbaglunch Kanban
2017 brownbaglunch KanbanNathaniel Richand
325 vistas25 diapositivas
Présentation Dashing por
Présentation DashingPrésentation Dashing
Présentation DashingNathaniel Richand
2.4K vistas12 diapositivas
Devenir une organisation apprenante dans l'IT en 2014 por
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
3.3K vistas42 diapositivas

Más de Nathaniel Richand(18)

Devenir une entreprise resiliente avec la permagilité por Nathaniel Richand
Devenir une entreprise resiliente avec la permagilitéDevenir une entreprise resiliente avec la permagilité
Devenir une entreprise resiliente avec la permagilité
Nathaniel Richand190 vistas
Devenir une organisation apprenante dans l'IT en 2014 por Nathaniel Richand
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
Nathaniel Richand3.3K vistas
2010 agile conférence - Comment vendre les tests automatisés por Nathaniel Richand
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
Nathaniel Richand1.5K vistas

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.