 |
| ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 10th, 2012, 04:56 PM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
From a professional pov, should i use tableadapters or classes?
I am graduating with a CS degree this summer and I am aspiring to be a software engineer and/or software developer.
I am taking an independent study on asp.NET as my final class and I will be tasked to build an e-commerce site.
I really want to do this right. I am going to dedicate several weeks to creating several UML diagrams and really getting my design and documentation down pat.
The thing is, I have been using tableadapters for all my web projects so far and I think they are great. But I am really interested in Imar's N-layered architecture articles and I am strongly considereing taking this approach and building classes to access my data through.
In the real world, are tableadapters used frequently and if not, why? What are the advantages to coding all of the Data Access Layer logic manually using classes and such?
Thanks.
Last edited by IceThatJaw; March 10th, 2012 at 05:15 PM..
|
|

March 12th, 2012, 03:22 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Quote:
|
In the real world, are tableadapters used frequently and if not, why?
|
Yes, but in a lot of legacy applications. I don't use them for new sites anymore, and I thnk that's the common theme. They had their use back in the early days of .NET, but there are better alternatives now.
If I were you, I'd look at the Entity Framework, with optionally the Code First option. I am working on an update of my article series about N-Layer design using ASP.NET 4.5 where I'll use EF Code First as well. However, it may take a loooooong time before the series is done so don't wait for it......
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

March 12th, 2012, 10:15 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Imar
Hi there,
Yes, but in a lot of legacy applications. I don't use them for new sites anymore, and I thnk that's the common theme. They had their use back in the early days of .NET, but there are better alternatives now.
If I were you, I'd look at the Entity Framework, with optionally the Code First option. I am working on an update of my article series about N-Layer design using ASP.NET 4.5 where I'll use EF Code First as well. However, it may take a loooooong time before the series is done so don't wait for it......
Cheers,
Imar
|
Ok, this is great advice. Now the code first option in EF from what I understand is designed so that you can build your DAL without actually creating a database schema in a DBMS.
I'm still unclear on why that is so advantageous but I will try it out.
Thanks.
|
|

March 12th, 2012, 10:28 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
from what I understand is designed so that you can build your DAL without actually creating a database schema in a DBMS.
I'm still unclear on why that is so advantageous but I will try it out.
|
The biggest advantage is that you can design your model without having to think about the database. This means you can freely design your model with, for example, object inheritance and let EF handle the database generation for you. You still have a lot of control over how the database is generated though.
Alternatively, use EF Database First or Model First if you like these models better.
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| TableAdapters in Visual Studio 2005 |
lisabb |
ASP.NET 2.0 Basics |
0 |
July 18th, 2007 11:44 AM |
| Using classes |
seymour_glass |
C# |
1 |
April 26th, 2007 10:18 PM |
| Switching TableAdapters |
striker9 |
ASP.NET 2.0 Basics |
3 |
March 29th, 2006 11:11 AM |
| About Classes. |
wdw |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
0 |
July 29th, 2005 08:46 AM |
| Classes |
CodeMonkeys |
C# |
3 |
August 18th, 2004 11:14 AM |
|
 |