Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 7th, 2007, 09:36 AM
Registered User
 
Join Date: Jun 2007
Location: Burnaby, British Columbia, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Why not using .NET's ProviderBase

Hi,

I was reading MSDN's custom provider articles and wondering why TheBeerHouse is not using .NET's ProviderBase, since it's already there available to use, and the framework will call ProviderBase's Initialize(...) method automatically for provider initialization. Why create DataAccess class rather than using ProviderBase? I noticed that DataAccess has some helper functions such as ExcecuteNonQuery..., but other than that, are there any other benefits? Maybe I'm missing some pieces, but any information will be really appreciated

Link to the article I was reading:

http://msdn2.microsoft.com/en-us/library/aa479038.aspx

Beier
  #2 (permalink)  
Old June 9th, 2007, 12:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't think of a DAL as being a provider. A provider is a type of plugin that allows you to access a certain kind of data. A provider can go between the DB and the DAL. But I don't think descending from ProviderBase brings any benefit to the DAL itself.

Inheritance is useful where you want to leverage existing functionality and extend it. The Initialize method itself doesn't seem to offer much of what we'd need.

Try creating your own DAL this way and see if it buys you anything in the end. It might, but I just can't see it right now.

Eric

  #3 (permalink)  
Old June 9th, 2007, 02:33 AM
Registered User
 
Join Date: Jun 2007
Location: Burnaby, British Columbia, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Eric, thanks for the reply and insightful thought. I agree with you that DAL and provider are not exactly the same thing. IMHO Provider is more like a helper that bridge DAL and BLL. I was trying to think out what .NET's pure provider can provide other than initialize but haven't come up with anything essential. I think I'll stick with BeerHouse way.

Beier

Beier Cai
 


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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of VB.NET's Shell function in C# jude_wong C# 8 December 16th, 2005 07:49 PM
.NET's custom control and form lok_tan All Other Wrox Books 0 July 17th, 2005 10:10 AM



All times are GMT -4. The time now is 11:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.