tags:

views:

473

answers:

4

"Spring.NET is an open source application framework that makes building enterprise .NET applications easier." Springframework

They say that Spring makes .Net development easier. Then I see the manual which is long as anything. Chapter 5. The IoC container

And then I see some mysterious stack trace errors when I run a project that has Spring. How is Spring making my life easier, when everything is so hard?

Edit: The errors come when I run the project, not when I compile like I first wrote. I understand that Enterprise applications need more complex frameworks than normal applications. But they shouldn't be complicated even in that case. I mean, if I want to write some logic, I shouldn't need to go through lots of other stuff.

Edit: I don't have a choice but use Spring, if I start using an existing project that has it.

+2  A: 
  • It provides an IoC container. Yes, using that to its full requires reading quite a lot. The same is true of almost any powerful tool. If you're going to use LINQ, that needs some study too - does that make LINQ useless in your view?
  • It provides useful utility classes for various things. Often these are things you might roll yourself in other circumstances.

Now, as for why you're getting mysterious stack trace errors when compiling a project which uses Spring.NET... that sounds very odd. We'd need to hear more about the errors to know what's going on.

Jon Skeet
"It provides an IoC container" but compared to some other IoC Containers, it can be a real pain. The config is almost always in app.config not in code, making it easy to get wrong and hard to change on the fly.
Anthony
+1  A: 

If you don't understand, you might ought not use spring.....

But Spring.NET is a good framework. It is more than IoC, alot more.... If you don't understand dependency injection/IOC or Aspect Oriented Concepts, spring may not do too much for you and you might as well stick to service locator type things and explicit try/catch blocks all over your code....

DanielHonig
Castle.Windsor has AOP too, and I think that Microsoft Unity does too. Why is Spring "A good framework" compared to them?
Anthony
+9  A: 

Note that it says it makes enterprise .net applications easier. Enterprise applications are not really the same as normal applications. They are very large scale applications, requiring designing around massive scalability, portability and extremely flexible configuration. Frameworks that simplify this process are still going to be difficult to use, but are less difficult and more reliable than doing all of that work from scratch.

I would be dubious of using an enterprise framework in a 'normal' project though, as it is most likely extremely overengineered for non-enterprise requirements and could end up being more difficult than coding from scratch in that circumstance.

workmad3
A: 

I agree with you that it has some learning curve, but that alone should not discourage anybody from learning this really awesome tool.

Shiva
I'll ask what I asked on the others: What makes Spring.Net "really awesome" compared to Castle.Windsor or MS Unity? What does it to better than them?
Anthony
--Better IOC Containers--In the web app, Easy Redirection of the pages--Smooth DI (Depenendency Injection on code behind pages , business logic layer)--Easy integration with NHibernate--Support of both XML Configuration and Annotation
Shiva
What do you find "better" and "smooth" about Spring.Net's IoC with respect to this example? http://stackoverflow.com/questions/1955862/how-to-change-configs-in-spring-net
Anthony