How is Spring.Net making my life easier?
Asked Answered
P

4

6

"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.

Piccard answered 15/10, 2008 at 9:20 Comment(0)
H
15

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.

Haydon answered 15/10, 2008 at 9:30 Comment(0)
T
8
  • 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.

Tawnyatawsha answered 15/10, 2008 at 9:25 Comment(5)
"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.Everybody
@Everybody No, it is possible to use code config with Spring.Net (springframework.net/codeconfig/index.html). For me, I prefer xml config because it can be easyly changed during the integration test without the need to compile something.Juni
I wrote that a the end of 2009. I'm sure that in the meantime, Spring has gone some way to catching up with the rest of the pack.Everybody
@Everybody What makes a changing code-config easier than app-config when the app is already deployed? You need a compiler for any change and THAT is a real pain, I think. So "easy" and "pain" depends on the situation. When debugging an app it's often "easier" to change a code-config but especially when doing hardware intergration steps with multiple small problems that might occur the possibility of quick changes in xml files is a huge benefit. This is especially the case for large enterprise applications with multiple project partners and frequently changing components.Juni
Since code can read config in a great variety of ways and config sources, code-config is a superset of app-config. "You need a compiler for any change" is only true if you code it that way. If you need flexibility via config, don't code it that way. There are cases where app-config (i.e. using the standard code to read config) is best, though I haven't run into many. I'm saying that having only this option is bad.Everybody
S
3

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....

Symptom answered 15/10, 2008 at 9:29 Comment(3)
Castle.Windsor has AOP too, and I think that Microsoft Unity does too. Why is Spring "A good framework" compared to them?Everybody
Spring .NET is the worst framework for .NET platform ever in my experience.Illustrate
@Illustrate I don't agree. Maybe when used in a wrong way or sometimes oversized for small apps.Juni
O
1

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

Olsen answered 26/1, 2009 at 16:43 Comment(3)
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?Everybody
--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 AnnotationOlsen
What do you find "better" and "smooth" about Spring.Net's IoC with respect to this example? #1956362Everybody

© 2022 - 2024 — McMap. All rights reserved.