Search This Blog

Monday, February 26, 2007

Core Spring training experience

The training was given by Arjen Poutsma. Arjen works for Interface21 and is the lead developer of the Spring-WS sub project.

Day 1, 20 february 2007

Day 1 is all about the core concepts of the Spring framework like Inversion of Control and Dependency Injection. IOC and DI are essential parts to understanding Spring's architecture. Besides some basic subjects about IOC and DI there were also advanced concepts that were given attention: autowiring, life cycle callbacks, property editors, factory beans, post processors etc. The Lab's in day 1 were all about configuring application contexts. However there was also a bonus section which programmatically used AOP via ProxyFactory(s) with dynamic TargetSource(s).

If you already know Spring than the subjects in day 1 are familiar.

Day 2, 21 february 2007

Day 2 was all about effective middle tier architecture with Spring. Subjects that got attention were:

  • Persistence with Spring JDBC and ORM tools
  • Data Access Objects with Spring
  • Brief introduction about transaction management
  • Test Driven Development with Spring
  • Introduction to AOP
  • Advanced data access concepts such as: batch updates, blob handling and stored procedures.

The labs were about using Spring in conjunction with Hibernate and using Spring utilities for creating integration tests.

Day 3, 22 february 2007

After a brief introduction about transaction management in day 2, this day continued with the more advanced topics about transaction management. Specifically:

  • local versus global transactions
  • declarative versus programmatic
  • transaction propagation
  • isolation levels

The rest of the day was about Spring-MVC including several labs covering handler mappings, input forms and interceptors.

The last subject for this day was an introduction about Acegi security system for Spring.

Day 4, 23 february 2007

For me, day 4 was most interesting. This was mainly because AOP got in depth-attention. Arjen focused on Spring 2's support for AOP with Spring and AspectJ. Some advanced concepts such as introductions also got attention.

The remainder of the day was used to tell something about Spring's support for JMX and remoting. Arjens's project Spring-WS got little attention. The main point about Spring-WS is that it promotes contract-first development.

Things to remember

  • Spring 2.1 will not be compatible anymore with JDK 1.3
  • The upcoming new version of Spring IDE will support dependency listing for aspects build with Spring-AOP. With this feature you can view all aspects that are applied to a particular class.
  • Migrating from Spring-AOP to AspectJ is easier when using the @Aspect annotations in Java classes rather than using XML to configure aspects. This is because AspectJ understands these annotations.


Although I had experience with Spring before taking this training, I am glad I took it. A lot of concepts used in Spring were covered in detail. I can recommend this training to anyone who would like to gain more in depth knowledge of the Spring framework.

When taking this training, I found it very helpful to have knowledge about enterprise application patterns, transactions, J2EE, TDD, DDD, Hibernate etc.

Monday, February 19, 2007

Core Spring training

This week I am happy to attend the Core Spring training in Amsterdam given by Interface21. The Core Spring training is a full 4 day training covering all aspects on Spring from IOC and dependency injection to Spring MVC and testing with Spring. This week I will post my day-to-day experiences on this training. More information on this training can be found at:

Friday, February 16, 2007

Service contracts

XML is a common format for message exchange in Service Oriented Architectures. One of the most important things is to formalize the messages exchanged between systems. This can be done using XML schema definitions. XML schema defines the rules to which a XML message must conform when it is constructed. A well defined schema brings the following advantages:
  1. Validate messages when they are constructed and thus before they are sent.
  2. Generate Java classes from the XML schema for use in XML binding frameworks.
  3. Easily construct mock XML messages with a tool like XMLSpy for use in (unit)tests or mock implementations of services.

With “well defined schema” I mean a schema definition which is constructed before the actual service is implemented so every element in the schema is well thought out. Another example: when some element’s value is an enumeration of some values, define this in the schema definition and not in a separate document (I,ve seen it happen). This way you restrict the values an element can contain and it becomes much easier to construct mock XML messages for testing purposes.

The bottom line is: invest in the construction of well thought out service contracts.

A good reference for designing XML schema definitions can be found here.

Starting up...

Finally created my Blog today to post my ideas, thoughts and experiences about Enterprise Java development. Although Java is the primary field of interest, it is not the only field of interest. For example, I will also post my latest experiences with Adobe Flex to build highly interactive user interfaces on top of Java backends. I Already can say that I am very impressed. But more on that in one of my next posts.

The only thing for now I would like to say is: Happy reading!