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: ORM-LINQ-Entity-Framework-Eric-Nelson

Discuss - LINQ to SQL vs. ADO.NET Entity Framework

Short - ADO.NET Entity Framework When To Use It Vs Linq To SQL

Details - Choosing between ADO.NET Entity Framework and LINQ to SQL

List - Choosing between LINQ to SQL and Entity Framework

Anujith
  • 9,370
  • 6
  • 33
  • 48
Hemant Tank
  • 1,724
  • 4
  • 28
  • 56
  • I think "robust DAL" eliminates both L2S and EFv1 from consideration. For an operating system comparison, I think Windows ME fits best (for both). EFv4 may have potential as Windows XP, it's a little too early to say. Remember, Microsoft is basically just entering the ORM marketplace and they still have quite a way to go. – Michael Maddox Nov 13 '09 at 16:07
  • Oh and one more thing - we're v.excited about using the ASP.Net v3.5 based MVC Framework. It seems to suit our requirements. Any other thoughts on the same ? We're not leaving .Net for sure :-) – Hemant Tank Nov 14 '09 at 05:38
  • You may have to roll quite a lot of plumbing type code with ASP.NET MVC and if you have the time and expertise to go that route, then go for it. – Michael Maddox Nov 14 '09 at 12:14

4 Answers4

4

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.

Anujith
  • 9,370
  • 6
  • 33
  • 48
Daniel Elliott
  • 22,647
  • 10
  • 64
  • 82
2

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
  • 3,934
  • 7
  • 37
  • 52
1

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
  • 19,848
  • 10
  • 58
  • 113
  • 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 Nov 14 '09 at 04:24
1

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
  • 2,834
  • 1
  • 22
  • 21