SlideShare uma empresa Scribd logo
1 de 38
Introduction to Building Enterprise Web Application with Spring MVC By Abdelmonaim Remani abdelmonaim.remani@gmail.com Polymathic-coder.com Silicon Valley Code Camp v 4.0
Enterprise Application Complex Functional Requirements Non-Functional Requirements Execution Performance Reliability Security Evolution Testability Maintainability Extensibility Scalability (Horizontal and Vertical)
Modern Enterprise Application The Architecture N-Tier Application Presentation Layer Micro-Architecture (Commands, Valuators, etc..) MVC Pattern Service / Business Layer Data Access Layer Naked Objects Pattern Data Middleware Resource Lookup ,[object Object]
Implicit Invocation
Cross-Cutting ConcernsAspect Oriented Programming
Frameworks An Architecture A well defined structure to solve a problem Library Framework vs. Library Invoking you vs. Being Invoked Generic vs. Specific Tools Compiler, Debugger, Etc… Scaffolding and other utilities Etc…
Frameworks Heavyweight vs. Lightweight The need for a platform or a stack (JEE as an example) The ability to load in-demand the only the necessary components The memory footprint The build size Deployment ease Etc…
The Spring Framework
What is Spring? Application Framework Java Other Implementations are available (Spring .NET) Open-Source Lightweight POJO Based  By Rod Johnson Expert One-on-One J2EE Design and Development in, 2002 2EE without EJB, 2004 Becoming the De Facto Standard of Java Enterprise Applications
Features: Inversion Control The Problem Resource acquiring via Static method of a singleton factory Instantiation of an concrete class Directory Services API that allows for discorery and lookup (For example JNDI) Hard Dependencies are created Problems with reusing code with hard dependencies Painful Unit Testing in isolation
Features: Inversion Control ,[object Object],Use parameterized classes Dependencies are decoupled from classes By Coding against interfaces Inversion of Control: Dependency Injection The Hollywood Principle “Don't call us, we'll call you.“ Wait a minute this a lot of work! Spring to the rescue
The Tradeoff Resource injection is done at runtime Usually done using reflection No static type checking
Features: Agility If you read the Agile Manifesto, Agile is for the most part for a technical prospective Frequent deliverables Ability and ease of refactoring Decoupling , DRY, and TDD are key makes’em easier
Features: AOP OOP creates a hierarchical object model by nature Cross cutting concerns are not necessary part of the application logic Occur across the object model in unrelated parts Logging Security Transaction management Etc… AOP (Aspect Oriented Programming) Modularization of cross cutting concerns
Features: Libraries POJO Wrappers for most popular frameworks Allowing injection of dependencies into the standard implementation Struts JSF Apache Tapestry Etc… Full support of JEE Integration with other frameworks
Features: Other Source: http://www.developersbook.com/spring/images/SpringFrameworkModules.PNG
Spring Core
Spring Core All you need to know is: The Container The Bean Factory Manage bean instances (POJOs)’ life cycle Configuring their dependencies Etc… Can be used a partially compliant EJB3 Container Spring Pitchfork
Spring MVC
Spring MVC A Front Controller Pattern Dispatcher Request Routing Controllers are Spring beans (Managed POJOs) No session scope for scalability
Spring MVC Views JSP, JSF, Flex Controllers Many types Custom controllers Model Service Layer DAO for persistence JDBC and ORM (Hibernate, iBATIS, etc...)
Spring MVC Complements Spring Web Flow For Web Application that are More dynamic Non-linear without arbitrary end points Spring Portlet MVC A JSR 168 compliant Portlet environnent Large web application composed with subcomponents on the same web page
Spring SecurityFormally Known As Acegi
Code Time!
Spring Security (Acegi)
Security Terminology Authentication the verification of the user identity Authorization Permissions granted to the identified user Access Control By arbitrary conditions that may depend to  Attributes of clients Temporal and Local Condition Human User Detection Other Channel or Transport Security Encryption
Security Terminology Realm A Defined the authentication policy User A defined individual in the Application Server Group A defined classification of users by common traits in the Application Server. Role An abstract name of the permissions to access a particular set of resources in an application
Available Frameworks Spring Security Former Acegi JAAS (Java Authentication and Authorization Service) jGuard Apache Shiro
Spring Security Security is your responsibility Features: It is not the standard No class loader authorization capabilities Simple configuration Portable across containers Customizable and extendable Pluggable authentication and web request URI security Support method interception, Single Sign-On, and Swing clients
Authentication Authentication Form-Based Basic Digest LDAP NTLM (NT LAN Manager) SSO (Single Sign-On) JA-SIG CAS Open ID Atlassian Crowd SiteMinder X.509
Authentication Mechanisms Interact with the user Providers Check credentials Bundles details in a Thread Local security context holder Repositories Store roles and profile info In Memory JDBC LDAP Etc…
Authorization Web Authorization URL-Based Which URL patterns and HTTP methods are allowed to be accessed by which role The rules are top-down with most specific at the top Paths are in Ant format by default Method authorization Reusable Protocol Angostic Uses AOP Annotations Support JSR 250 Spring @Secured Spring Security 2.5 EL Support for Instance-based XML
Spring AOP
Cross Cutting Concerns Logging Transaction Management Security Cashing Some Business Logic Etc…
Aspect Oriented Programming The Problem Code Tangling No Cohesion Code Scattering Not DRY The Solution Aspect Oriented Programming AspectJ Modulation in Aspects and weaving into the application code
Spring APO Spring AOP Java based AOP Framework Built on top of AspectJ Interception based
AOP Terminology Joint Point A point in the execution of the program Point Cut An expression that selects one or more joint point AspectJ Expression Language Advice The code to be weaved at a joint point Aspect Point Cut + Advice
Types of Advices Annotations Before AfterReturning AfterThrowing After Around

Mais conteúdo relacionado

Mais procurados

Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Courseguest764934
 
Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Fahad Golra
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCJohn Lewis
 
eSobi Website Multilayered Architecture
eSobi Website Multilayered ArchitectureeSobi Website Multilayered Architecture
eSobi Website Multilayered ArchitectureAllan Huang
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
 
Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Edward Burns
 
Struts An Open-source Architecture for Web Applications
Struts An Open-source Architecture for Web ApplicationsStruts An Open-source Architecture for Web Applications
Struts An Open-source Architecture for Web Applicationselliando dias
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSFSoftServe
 
Struts & hibernate ppt
Struts & hibernate pptStruts & hibernate ppt
Struts & hibernate pptPankaj Patel
 
Struts & spring framework issues
Struts & spring framework issuesStruts & spring framework issues
Struts & spring framework issuesPrashant Seth
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depthVinay Kumar
 
TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6Lokesh Singrol
 
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF PresentationGaurav Dighe
 

Mais procurados (20)

Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course
 
Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)
 
Struts course material
Struts course materialStruts course material
Struts course material
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVC
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
 
eSobi Website Multilayered Architecture
eSobi Website Multilayered ArchitectureeSobi Website Multilayered Architecture
eSobi Website Multilayered Architecture
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
TY.BSc.IT Java QB U5
TY.BSc.IT Java QB U5TY.BSc.IT Java QB U5
TY.BSc.IT Java QB U5
 
Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013
 
Struts An Open-source Architecture for Web Applications
Struts An Open-source Architecture for Web ApplicationsStruts An Open-source Architecture for Web Applications
Struts An Open-source Architecture for Web Applications
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
 
Struts & hibernate ppt
Struts & hibernate pptStruts & hibernate ppt
Struts & hibernate ppt
 
Struts & spring framework issues
Struts & spring framework issuesStruts & spring framework issues
Struts & spring framework issues
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF Presentation
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 

Destaque

Restructuring a Web Application, Using Spring and Hibernate
Restructuring a Web Application, Using Spring and HibernateRestructuring a Web Application, Using Spring and Hibernate
Restructuring a Web Application, Using Spring and Hibernategustavoeliano
 
Trustparency web doc spring 2.5 & hibernate
Trustparency web doc   spring 2.5 & hibernateTrustparency web doc   spring 2.5 & hibernate
Trustparency web doc spring 2.5 & hibernatetrustparency
 
Web Application Architecture
Web Application ArchitectureWeb Application Architecture
Web Application ArchitecturePhilip
 
Web application architecture
Web application architectureWeb application architecture
Web application architectureJoshua Eckblad
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web ToolkitDidier Girard
 
86535551 ciclo-de-vida-jsf
86535551 ciclo-de-vida-jsf86535551 ciclo-de-vida-jsf
86535551 ciclo-de-vida-jsfpablo lopez
 
Java scalability considerations yogesh deshpande
Java scalability considerations   yogesh deshpandeJava scalability considerations   yogesh deshpande
Java scalability considerations yogesh deshpandeIndicThreads
 
Pervasive Web Application Architecture
Pervasive Web Application ArchitecturePervasive Web Application Architecture
Pervasive Web Application ArchitectureUC San Diego
 
Top 10 HTML5 frameworks for effective development in 2016
Top 10 HTML5 frameworks for effective development in 2016Top 10 HTML5 frameworks for effective development in 2016
Top 10 HTML5 frameworks for effective development in 2016iMOBDEV Technologies Pvt. Ltd.
 
Delivering HTML5 and Modern Apps
Delivering HTML5 and Modern AppsDelivering HTML5 and Modern Apps
Delivering HTML5 and Modern AppsJoshua Drew
 
Building modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and javaBuilding modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and javaAlexander Gyoshev
 
Modern Web App Architectures
Modern Web App ArchitecturesModern Web App Architectures
Modern Web App ArchitecturesRaphael Stary
 
Web Development Technologies
Web Development TechnologiesWeb Development Technologies
Web Development TechnologiesVignesh Prajapati
 
Structuring web applications with Backbone.js
Structuring web applications with Backbone.jsStructuring web applications with Backbone.js
Structuring web applications with Backbone.jsDiego Cardozo
 
Writing HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAEWriting HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAERon Reiter
 
How to-choose-the-right-technology-architecture-for-your-mobile-application
How to-choose-the-right-technology-architecture-for-your-mobile-applicationHow to-choose-the-right-technology-architecture-for-your-mobile-application
How to-choose-the-right-technology-architecture-for-your-mobile-applicationlverb
 
Quick Application Development with Web Frameworks
Quick Application Development with Web FrameworksQuick Application Development with Web Frameworks
Quick Application Development with Web FrameworksStratepedia Presentations
 

Destaque (20)

Restructuring a Web Application, Using Spring and Hibernate
Restructuring a Web Application, Using Spring and HibernateRestructuring a Web Application, Using Spring and Hibernate
Restructuring a Web Application, Using Spring and Hibernate
 
Trustparency web doc spring 2.5 & hibernate
Trustparency web doc   spring 2.5 & hibernateTrustparency web doc   spring 2.5 & hibernate
Trustparency web doc spring 2.5 & hibernate
 
Web Application Architecture
Web Application ArchitectureWeb Application Architecture
Web Application Architecture
 
Web application architecture
Web application architectureWeb application architecture
Web application architecture
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web Toolkit
 
86535551 ciclo-de-vida-jsf
86535551 ciclo-de-vida-jsf86535551 ciclo-de-vida-jsf
86535551 ciclo-de-vida-jsf
 
Java scalability considerations yogesh deshpande
Java scalability considerations   yogesh deshpandeJava scalability considerations   yogesh deshpande
Java scalability considerations yogesh deshpande
 
Pervasive Web Application Architecture
Pervasive Web Application ArchitecturePervasive Web Application Architecture
Pervasive Web Application Architecture
 
Top 10 HTML5 frameworks for effective development in 2016
Top 10 HTML5 frameworks for effective development in 2016Top 10 HTML5 frameworks for effective development in 2016
Top 10 HTML5 frameworks for effective development in 2016
 
Delivering HTML5 and Modern Apps
Delivering HTML5 and Modern AppsDelivering HTML5 and Modern Apps
Delivering HTML5 and Modern Apps
 
Building modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and javaBuilding modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and java
 
Modern Web App Architectures
Modern Web App ArchitecturesModern Web App Architectures
Modern Web App Architectures
 
Web app architecture
Web app architectureWeb app architecture
Web app architecture
 
Web Development Technologies
Web Development TechnologiesWeb Development Technologies
Web Development Technologies
 
Structuring web applications with Backbone.js
Structuring web applications with Backbone.jsStructuring web applications with Backbone.js
Structuring web applications with Backbone.js
 
Writing HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAEWriting HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAE
 
How to-choose-the-right-technology-architecture-for-your-mobile-application
How to-choose-the-right-technology-architecture-for-your-mobile-applicationHow to-choose-the-right-technology-architecture-for-your-mobile-application
How to-choose-the-right-technology-architecture-for-your-mobile-application
 
Ning presentation
Ning presentationNing presentation
Ning presentation
 
Quick Application Development with Web Frameworks
Quick Application Development with Web FrameworksQuick Application Development with Web Frameworks
Quick Application Development with Web Frameworks
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
 

Semelhante a Introduction To Building Enterprise Web Application With Spring Mvc

Complete java syllabus 7448062045 Yesdo Sddd
Complete java syllabus 7448062045 Yesdo SdddComplete java syllabus 7448062045 Yesdo Sddd
Complete java syllabus 7448062045 Yesdo SdddYesdo Softindia Pvt Ltd
 
Spring framework
Spring frameworkSpring framework
Spring frameworksrmelody
 
Framework adoption for java enterprise application development
Framework adoption for java enterprise application developmentFramework adoption for java enterprise application development
Framework adoption for java enterprise application developmentClarence Ho
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2javatrainingonline
 
Security As A Service
Security As A ServiceSecurity As A Service
Security As A Serviceguest536dd0e
 
Introduction to Spring sec1.pptx
Introduction to Spring sec1.pptxIntroduction to Spring sec1.pptx
Introduction to Spring sec1.pptxNourhanTarek23
 
Java Online Training @monstercourses
Java Online Training @monstercoursesJava Online Training @monstercourses
Java Online Training @monstercoursesRamchander Marathi
 
Spring tutorials
Spring tutorialsSpring tutorials
Spring tutorialsTIB Academy
 
Stucorner dot-net-training-syllabus
Stucorner dot-net-training-syllabusStucorner dot-net-training-syllabus
Stucorner dot-net-training-syllabusSTUCORNER technology
 
Spring_Course_Content
Spring_Course_ContentSpring_Course_Content
Spring_Course_ContentMV Solutions
 

Semelhante a Introduction To Building Enterprise Web Application With Spring Mvc (20)

Java Security Framework's
Java Security Framework'sJava Security Framework's
Java Security Framework's
 
Complete java syllabus 7448062045 Yesdo Sddd
Complete java syllabus 7448062045 Yesdo SdddComplete java syllabus 7448062045 Yesdo Sddd
Complete java syllabus 7448062045 Yesdo Sddd
 
soa1.ppt
soa1.pptsoa1.ppt
soa1.ppt
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Framework adoption for java enterprise application development
Framework adoption for java enterprise application developmentFramework adoption for java enterprise application development
Framework adoption for java enterprise application development
 
Php Web Frameworks
Php Web FrameworksPhp Web Frameworks
Php Web Frameworks
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2
 
Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2
 
Security As A Service
Security As A ServiceSecurity As A Service
Security As A Service
 
Introduction to Spring sec1.pptx
Introduction to Spring sec1.pptxIntroduction to Spring sec1.pptx
Introduction to Spring sec1.pptx
 
Java online training
Java online trainingJava online training
Java online training
 
Java Online Training @monstercourses
Java Online Training @monstercoursesJava Online Training @monstercourses
Java Online Training @monstercourses
 
Managing the cloud
Managing the cloudManaging the cloud
Managing the cloud
 
Spring tutorials
Spring tutorialsSpring tutorials
Spring tutorials
 
Stucorner dot-net-training-syllabus
Stucorner dot-net-training-syllabusStucorner dot-net-training-syllabus
Stucorner dot-net-training-syllabus
 
Spring Framework Rohit
Spring Framework RohitSpring Framework Rohit
Spring Framework Rohit
 
Spring_Course_Content
Spring_Course_ContentSpring_Course_Content
Spring_Course_Content
 

Mais de Abdelmonaim Remani

The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling SoftwareAbdelmonaim Remani
 
The Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot PersistenceThe Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot PersistenceAbdelmonaim Remani
 
The Art of Metaprogramming in Java
The Art of Metaprogramming in Java  The Art of Metaprogramming in Java
The Art of Metaprogramming in Java Abdelmonaim Remani
 
Introduction To Rich Internet Applications
Introduction To Rich Internet ApplicationsIntroduction To Rich Internet Applications
Introduction To Rich Internet ApplicationsAbdelmonaim Remani
 

Mais de Abdelmonaim Remani (7)

The Eschatology of Java
The Eschatology of JavaThe Eschatology of Java
The Eschatology of Java
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
 
How RESTful Is Your REST?
How RESTful Is Your REST?How RESTful Is Your REST?
How RESTful Is Your REST?
 
The Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot PersistenceThe Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot Persistence
 
The Art of Metaprogramming in Java
The Art of Metaprogramming in Java  The Art of Metaprogramming in Java
The Art of Metaprogramming in Java
 
Le Tour de xUnit
Le Tour de xUnitLe Tour de xUnit
Le Tour de xUnit
 
Introduction To Rich Internet Applications
Introduction To Rich Internet ApplicationsIntroduction To Rich Internet Applications
Introduction To Rich Internet Applications
 

Introduction To Building Enterprise Web Application With Spring Mvc

  • 1. Introduction to Building Enterprise Web Application with Spring MVC By Abdelmonaim Remani abdelmonaim.remani@gmail.com Polymathic-coder.com Silicon Valley Code Camp v 4.0
  • 2. Enterprise Application Complex Functional Requirements Non-Functional Requirements Execution Performance Reliability Security Evolution Testability Maintainability Extensibility Scalability (Horizontal and Vertical)
  • 3.
  • 6. Frameworks An Architecture A well defined structure to solve a problem Library Framework vs. Library Invoking you vs. Being Invoked Generic vs. Specific Tools Compiler, Debugger, Etc… Scaffolding and other utilities Etc…
  • 7. Frameworks Heavyweight vs. Lightweight The need for a platform or a stack (JEE as an example) The ability to load in-demand the only the necessary components The memory footprint The build size Deployment ease Etc…
  • 9. What is Spring? Application Framework Java Other Implementations are available (Spring .NET) Open-Source Lightweight POJO Based By Rod Johnson Expert One-on-One J2EE Design and Development in, 2002 2EE without EJB, 2004 Becoming the De Facto Standard of Java Enterprise Applications
  • 10. Features: Inversion Control The Problem Resource acquiring via Static method of a singleton factory Instantiation of an concrete class Directory Services API that allows for discorery and lookup (For example JNDI) Hard Dependencies are created Problems with reusing code with hard dependencies Painful Unit Testing in isolation
  • 11.
  • 12. The Tradeoff Resource injection is done at runtime Usually done using reflection No static type checking
  • 13. Features: Agility If you read the Agile Manifesto, Agile is for the most part for a technical prospective Frequent deliverables Ability and ease of refactoring Decoupling , DRY, and TDD are key makes’em easier
  • 14. Features: AOP OOP creates a hierarchical object model by nature Cross cutting concerns are not necessary part of the application logic Occur across the object model in unrelated parts Logging Security Transaction management Etc… AOP (Aspect Oriented Programming) Modularization of cross cutting concerns
  • 15. Features: Libraries POJO Wrappers for most popular frameworks Allowing injection of dependencies into the standard implementation Struts JSF Apache Tapestry Etc… Full support of JEE Integration with other frameworks
  • 16. Features: Other Source: http://www.developersbook.com/spring/images/SpringFrameworkModules.PNG
  • 18. Spring Core All you need to know is: The Container The Bean Factory Manage bean instances (POJOs)’ life cycle Configuring their dependencies Etc… Can be used a partially compliant EJB3 Container Spring Pitchfork
  • 20. Spring MVC A Front Controller Pattern Dispatcher Request Routing Controllers are Spring beans (Managed POJOs) No session scope for scalability
  • 21. Spring MVC Views JSP, JSF, Flex Controllers Many types Custom controllers Model Service Layer DAO for persistence JDBC and ORM (Hibernate, iBATIS, etc...)
  • 22. Spring MVC Complements Spring Web Flow For Web Application that are More dynamic Non-linear without arbitrary end points Spring Portlet MVC A JSR 168 compliant Portlet environnent Large web application composed with subcomponents on the same web page
  • 26. Security Terminology Authentication the verification of the user identity Authorization Permissions granted to the identified user Access Control By arbitrary conditions that may depend to Attributes of clients Temporal and Local Condition Human User Detection Other Channel or Transport Security Encryption
  • 27. Security Terminology Realm A Defined the authentication policy User A defined individual in the Application Server Group A defined classification of users by common traits in the Application Server. Role An abstract name of the permissions to access a particular set of resources in an application
  • 28. Available Frameworks Spring Security Former Acegi JAAS (Java Authentication and Authorization Service) jGuard Apache Shiro
  • 29. Spring Security Security is your responsibility Features: It is not the standard No class loader authorization capabilities Simple configuration Portable across containers Customizable and extendable Pluggable authentication and web request URI security Support method interception, Single Sign-On, and Swing clients
  • 30. Authentication Authentication Form-Based Basic Digest LDAP NTLM (NT LAN Manager) SSO (Single Sign-On) JA-SIG CAS Open ID Atlassian Crowd SiteMinder X.509
  • 31. Authentication Mechanisms Interact with the user Providers Check credentials Bundles details in a Thread Local security context holder Repositories Store roles and profile info In Memory JDBC LDAP Etc…
  • 32. Authorization Web Authorization URL-Based Which URL patterns and HTTP methods are allowed to be accessed by which role The rules are top-down with most specific at the top Paths are in Ant format by default Method authorization Reusable Protocol Angostic Uses AOP Annotations Support JSR 250 Spring @Secured Spring Security 2.5 EL Support for Instance-based XML
  • 34. Cross Cutting Concerns Logging Transaction Management Security Cashing Some Business Logic Etc…
  • 35. Aspect Oriented Programming The Problem Code Tangling No Cohesion Code Scattering Not DRY The Solution Aspect Oriented Programming AspectJ Modulation in Aspects and weaving into the application code
  • 36. Spring APO Spring AOP Java based AOP Framework Built on top of AspectJ Interception based
  • 37. AOP Terminology Joint Point A point in the execution of the program Point Cut An expression that selects one or more joint point AspectJ Expression Language Advice The code to be weaved at a joint point Aspect Point Cut + Advice
  • 38. Types of Advices Annotations Before AfterReturning AfterThrowing After Around
  • 39. Q & A