views:

105

answers:

3

Hi all! I am going to make an web application where a lot of users are going to input data into a SQL Server with ASP.NET 3.5. There will be no heavy load of data sent to the client as data will be set to pagesized from the database. Stored procedures are used. I am asking you guys with experience in web 2.0 aka AJAX, jQuery and other client technologies ( no postbacks ) about performance and responsive matter. I have also looked into ASP.NET MVC, but most examples shows either in LINQ to SQL or with the Entity Framework. LINQ to SQL seems to perform slower than the ordinary ADO.NET. I prefer to load data to objects.

Insert and edit forms are to be opened on the same page with javascript, either through modal pop-up or in an area reserved for it.

Preferably a solution with minimal coding.

What do you suggest?

+2  A: 

There's a lot here to answer and not everything has a definitive you should do XXX and not XXX. Let me try to break it down.

ASP.MVC vs WebForms (standard ASP.NET) You can make a decent data entry application using either platform. Webforms has been around longer and definitely has more coverage through tutorials, but ASP.NET MVC is just as capable. MVC is going to be leaner and meaner, which is good if you are going for pure responsiveness, but it's possible to do that with Webforms too, it just takes more work (turning off ViewState, SessionState, Minimizing postbacks etc) and removes some of the benefits of Webforms.

Data Access If you have already decided on using stored procedures as your primary data access method, you aren't going to get much of anything from any ORM (Linq2Sql, Linq2Entities, NHibernate, Subsonic, etc). If you really want to leverage the benefits of ORM you will have to give up stored procedures for your primary data interface.

However, Linq2Sql is considered plenty fast. Linq2Entities is a bit slower, but that will probably improve. NHibernate and Subsonic are slower still. It's not very useful to compare any of them to ADO.NET since they do very different things (that happen to revolve around talking to a database). But all of that is pretty meaningless as the slowest part of any system is going to be sending data across the internet back and forth to the user.

cadmium
Thank you for your answer! The MVC seems to be a good choice!I'll stick to stored procedures as the application relies on them. I use views as virtual tables and the stored procedures are using them as well as there are som functions in the SQL. I want the data into objects and deal with them there.
solkim
With stored procedures you will probably end up writing your own data access layer. Someone can correct me if I'm wrong, but I don't know how much help any ORM's are going to be for you. Good luck.
cadmium
You're right about that. But there is a good tool (ApexSQL code) for creating the classes for each stored procedures. Right now you can get it for free at http://www.apexsql.com/sql_tools_code.aspSee you around
solkim
+1  A: 

Reading your post I see the following requirements/desires...

System will be under decent to heavy load, minimal coding, Stored Procedures, load data to objects.

Sounds like an ORM will be a great solution. It may perform slower than raw ADO.net calls BUT you will greatly minimize coding and you can use Stored Procedures in L2S and Entity Framework and they both can work well under stress. For example, this site uses L2S. :)

The use of the ORM should also reduce your development time since you won't have to write all of the database access code.

You can still load data to objects by keeping the L2S or Entity Framework as a layer in your application that just does the raw DB access. You then create another layer that calls this to populate your objects with the data but you can control how to design those objects and how they work. In fact this is a recommended approach. Here's a link that shows how you can create a tiered approach. :)

http://weblogs.asp.net/dwahlin/archive/2008/02/28/building-an-n-layer-asp-net-application-with-linq-lambdas-and-stored-procedures.aspx

As for your client technology with MVC, AJAX, jQuery, etc.... they are fine choices and with MVC you have complete control over the HTML and no viewstate to worry about as compared to Web Forms.

klabranche
Thank you for your suggestion! Yes, you got the requirements! I was a bit afraid that my question may be misunderstood. Anyway, the ORM appeals to me. I use ApexSQL Code to generate the classes for me. But I am a bit annoyed about the generated errors from L2S and Entity Framework for the stored procedures as some of them has return value (successful transaction). They don't deal with output params very well. As I am new into LINQ and Entity Framework, I want things to go smoothly before I can rely on them. I find MVC really nice for the same reason as you mentioned. Great, and thanks!
solkim
Since you are new to SO, I would kindly suggest that you vote up myself and cadmium since you like our answers. :)
klabranche
Vote up requires 15 reputation, I have one only.
solkim
You'll get the vote up when I reached 15
solkim
A: 

Have you checked out Asp.net Dynamic Data Project that makes it rather quick from start to a working app. You would then tweak those things that you need to change. But you will maybe have to get to know some new technologies to get it done. Maybe Sps won't be in your end solution.

Definitely minimal coding involved.

Robert Koritnik
Thanks for your suggestion!Yes, I have tried that. But as I understood, the database must be relational before I can use it. Is it not based primary key-> foreign key structure? It is not the case for me as I have dynamic number of fields in some parts. Therefore I use stored procedures to get it as I need.
solkim