|
|
 |
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.
|
 |

September 6th, 2006, 09:49 PM
|
|
Registered User
|
|
Join Date: Sep 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

September 15th, 2006, 08:59 AM
|
 |
Wrox Author
Points: 33,554, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
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?
|

September 21st, 2006, 09:08 PM
|
|
Registered User
|
|
Join Date: Sep 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

September 23rd, 2006, 06:16 AM
|
 |
Wrox Author
Points: 33,554, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |