PDA

View Full Version : Spring.NET ???


Anonymous
02-03-2005, 12:09 PM
Hi,

I am new user of Spring.NET. I never used Spring component before i like to know the features available in .NET version how it will be useful in .NET project development. I Just downloaded the Spring.NET example(MovieFinder) and went through the spring reference PDF from this what i understand is Sprint.NET (IoC) is used to create an instance of class object and maintain the objects as collection. I like to know what r the other features available in this how this kind of instance creation will be useful in Development how it will be better that regular instance creation.

I don't get any document for AOP please let me know the url for the same.

jonas_antonsson
02-03-2005, 05:32 PM
Martin Fowler (http://www.martinfowler.com/)is useful when it comes to design patterns (such as Injection / IOC) and refactoring. In fact his books are rather good so I recomend them.

To understand the benefits derived from Inversion Of Control (i.e. dynamic instance creation) you should read this article by Fowler: http://www.martinfowler.com/articles/injection.html

In regard to instance creation the simple answer is that if you use interfaces to sert up contracts for your classes you can implement the interfaces in several different ways. By using Spring you can decide (with IOC) what implementation to use in each case - by programming to interfaces instead of actual classes. I hope this is clear enought but Fowler should make it even clearer.

Mark Pollack
02-03-2005, 06:31 PM
Hi,

Thanks for trying out Spring.NET... You may also find it useful to look at the introductory chapter of the many Spring.Java books. These explain IoC in general and are not Java specific. In particular, I believe Chapter 3, from Rod's book "Expert One-on-One J2EE Development without EJB", discusses IoC in general and is a good read. Matt Railbe's new Spring Live is also contains such a chapter.

Mike Spille's Blog (http://www.pyrasun.com/mike/mt/archives/2004/11/06/15.46.14/) also has a nice introduction section.

There are plans for the Spring.NET team to release an 'Introducing Spring.NET' article, but in the meantime, feel free to post any questions you have on the forum.

A sound bite I often use when motivating the use of IoC is to draw a parallel with the reasons one would use the Abstract Factory, Strategy, and Singleton design patterns. What Spring IoC does it make these patterns easier to apply with the added benefit of having non invasive configuration of your objects. You don't have to write code that 'reaches-out' to get config values, they are 'pushed in'. Other layers of the framework deal with Aspect Oriented Programming (AOP), Data Access, Web, ... so you can also use Spring.NET as a 'one-stop-shop' for this additional functionality.

I recently spoke along these lines on a .NET Rocks! show (http://www.dotnetrocks.com/default.aspx?showID=90). You can download the show if you have the time. Be warned - there are many threads of conversation going on there...

I've put these links on our wiki (http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?pageId=1026)


Cheers,
Mark