2

What are the practical advantaged/disadvantages in using SPRING.net (we are specifically considering to use the aspect of it that makes de-coupling easier) vs simply re-organizing your code in a way that makes de-coupling easy.

We are not against introducing third party tools but there has to be a clear benefit when doing so.

sarsnake
  • 26,667
  • 58
  • 180
  • 286

2 Answers2

6

IMO the overview on the Spring.NET website sums it up nicely:

Spring.NET provides comprehensive infrastructural support for developing enterprise .NET applications. It allows you to remove incidental complexity when using the base class libraries makes best practices, such as test driven development, easy practices.

The practical advantages I found are:

  • it guides me to building understandable, testable and maintainable software, by moving out almost all infrastructural code from my presentation and domain objects; I find that I can easily and reliably make changes to my code
  • it is non-obtrusive; gives you all the freedom you need

More on the advantages and disadvantages I found in this answer.

As duffymo states in his answer, I would never be able to "roll my own" application framework that comes even close to Spring.NET. I would never ever build an enterprise application in .NET without the use of an application framework such as Spring.NET or Castle.

Incorporating Spring.NET in your (Brownfield?) application is most certainly doable. I'd advice you to do it step-by-step and not try to use everything that the framework has to offer at once. So point out your problems (such as undesired coupling) and leverage that part of the framework that helps out (e.g. IoC).

Community
  • 1
  • 1
Marijn
  • 10,367
  • 5
  • 59
  • 80
5

Reorganizing code doesn't provide all the benefits that Spring.NET will give you:

  1. Inversion of Control (IoP)
  2. Aspect-oriented programming (AOP)
  3. Solid enterprise libraries that make persistence, transactions, web UI, services, etc. easier.

If all it took was rearranging a few classes there'd be no reason for Spring.

I think the biggest reason is the rigor they apply to design, implementation, and testing. The code they write is far better than anything I might roll on my own. I've found that my projects have benefitted a great deal from using Spring. My understanding and thinking has been influenced, too.

duffymo
  • 305,152
  • 44
  • 369
  • 561