Java EE Programming with Spring and Hibernate
Dates:
May 17-21, 2010
Time:
TBD
Instructor:
Matt Cherry
Location:
Dorsey Center, Elkridge, MD
Tuition:
The 5-day course costs $2395 per student and includes an extensive course notebook, a commercial Java textbook, exercises,
exercise solutions, breakfast, snacks, and lunch.
How to Register:
Submit Registration Form PDF version
(286 KB)
by fax at 410.579.8049, email a scanned
copy, or by USPS mail. If you register for more than one non-credit course during the Spring 2010 semester or send more than one student from the same organization,
enter "Multiple" as the discount code on the registration form PDF version
(286 KB)
and subtract $200 per person per course. Bonus: Register at least two weeks in advance and receive a $50 gift certificate from amazon.com.
Course Description
Java EE has made tremendous strides in recent years, but through it all few technologies can claim to have been as
influential as Hibernate and Spring. Both these frameworks have changed the playing field, making enterprise level applications simpler,
faster, and better designed. This course will expose students to new ways of approaching systems, levering concepts such as
object-relational mapping: made popular by Hibernate, and Dependency Injection: which is gaining major traction as the preferred way to
design flexible architectures through lightweight containers such as Spring. Learn how these technologies increase developer
productivity and promote well thought-out design by providing boilerplate infrastructure support of a system, allowing developers to
concentrate on what's really important: the business functionality of their code. Reinforced with real life applications and examples,
as well in-class exercises, this class leaves students ready to reap the benefits the moment they leave the classroom.
Prerequisites
The course consists of an approximately equal mixture of lecture and hands-on lab time and assumes that all students have strong Java and
OOP skills. It does not assume any previous exposure to Spring, Hibernate, or JPA.
Syllabus
Hibernate
The Need for Hibernate
- N-Tier application design
- Container vs. stand alone applications
- Refresher on traditional JDBC approach
- Hibernate installation and setup
Hibernate At a Quick Glance - A Simple Example
- Hibernate origin
- Hibernate design
- Simple but complete example
Association & Collection Mapping
- Realizing association relationships
- Mapping collections
Components & Inheritance Mapping
- Recognizing and implementing components
- Hibernate inheritance techniques
Object Lifecycle, Persistence and Session Management
- Object States
- CUD (no querying)
- Session Management
Executing Queries
- Binding Parameters
- Running Query
- Iterating through results
- Tuples/Scalar (Returning multiple object types vs. just simple data values)
- Externalizing Queries in mapping file
- Queries in Native SQL
HQL in Detail and Criteria Queries
- The Hibernate Query Language (HQL)
- Criteria Queries
Transaction Management
- Introduction to Transactions
- Optimistic concurrency control (version column)
- Pessimistic locking
- Connection release
Advanced Hibernate Features
- Batch processing
- 2nd Level Cache
- Fetching strategies
EJB 3.0 Compliance & Best Practices
- JPA
- Entity manager
- Annotations
- Best practices
Spring
Introduction to Inversion of Control and Aspect Oriented Programming
- Brief history/origin on Spring
- Design considerations used by Spring authors
- Discuss interface-driven development
- Overview of Spring architecture components
The Spring IoC Container
- Spring configuration
- Defining and instantiating beans
- Dependency Injection
- Bean scope, inheritance and relationships
- Lifecycle call backs
Aspects in Spring
- AOP Concepts
- Advice, Pointcuts and Aspects
- AspectJ Annotations
- XML configuration of Aspects
Data Access Integration with JDBC
- Data sources & connections
- JDBC Templates
- Batch Operations
Data Access Integration with ORM
- Hibernate Template
- JPA Template
- Walk through simple example from Hibernate lectures with Spring additions
Transaction Management
- Attributes of Transaction Management
- Declarative Transactions Management
- Programmatic Transaction Management
- Integration with Application servers
Remoting with Spring
- RMI
- EJBs
- JMS
- Web services
Spring MVC
- Dispatcher Servlet
- Controllers
- Handler Mappings
- Views, Locales, Themes
- Exception Handling
Spring MVC Integration with Other Presentation Technlogies
- JSP & JSTL
- Integration with Struts & Tiles
- Integration with JSF
Other Enterprise Framework Components
- Integration with scheduler components (Java Timer, Quartz)
- Thread Pool Management
- OXM (Object XML Mapping)
- Testing with Spring