Posted on 2011-05-06
I was reading folowing lines and I did not understand clearly.
But at certain points, the process delegates to other collaborators to fill in
some implementation-specific details. This is the part of the process that is variable.
For example, the handling of luggage starts with a passenger checking in
the luggage at the counter. This part of the process always has to happen at the
beginning, so its sequence in the process is fixed. But each passenger’s luggage
check-in is different. The implementation of this process is determined by the
passenger. In software terms, a template method delegates the implementationspecific
portions of the process to an interface. Different implementations of this
interface define specific implementations of this portion of the process.
Spring applies this pattern to data access. No matter what technology we are
using, certain data access steps are required. For example, we always need to
obtain a connection to our data store and clean up resources when we are done.
These are the fixed steps in a data access process. But each data access implementation
we write is slightly different. We query for different objects and update the
data in different ways. These are the variable steps in a data access process.
Spring separates the fixed and variant parts of the data access process into
Any ideas, resources,sample code,links, highly appreciated. thanks in advance.