Zoom Outline PDF View  or  Email Back to Schedule for New York


The Spring Framework




SUMMARY:   This course enables the experienced Java developer to use the Spring Application Framework to create simple and complex Web applications. Spring is a far-reaching framework that aims to facilitate all sorts of Java development, including every level of multi-tier distributed systems. Here we focus on the Core and MVC modules, with a lighter (but not dismissive) touch on persistence through DAO and ORM modules.
The Core module gives the developer declarative control over object creation and assembly; this is useful for any tier of any Java application. So is Spring's validation framework, and so we study these things in a mix of standalone (J2SE) applications and Web applications deployed to the Tomcat server/container. Then students build Web applications that use the Spring MVC framework to rationalize their designs into coherent request/response cycles. They use Spring command objects to manage HTML forms and their data, and connect these to the validation framework. We connect our applications to persistent stores and study the DAO and ORM modules, to better understand JDBC and Hibernate persistence models and declarative transaction control.

PREREQUISITES:  
  • Java programming
  • Servlets programming
  • JSP programming
  • Basic knowledge of XML

DURATION:   3 Days

* For less experienced Java programmers who nonetheless meet the stated prerequisites, a 4-day timeline may be appropriate, to give some background on Java web applications and some breathing room around the later lab exercises.

OBJECTIVES:  
  • Understand the scope, purpose, and architecture of Spring
  • Use Spring's Inversion of Control to declare application components, rather than hard-coding their states and lifecycles
  • Use Dependency Injection to further control object relationships from outside the Java code base
  • Create validators for business objects, and associate them for application-level and unit-testing uses
  • Build a Web application as a Spring DispatcherServlet and associated application context, with declared beans acting as controllers, command objects, and view resolvers
  • Build and manage HTML forms with Spring command objects and custom tags
  • Use Spring interceptors to implement horizontal features in the Web application
  • Connect business objects to persistent stores using Spring's DAO and ORM modules

COURSE CONTENT:  
  1. Overview
    • Web Applications
    • J2EE: The Good, The Bad, and the Ugly
    • Enter the Framework
    • Spring Modules
    • Controlling Object Creation
    • Web Applications
    • Persistence Support
    • Aspect-Oriented Programming
    • Integrating Other Frameworks
  2. Core Techniques
    • Component-Based Software
    • JavaBeans, Reconsidered
    • The Factory Pattern
    • Inversion of Control
    • XML View: Declaring Beans
    • Java View: Using Beans
    • Singletons and Prototypes
    • Initializing Bean State
  3. The Business Tier
    • Complex Systems
    • Assembling Object Graphs
    • Dependency Injection
    • Single and Multiple Relationships
    • Autowiring
    • Bean Aliases
    • Order of Instantiation
    • Validation
    • Nested Properties
  4. The Web Tier
    • Servlets and JSPs: What's Missing
    • The MVC Pattern
    • The Front Controller Pattern
    • DispatcherServlet
    • A Request/Response Cycle
    • The Strategy Pattern
    • JavaBeans as Web Components
    • Web Application Contexts
    • Handler Mappings
    • "Creating" a Model
    • View Resolvers
  5. Controllers and Commands
    • Working with Forms
    • Command Objects
    • The Template Method Pattern
    • Command Controllers
    • Data Binding
    • MultiActionController
    • Scope and Granularity of Command Objects
  6. Working with Forms
    • Property Editors
    • Validating Form Input
    • Form Controllers
    • AbstractFormController
    • SimpleFormController
    • Spring Custom Tags
    • <form:form> and Friends
    • <form:errors>
    • Reporting Errors
  7. Refining the Handling Cycle
    • The Intercepting Filter Pattern
    • Exception Handling
    • Interceptors
    • The Decorator Pattern
    • Context and Lifecycle
    • Awareness Interfaces
    • Support and Utility Classes
    • "Death By XML"
  8. The Persistence Tier
    • The DAO Pattern
    • The DaoSupport Hierarchy
    • The DataAccessException Hierarchy
    • JDBC DAOs
    • JdbcTemplate and RowMapper
    • Object/Relational Mapping
    • Hibernate DAOs
    • Transaction Control
    • AOP vs. Annotations



    WM/07

© 2007 Verhoef Training, Inc.

Schedule Dates

Course offered as
Inhouse or Public

Date Location State










Copyright © 2007 - Verhoef Group of Companies - All Rights Reserved