views:

237

answers:

4

Hi, Having worked for Java for 7 years I'm now moving into a project in .net. The team I'm working in have recently used a technology stack that we are fairly happy with in the business layer and below:

  • Spring for dependency injection, transaction management, security and for adding interceptors and for getting the possibility to inject different implementations of interfaces when in unit-test as oppose to deployed on a server.
  • JUnit for unit tests.
  • JPA/Hibernate for ORM

Could you use this stack in .net? I've heard of nHibernate, spring.net and nUnit.

Are these the translations into .net? or are those projects dead, bad implementations or what?

Are there other superior techniques/frameworks?

Appreciate your thougts!

+6  A: 

You nailed it - NHibernate, Spring.NET and NUnit are all widely used frameworks on the .NET side that compliment their sister frameworks on the java side.

None of those projects are anywhere near dead. I think NUnit just released a new version last month, actually.

Joseph
Agree from perspective of 'porting', hence +1. If you've been Unit Testing for a while and dont mind some frictionm, xUnit.net is worth the effort
Ruben Bartelink
+2  A: 

I would recommend xUnit.net over nUnit. It has a rationalised approach and some very nice features which set it apart from the other frameworks.

Assert.Throws() is just wonderful (beats [ExpectedException] hands down) and the Extensions assembly provides [Theory] which, combined with [InlineData()], is incredibly powerful. For more info see the project homepage

AdamRalph
+1  A: 

nHibernate and nUnit are very much alive and well. Initially they were ports of their java counterparts, but have evolved since then I believe.

Can't speak to spring.net though..

cbeuker
+2  A: 

The frameworks you mention (as far as I'm aware) are still current and active development. I might suggest a few alternates to look at.

  1. Spring.NET is the only thing I'm aware of to do what you're talking about.

  2. nUnit is a good choice. You might want to check out the different versions of Visual Studio. Different versions have different features...some have heavy unit testing functionality built in.

  3. nHibernate is a good .NET ORM. With the release of .NET 3.5, you might want to check out the Entity Framework or LINQ to SQL Classes.

Justin Niessner