views:

205

answers:

4

I'm going to rebuilt an existing moderate-scale web-app to be used for a supply-chain-management web-solution. The core would be around some Item\Site combination-records, Organization\User management, display Organization specific data (a dashboard with 2 levels of Grid) and a Drilldown which has some complex calculations for Item transactions and a robust Grid to show multiple level of totals, sub-totals, etc...

In past, I had developed it using ASP.Net 2.0 and ADO.Net, the backend is SQL-Server. I'm suppose to migrate this web-solution to a full fiedge ASP.Net v3.5 based MVC architecture and integrate other pieces like Membership API, Validation-framework, etc... its going to be a complete re-design. The performance and scalability (i.e. handle millions of records, perform quick calculations, quick-response-time, etc..) are the two main priorities. In addition simplicity and long-term maintenance and periodic upgrades at any level are also to be considered.

I was wondering which of the following two would make a robust DAL which meets my above mentioned requirements:

  • L2S (LINQ to SQL) or EF (Entity Framework)

I've been searching a lot and based on that I'd like to verify my understanding:

  1. Is L2S like Win98 - strong, stable, simple and performing and -
  2. Is EF something like WinXP - better then win98, also stable in a way but somewhat more layers so might have a diff in performance and simplicity compared to L2S

I don't think we're going to involve 'multiple-databases' in our development, SQL-Server will stay. Also, I don't think we'll need to actually map multiple-tables to an Entity, etc... Generally, we'll have one to one mapping for our DB-tables to Entities (i.e. User, Org, etc..) and for some complex cases - like the dashboard fetches records from multiple tables (most probably we'll need to use a stored-procedure and/or a DB VIEW). The Drilldown page fetches data from a single table but has many calculations so again we're planning to usa a stored-procedure which will provide us a formatted table (but this table might not look like the ones already present in DB)

So, thats some tricky mapping but apart from that we need to keep things simple, consider performance and scalability. Oh! and last but not the least - we've a tight deadline so its a kind of 'fast-track' development.

Simple, fast, scalable & performing - thats what we need!

Thanks in advance - please guide me.

PS: Ref links: http://www.infoq.com/presentations/ORM-LINQ-Entity-Framework-Eric-Nelson

Discuss - http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/dc83097e-9c70-4970-93e2-dbc8636eb321 Short - http://www.davidhayden.com/blog/dave/archive/2007/04/29/ADONETEntityFrameworkWhenToUseItVsLinqToSQL.aspx Details - http://blogs.msdn.com/wriju/archive/2009/03/08/choosing-between-ado-net-entity-framework-and-linq-to-entity.aspx List - http://blogs.msdn.com/wriju/archive/2009/01/05/choosing-between-linq-to-sql-and-entity-framework.aspx

+2  A: 

I like the comparrison of L2Sql as Win98, but I would compare the EF to Vista ... it's got lots of power potentially but bits left undone until they came out with the next version make it like a death of a thousand cuts.

I am looking foward to the EF 4 ... I am hoping it is Windows 7 to stay with your analogy.

Kindness,

Dan

Daniel Elliott
+1  A: 

If you can't wait until entity v2 is out, which is .net 4.0, I would say go with linq 2 sql.

You can switch to entity later on if you need it.

I did play a little with entity v1, and I think it is still a baby that need to grow up a little.

Another reason for linq 2 sql is the fact that you will work with sql server only and it's a fast track project.

Fredou
So, is it wise to consider L2S and go with the 'Repository Pattern' in MVC (which allows to abstract the DAL completely)And wait until .Net v4.0 and Entity Framework v2 arrives. As per MS it'll be better then v1 so instead of switching from EF v1 to v2 I can directly go with L2S to v2.
Hemant Tank
+1  A: 

In my personal opinion, having used all of the things you mentioned, i would use NHibernate over either Linq2sql or Entity. If you are after a simple CRUD site, then the decision doesn't matter too much, but the ability to separate the business layer from the data layer is quite difficult to accomplish in ADO.Net, where as it's a lot simpler (in my opinion with Nhibernate).

As I say, opinions vary hugely in this area.

Jimmeh
+1  A: 

I don't think you can go wrong with Linq to sql. It has it's quirks but it works. We decided to go with L2S even though there are issues with using multiple data contexts.

For fast DAL generation check out plinqo It requires Codesmith to generate the code but it can do a lot and addresses some of the quirks linq to sql has. Also there is Oleg Sych T4 templates which is free and built into VS2008.

nportelli