Integrating Spring 2.5 and Hibernate (Spring Emphasis)

| Dates: |
April 6-10, 2009 |
| Times: |
10am-5pm EST |
| Course Length: |
5 days |
| List Tuition (US): |
$2,400 |
| Special Rate (US): |
$1,900 |
Course Overview
The Spring framework is an application framework that provides a lightweight container that supports the creation of simple-to-complex components in a non-invasive fashion. Spring's flexibility and transparency is congruent and supportive of incremental development and testing. The framework's structure supports the layering of functionality such as persistence, transactions, view-oriented frameworks, and enterprise systems and capabilities. Spring's Aspect-Oriented Programming (AOP) framework enables developers to declaratively apply common features and capabilities across data types in a transparent fashion.
Spring makes J2EE development easier. Spring simplifies commons tasks and encourages good design based on programming to interfaces. Spring makes your application easier to configure and reduces the need for many J2EE design patterns. Spring puts the OO design back into your J2EE application, and it integrates nicely with JSF.
Hibernate is a powerful enabler that addresses object/relational persistence in the Java world. Hibernate offers all the advantages of developing in Java plus a comprehensive suite of capabilities for mapping object-oriented features to the relational model. This course tells you what you need to know to design and build your own Hibernate-enabled applications. You'll learn the details of the key Hibernate capabilities and how to leverage their strengths, with a special focus on using Hibernate with the Spring framework.
If you want to deliver an application using Hibernate within the Spring 2.5 framework, you'll find this course essential.
What You'll Learn
Working in a dynamic, lab-intensive hands-on coding environment students will learn to:
- Explain the issues associated with complex frameworks such as J2EE and how Spring addresses those issues
- Understand the relationships between Spring and J2EE, AOP, IOC, JDBC, Hibernate, JSF, Struts, JMS, and EJBs.
- Write applications that take advantage of the Spring container and the declarative nature of assembling simple components into applications.
- Work with Spring's support for transactions
- Explain how the issues associated with object persistence in a relational model are addressed by Hibernate
- Understand the relationships between SQL, Java, Spring, and Hibernate
- Write applications that take advantage of the Hibernate Persistence Manager.
- Map Java classes to relational tables.
- Capture both relational and inheritance associations in metadata using either XML or the Java 5 Annotations mechanism.
- Create and use mappings between Java classes and relational databases.
- Understand how identity and keys are handled in Hibernate.
- Understand the persistent object lifecycle and how that relates to transactions and concurrency.
- Understand how to use Hibernate within the Spring framework
Who Should Attend
This an intermediate level and beyond Java training course, designed for developers who need to understand how and when to use Hibernate in Spring applications.
Course Outline
Session: Introduction to the Spring 2.5 Framework
- Inversion of Control
- Dependency Injection
- Spring Overview
- Spring Application Architectures
- Spring Container
- Managing the Container
- Access to Services and Resources
- Application Contexts
- Beans as Components
- Beans and Factories
- XML Bean Configuration
- Bean Definition and Dependencies
- Bean Lifecycle
- Customization Options
- Post-Processors
- Property Editors
Session: Aspect-Oriented Programming
- AOP Concepts
- Aspect Defined
- Decoupling Through Aspects
- Code Generation Styles
- Cross-Cutting Concerns
- Spring's AOP Framework
- Advice and Weaving
- Proxies: Cost/Benefit
- Types of Advice
- Interceptor Chain
- Joinpoints and PointCuts
- Advisors
- Working with Proxies
- Annotations and AOP
- Aspects, Advice, and Pointcuts Using Annotation
- Introductions
- Introductions and Annotations
Session: Data Access
- Data Access Pattern
- Overview of Persistence Layer and Transactions
- Transaction Overview
- Spring Transactions
- Defining Spring Transactions
- Working with Demarcation
- Managing Spring Transactions
- Spring JDBC
- Spring JDBC Architecture
- Working with JDBC Template
- Database Operations
- Handling JDBC Exceptions
Session: Spring Views
- Spring/Web Framework Architecture
- Spring MVC (optional)
- Spring MVC Architecture
- Spring MVC Components
- Spring MVC Flow
- Dispatcher and Controllers
- Handlers and Mappings
- Interceptors
Session: Introduction to Hibernate
- ORM Mapping Issues
- Hibernate Architecture
- Persistence, Identity, and Equality in Hibernate
- Domain Models and Metadata Options
- Options for Representing Persistence
Session: Getting Started with Hibernate
- Basic Mapping
- Class/properties to Table/Columns
- Basic Configuration
- Mapping a POJO to a Database
- Syntax of mapping file
- Basics of Hibernate Session
- Working with Persisted Objects
Session: Basic ORM in Hibernate
- Configuring persistence
- Object Identity in Hibernate
- Generating Unique Keys
- Mapping Classes to Multiple Tables
Session: Value-Type Collections and Components
- Element Types
- Mapping Compositions
- Mapping Java Collections
- Bags and Dynamic Components
Session: Mapping Inheritance
- Strategies for Inheritance ORM
- Single, Class, and Concrete Table Patterns
- Discriminators
Session: Hibernate Annotations
- Working with Hibernate Annotations
- Annotation-Capable Sessions
- Annotations and Persistence
- Annotations, Mapping, and Relationships
Session: Working with Persistent Objects
- Transient, Persistent, and Detached
- Transitioning Between States
- Options for Retrieving Objects
- Attached and Detached States
- Update, Merge, and Cascade
Session: Querying for Objects
- Hibernate Query API
- Hibernate Query Language (HQL)
- HQL Syntax and Usage
- Criteria
Session: Spring and Hibernate
- Spring - Hibernate Support
- Session and Connection Management
- Hibernate DAOs
- Hibernate Template
|