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

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 ?
LVL 1
rafaelrglAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alexandre SimõesManager / Technology SpecialistCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Arthur_WoodCommented:
I can highly recommend CSLA.  Rocky's architecture is awesome, and very flexible.

AW
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.