- Tel: +44 (0)1275 859666
EC70 - Spring Framework Programming Workshop - 3 Days
Course Description
This course is targeted at application developers, already familiar with JAVA programming, looking to gain a knowledge of coding using the Spring Framework. During the course the student will write production quality examples that utilise many of the features the Spring Framework has to offer.
Pre-requisites
The student should be familiar with Java Programming. They should have a good understanding of the basic Java language and the more commonly used Java API classes. This knowledge can be gained by attending courses EC21 and EC22. Further practical experience is beneficial but not required.
Objectives
his course enables experienced Java developers to use the Spring Application Framework.
The first two days focus on the core features, namely Inversion of Control and Aspect Oriented Programming. The third day is an optional component containing the database access features of Spring, this can be one of the following, or omitted entirely making this a 2 day course:
Spring JDBC
Spring with Hibernate
Spring with iBATIS
During the course the student will write production quality applications to ensure that the subject is fully understood and practical experience is gained.
On completion of this course the student will be able to:
- understand the benefits of using Spring
- test application code with and without Spring
- understand the principles of Inversion of Control and Aspect Oriented Programming
- use Spring to replace commonly used EJB features
- manage transactions in Spring declaratively and programmatically
- use aspect-oriented programming to handle cross-cutting requirements
- connect business objects to persistent stores using Spring's DAO and ORM modules (optional 3rd day)
Environment
Development will be performed using:
- Eclipse
- IntelliJ
- NetBeans
- JBuilder
Customisation
For on-site courses (i.e. at your premises), we are more than happy to tailor the course agenda to suit your exact requirements. In many cases, we are able to build your in-house standards and naming conventions into the delivered course.
Course Details
- INTRODUCTION TO SPRING
- What Is Included With Spring?
- Inversion Of Control And Dependency Injection
- Dependency Lookup
- Dependency Injection
- Simple Spring DI Example
- Aspect Oriented Programming
- Simple Spring AOP Example
- Data Access With Spring
- Other Data Access Tools
- Inversion Of Control And Dependency Injection
- DEPENDENCY INJECTION AND BEAN FACTORIES
- Creating A Spring Container
- Bean Configuration
- Setter Injection
- Injecting Values
- Spring 2.0 Property Injection
- Constructor Injection
- Constructor Issues: Using Index And Type Attributes
- Injecting Collections
- Injecting Maps
- Injecting Lists
- Injecting Properties
- Injecting Sets
- Spring 2.0 Collections
- Bean Scopes
- Singletons
- Prototypes
- Singleton Beans With Prototype-Bean Dependencies
- Factory Methods
- Static Factory Methods
- Instance Factory Methods
- Factory Beans
- When Would You Use Factorybeans?
- Bean Inheritance
- Inner Beans
- Bean Naming
- Bean Naming Aliases
- Bean Aliasing
- Importing Configuration Files
- Spring 2.0 Utilities
- Bean Configuration
- OTHER IOC FEATURES
- Application Context
- Beanfactory Or ApplicationContext?
- Using The ApplicationContext
- Creating An ApplicationContext From Multiple Files
- Bean Lifecycle
- Initialisation
- Destruction
- Method Injection
- BeanFactoryAware
- Property Editors
- Custom Property Editors
- Beanfactory Or ApplicationContext?
- ASPECT ORIENTED PROGRAMMING
- Introduction To AOP
- Terminology
- Join Point
- Pointcut
- Advice
- Aspects
- How Aspects Are Applied In Spring (with and without annotations)
- Using Joinpoint Context
- Context Selecting Pointcuts
- Defining Pointcuts
- Pointcuts With Annotations
- Pointcut Chaining
- Declaring Advice
- Before Advice
- AfterReturning Advice
- AfterThrowing Advice
- After Advice
- Around Advice
- Terminology
- SPRING DATABASE ACCESS INTRODUCTION
- Resource Management
- Spring Support
- Configuration Of Layers
- Spring Support
- SPRING JDBC DATABASE ACCESS
- JDBC Vs Spring JDBC
- Exceptions
- Connections And Datasources
- JdbcTemplate
- JdbcDaoSupport
- SimpleJdbcDaoSupport
- Querying For Objects
- Single Row Queries
- Multiple Row Queries
- Object Queries And Java 5 (Spring 2.0)
- Joins And The ResultsetExtractor
- Calling Stored Procedures
- Updating
- Batch Updates
- Exceptions
- SPRING HIBERNATE DATABASE ACCESS
- Introduction To Hibernate
- Configuring Hibernate
- Mapping Files
- Simple Mapping Example
- Key Generation
- One-To-Many Mappings
- Many-To-Many Mappings
- A More Complex Many-To-Many Example
- Writing Hibernate DAOs
- Hibernate Query Language (HQL)
- Using Annotations With Hibernate
- Configuring Hibernate
- TRANSACTION MANAGEMENT
- Declarative Transactions
- Spring Configuration For Declarative Transactions
- XML Based Spring Transactions
- Platform Transaction Manager
- Programmatic Transaction Management
- Isolation Levels
- Transaction Propagation
- Spring Configuration For Declarative Transactions
Course Format
Practical sessions make up a large part of the course, allowing delegates to demonstrate and reinforce the lectures given.
Examples are used extensively, ranging from simple code 'snippets' to full applications with complete 'real world' functionality. These are supplied at the start of the course and it is encouraged that the delegates execute and 'experiment' with these under the instructor's guidance as they are introduced.
These examples are available to take away, along with the delegate's own work.
The comprehensive Student Guide supplied is fully indexed serving as a useful reference tool long after the course has finished. Delegates will also be able to access a free help-line with technical questions relating to topics covered on the course.