p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516

Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 6th, 2006, 09:49 PM
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Table Adapters

I was wondering why you manually entered all your data access code instead of using Table Adapters in all your projects?

Also, what do you see as the benefits / drawbacks of using Table Adapters?

Thanks,
Marc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old September 15th, 2006, 08:59 AM
Imar's Avatar
Wrox Author
Points: 33,554, Level: 80
Points: 33,554, Level: 80 Points: 33,554, Level: 80 Points: 33,554, Level: 80
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
Default

Hi Marc,

Sorry for my late response. I was on vacation for the past few weeks.

The biggest reason I am using custom business and data access layers is flexibility and validation. With a table adapter and typed datasets, it's hard to add custom logic to properties like date of birth (smaller than today).

With a typed dataset, you can manually change the generated code. However, this way you can no longer regenerate the code when the model changes. Alternatively, you can derive from your own custom dataset and override methods like ColumnChanged to perform the validation. However, with such a solution, you end up with a lot of code and you loose some of the design time capabilities in Visual Studio.

In the company I work for, most of the business logic we manually add to the business and data access layers is generated anyway, using code generators, Visual Studio's diagramming tools, or coding tools like Code Rush. So, in the end, we don't type that much code anyway.

That said, Table Adapters and typed datasets have their places. I use them every now and then for quick and dirty solutions / demos / proto types.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Shadowplay by Joy Division (Track 9 from the album: Heart And Soul (CD 1)) What's This?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old September 21st, 2006, 09:08 PM
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the info.
The more I research this, I find the same answers. I, too, like more control over my code, so I think I'll go your route.
I just wish that MSDN docs would explain things as you have.
They demonstrate all these new features for 2.0, but don't explain when you probably don't want to use them.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old September 23rd, 2006, 06:16 AM
Imar's Avatar
Wrox Author
Points: 33,554, Level: 80
Points: 33,554, Level: 80 Points: 33,554, Level: 80 Points: 33,554, Level: 80
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
Default

Well, the TableAdapters and other features certainly have their places. They are great for demos that don't require complex business layers. They are also great for many simple data driven tasks.

But I agree, it can be hard to see what to use when and in what situations...

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing the Control Adapters Randy-s BOOK: Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages ISBN: 978-0-470-12448-2 5 June 26th, 2009 08:59 AM
ASP.NET CSS Friendly Control Adapters VeganMan BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 April 8th, 2008 10:21 PM
Populate a List Box with Table Names & Table date hewstone999 Access VBA 1 February 27th, 2008 10:10 AM
(oracle 8i)Alter Table <table> coalesce partition combo Oracle 3 October 13th, 2004 10:35 AM
size of table (type table is table of number) MikoMax Oracle 1 November 19th, 2003 03:11 AM



All times are GMT -4. The time now is 02:14 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc