We heard some interesting comments about spring yesterday. Some people were not into the configuration in xml which is something i have heard before and agree with. Reading the pro spring book I noticed that they recommened never using auto wiring because of the fact that for example you may be tempted to configure by type and then need two instances of the same type with different configs.
So the argument goes something like… I have one class which is configured with different services and this is what spring allows me to do. The class i have designed doesn’t need to know about which supporting services it is injected with as long as they support a common interface.
This is a bit like a strategy pattern.
The flip side is that is what I’m really doing moving some of my domain representation into the configuration ?
The example we were discussing was a setup where there were several spring configuration files which all included a common file which was a bit like an interface. It defined a set of beans which were needed and the specific instances of these were defined in the local files.
Is this trying to represent inheritance and overloading in xml ?
Should this be represented in the domain model ?
