views:

560

answers:

6

Almost every new Java-web-project is using a modern MVC-framework such as Struts or Spring MVC for the web tier, Spring for the "Service"/business-logic-layer and an ORM mapper such as Hibernate for persistence. What is the equivalent in .NET?

I guess ASP.NET is used for the web tier and ADO.NET for persistence but what is the equivalent to Spring, i.e. what is used to wire transactions and components and such.

I am aware of Spring.NET but I'm more interested in the de facto way of building applications in .NET.

+1  A: 

Something like this?

http://www.asp.net/mvc/

noesgard
+1  A: 

There is no de facto way for data access in .NET.

Options include:

  • ADO.NET DataReaders*
  • ADO.NET DataTables*
  • LINQ to SQL*
  • nHibernate
  • ADO.NET Entity Framework*
  • Typed DataSets*
  • Spring.NET
  • CSLA.Net

Notice the ones with *, these are current offering from Microsoft itself. And I've skipped the ones I don't remember how to spell.

Jonathan Allen
+2  A: 

The default approach is ADO.NET/Linq-to-Sql, ASP.NET and custom service layer that reinvents the wheel. Microsoft has Unity for autowiring, but I do not feel dependency injection is mainstream in .NET world yet.

But if you go for the best practices, it is ASP.NET MVC for UI, any DI framework (Castle,Unity,Autofac,...) for wiring, and NHibernate for persistence.

Andrey Shchekin
A: 

ASP.NET MVC + The data access that suits your job better.

There are many other frameworks, tools and libs that can help such as Castle ones, Ninject, Nunit, NLog etc.

But i believe that the better response to your question is "It depends".

A: 

Actually, CSLA does not provide any data access. Data access implementation is left up to you.

Todd Stout
Critics of CSLA tend to try to compare CSLA to an ORM. CSLA is not an ORM! An ORM could compliment CSLA, but CSLA does not perform the functions of an ORM layer.
Todd Stout
A: 

Note that ASP.NET MVC isn't RTM yet, but we've been using ASP.NET web forms for years (since .NET 1.0).

John Saunders