Training

Course Outlines

Spring Framework for Java Developers

trainingDeveloping enterprise applications using a lightweight container is nowadays a current trend a lot of developers have adopted, due to its simplification and uncompromising capability. This course gives an introduction to the features of Spring framework, one of well known lightweight containers. While focusing on explaining the rationale behind the concept and implementation, the course also provides a number of exercises to demonstrate how to apply Spring to application development.

Description

Java has become a major platform for enterprise application. Many J2EE developers have learnt difficulties in using some J2EE technologies, e.g. EJB, in real world development. Lightweight container is an alternative to full scale J2EE solution. In contrast to J2EE components which rely on application servers, application developed for lightweight container does not need one; it rely on its container which is lightweight comparing toapplication servers.

Rod Johnson created Spring, as a lightweight container, based on codes from his book, Expert One-on-One J2EE Design and Development, published in 2002 by Wrox. Spring provides comparable services to those of J2EE technologies, including declarative transaction management and service look up. Moreover, Spring provides further features for development, e.g. AOP, integration with ORM, DAO abstraction, web MVC etc. In short,Spring simplifies development of Java applications, particularly enterprise ones, as it lets developers focus more on OO design,rather than implementation technology. This course is an entry point of Spring framework for Java developers without experience with Spring, IoC, or lightweight container. During the course, attendants will be introduced to how Spring works as well as how to apply Spring in application development.

Objectives

After this course attendants should be able to

  • Understand the basic concept and the features of Spring framework
  • Understand the concept of inversion of control in Spring
  • Understand Spring AOP
  • Understand Spring DAO for JDBC
  • Understand transaction management in Spring
  • Apply these concepts to application development

WHO SHOULD ATTEND ?

Java Developers

Prerequisite

  • Java Programming
  • Good understanding in Object-Oriented concept
  • Some experience in SQL and database

Duration

3 Days

Course style

Lecture and workshop

Course content

Day 1
Introduction to Spring Framework
  • Enterprise Application Development with Java
  • J2EE & Lightweight Container
  • Introduction to Spring
  • Spring Modules & Usage
Inversion of Control / Dependency Injection
  • Object-Oriented & Dependency Problems
  • Possible Solutions/Patterns
  • Discussion of Consequences
  • An Example of Sping IoC
Spring Core : Beans & BeanFactory
  • What is Bean?
  • What is BeanFactory?
  • Configuring XmlBeanFactory
  • Advanced Features (Bean Customization, Abstract Bean, Autowiring etc.)
  • Working with BeanFactory
  • FactoryBean
  • HierarchicalBeanFactory
Exercise 1
  • Configuring BeanFactory for Application
ApplicationContext
  • ApplicationContext & BeanFactory
  • ApplicationContext Features (MessageSource, Event Propagation etc.)
Advanced BeanFactory/ApplicationContext Topics
  • Using PropertyEditor
  • Custom PropertyEditor
  • Using BeanWrapper
Day 2
Spring AOP
  • Introduction to AOP
  • AOP in Spring
  • Pointcut Implementation
  • Advice Implementation
  • ProxyFactoryBean & AOP
  • Auto Proxy
  • Using TargetSource
Exercise 2
  • Using Proxy in Application
Spring DAO with JDBC
  • Introduction to Spring DAO
  • Features
  • Using JdbcTemplate
  • Modeling Operation as Objects
Exercise 3
  • Working with JDBC in Spring
Day 3
Transaction Management with Spring
  • Problem with Transaction
  • Configuring Transaction Manager
  • Using PlatformTransactionManager
  • Using TransactionTemplate
  • Declarative Transaction Management
Exercise 4
  • Configuring Declarative Transaction Management
Miscellaneous Topics
  • Spring and JMS, EJB, Remote Call, E-Mail, Scheduling, TDD, Web MVC, ORM