views:

1964

answers:

5

I am getting ready to start a project which will be using both Spring.net and NHibernate. I have seen a few good tutorials for NHibernate but have had a hard time finding resources for Spring.net. Specifically, I am looking for something that goes the setting up a solution and getting things running. Are there any good tutorials for a Spring.net newbie? Are there any good resources for using Spring.net and NHibernate together?

+2  A: 

You can try this tutorial: Using sprint.net and nhibernate with ASP.NET MVC.

This codeproject tutorial may also help you :(Building a Middle Tier Component using NHibernate and Spring.NET)

Ngu Soon Hui
+6  A: 

I don't know about Sprint.net tutorials but Stephen Bohlen has the Summer of NHibernate series and the Autumn Of Agile Series which I personally found very usefull tools for learning nhibernate in particular.

Nathan Fisher
+2  A: 

Ngu Soon Hui pointed out some good starting points. However, I like the examples delivered with the Spring.Net distribution even more.

You can find them in the folder Spring.NET-1.2.0/Spring.NET/examples/Spring. For starters I suggest to first have a look at Spring.IoCQuickStart.MovieFinder followed by the Spring.Data.NHibernate.Northwind which shows how to use spring's hibernatetemplate, tx-attributes and nhibernate. The Spring documentation is also a great way to get help as well as their nhibernate specific sub-forum. There is a complete documentation for the example as well.

If you have still some time left to learn about Spring and nhibernate, you might want to wait until the 15th of december: according to the spring.net roadmap, they are planning to release the 1.3GA then which is then compiled against the latest NHibernate version. According to the Spring.Net bugtracker, additional documentation and examples (e.g. SPRNET-1246: Show DI for NHibernate managed objects in NHibernate example applicationare") also to be included in the 1.3GA release.

tobsen
+3  A: 

there a good book - Enterprise .Net - which covers both, along with other enterprise coding practices:

http://www.amazon.com/Professional-Enterprise-NET-Wrox-Programmer/dp/0470447613

NickAtuShip
+1  A: 

I found this article at code project which covers both pretty well.

http://www.codeproject.com/KB/aspnet/spring-asp.aspx

ProgrammingPope