[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

when to use dataset or dataclasses or just build an regular class to manage data on sql database.

Posted on 2010-04-02
2
Medium Priority
?
199 Views
Last Modified: 2013-11-08
Hi, i just want to use what kind of manager files to use to manage data on asp.net. I can see i can create different datafiles to manage data. like dataset or dataclasses. But  what is best to use ? when to choose one or another ?
0
Comment
Question by:rafaelrgl
2 Comments
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 2000 total points
ID: 29570168
You know... this is those kind of questions... :)
Much like discussing which is best, C# or VB.net... it's a lose-lose...

The above says that no choice is perfect or ideal for every job, and it all depends on what you're used to.
For me, my focus on the best tool to access my data is:

1. Dumb simple to use.
I want to lose time developing the application core, not reinventing the simple tasks of getting and setting the data (CRUD).

2. Possible to be tweaked and bent to my needs.
Because no tool is done just for you and your project, the tool of choice must let you tweak it, override some methods and intercept their core methods like having a BeforeSave and a AfterSave events...

3. Powerful
Although this tool must do the simple tasks without much thinking it also shouldn't impose any kind of constraints when you need to spicy thing a bit. Supporting LINQ have become a core requisite...


This said, I tell you what I'm using at the moment on my projects:
1. Linq to SQL
This one was not my choice, it was already implemented on the project I'm working on.
It's quite good, not very fast but not slow either. The productivity boost it gives you is well compensated.
The only think I don't use it on my own projects is because I like knowing and having full control of what's going on and Linq to SQL is a closed engine and is hard implement something that it doesn't support by default.

2. Subsonic (http://www.subsonicproject.com/)
This is my ORM of choice mostly because it's plain transparent.
All code is generated and the T4 templates are there in plain sight for you to change them at your own will if you need to.
This is fast, I never had any performance issues. Most reported issues are based on complex Linq queries being slow... if so you just need to write a stored procedure and your problem is gone.
Another good thing is the support for several database engines.

3. ADO.net
This is the core of it all... if you need fast DataReaders are the faster you can get.
All this speed comes with a cost tho... with ADO.net you have to write a lot of code, in fact you have to write all your CRUD and this is not good... your customers will never realize that extra effort and you'll have a giant to maintain whenever you need to add functionality or refactor your DataBase.
Don't mess much with DataSets, if you need to structure your data in objects on the application side use an ORM (like Subsonic).

4. NHibernate (http://nhforge.org/)
This one is probably the ORM with the larger community.
I never used it in real production applications and the few times I tried I found the creation and maintainability of the XML configuration files to high and too complex.
I probably have been using this ORM if I never knew Subsonic.

5. Many others...
There are a huge set of options out there... I just mentioned 3.
You can search on google for:
> Entity Framework (2nd generation ORM by Microsoft)
> CSLA (http://www.lhotka.net/cslanet/)
> ... and the list never ends
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 29573638
I can highly recommend CSLA.  Rocky's architecture is awesome, and very flexible.

AW
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question