473,763 Members | 7,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"About That Whidbey Provider Pattern"

Hi there.

Ive just been reading about the Whidbey Provider Pattern on MSDN,

http://msdn.microsoft.com/library/de...sp02182004.asp

and i wanted to clarify my understanding of it and get some
implementation feedback. Im a bit unsure so please correct me.

What Im Doing

Ive a classic 2/3 tier app that i'M partioning,
UI(webforms/winforms+functi onal restrictions), common business logic
layer and then a DAL, i want to offer on both Access2000 and SQL
Server. I figure this Whidbey Provider pattern is where its at for
swapping my DAL in and out thru app.config.

I basically want to know how others have done it. This what i did but
im wondering if i've done everything i need to and/or have i have used
the framework to its full potential.
How I Did It / My Understanding

I'll use points to save on the typing. They represent my current
understanding and may seem like statements but their kinda questions
as well, please yes/no me if you have the time.

1. This pattern is going to be used extensively in the Whidbey release
of the framework.. Microsoft recommends getting into it now but if you
do you'll have build your own provider base etc.
2. First up i partioned my app into 3 standard tier and put a shared
(static) field into each of the classes in the BL that needed data.
This was to a fairly generic class, say CustomerProvide rBase for the
Customer class. CustomerProvide rBase had subclassed ProviderBase.
3. Then i created separate assemblies which subclassed the provider
base classes in my BL (engine) assembly so for instance in an assembly
MyApplication.P rovider.Access, i had subclassed the
CustomerProvide rBase from the MyApplication.E ngine assembly to create
an AccessCustomerP rovider class.

I did this for all Provider classes in the MyApplication.P rovider
namespace of the engine
assembly so that i now had AccessProviders for everything in that
namespace.

4. Then in the app.config I created an application section group and
sections for all of my "features". I understand this "features" term
used in the aforementioned Url to mean providers.

This meant i had a section for each provider class in my engine/BL.
Each of these referenced a CustomSectionHa ndler i had to create to
read in the section XML for each of the "features" so it would return
a ProviderBase object from

ConfigurationSe ttings.GetConfi g("mysectiong rp/sectionname") as Object
5. Then i went thru and entered all the section settings into the
app.config for the intended DAL.

6. This means in my app.config i have configSection declarations for
each of the provider classes declared as shared fields in each of
engine/BL classes. Plus then settings for each each of the sections.

Is this right?

This means i dont swap the whole DAL from Access to SQLServer with a
single entry in the app.config but rather make a setting change for
each provider class referenced by a feature?

So if i have 10 business classes all requiring data, they would have
10 shared fields each pointing to their respective ProviderClasses ,
and 10 section declarations in configSections and 10 section settings
in the app.config and when i wanted to swapp from A2K to SQL i make 10
section setting changes (1 for each of the Providers) in the
app.config.?

Is this how you guys/girls are doing it?
Its really flexible, I can see that... It completely abstracts away
the DAL from the BL by putting a Provider layer/interface between the
BL and the DAL. Data could be coming from pretty much anywhere and the
app wont care....

It works great but i am i doing it right? It feels like im long
handing something thats supposed to be shorthand.

Thanks for any thoughts.

Richard.
Nov 20 '05 #1
4 2471
Hi Spam,

For whidbey visualbasic there is a special newsgroup

microsoft.priva te.whidbey.visu albasic

Web interface (all whidbey newsgroups) open
http://communities.microsoft.com/new...idbey&slcid=us

Cor
Nov 20 '05 #2
Richard,

* sp*********@int ermension.com (spamfurnace) scripsit:
Ive just been reading about the Whidbey Provider Pattern on MSDN,


Notice that there are separate groups available for Whidbey:

<URL:http://communities.mic rosoft.com/newsgroups/default.asp?icp =whidbey>

Infos on how to view these groups with an NNTP news client:

<URL:http://communities.mic rosoft.com/newsgroups/ICP/whidbey/US/welcomePage.htm >

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
O.k ive posted there... the pattern does say to start using it now
though, so i figured this was as good a place as any.

:)

Thanks
Richard
Nov 20 '05 #4

"spamfurnac e" <sp*********@in termension.com> wrote in message
news:81******** *************** ***@posting.goo gle.com...
O.k ive posted there... the pattern does say to start using it now
though, so i figured this was as good a place as any.


Check out Microsoft's .NET implementation of the PetShop project.

http://msdn.microsoft.com/library/de...bdasamppet.asp

The DAL used there is similar to what you want to do I beleive.

--
Mike
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1604
by: Brad Ford | last post by:
I see posts concerning the use of Whidbey, I am new to MSDN, and I would very much like to try it out. There is even a "hands on tutorial", but the requirement is that you have Whidbey installed (so it would go to reason that you can get it somehow). #2 - Can I read this newsgroup in something other than a browser... I would like to use a newsgroup reader, that I can setup to my tastes...
0
1352
by: Cave | last post by:
Is there a way to install the SQL Reporting Services Client on Whidbey ? The installer searches the system for an installation of Visual Studio 2003 in order to install the client part of SQL RPS. Although there is an installation of the Visual Studio Whidbey I cannot install the client of SQL RPS on it. Any ideas ??? thanksalot
7
1442
by: Fresh Air Rider | last post by:
Hi I understand that ASP.net 2.0 (Whidbey) is going to reduce coding by 70%. Surely this is going to de-skill or dumb down the developers task and open up the task to less qualified and trained staff. Tell me if I'm wrong.
3
1786
by: cmay | last post by:
In reading some documents from the Patterns and Practices group, I had a question about the example given for the Page Controller pattern. (I have posted the code for the BasePage below) In short, their example shows a "BasePage " class for other pages to inherit from. The subclasses are supposed to implement the PageLoadEvent method (which I guess should really be abstract, but can't because asp.net
0
5451
by: martin leer | last post by:
Hi all. I got the following error: OLE DB provider "MSDAORA" for linked server "infonet" returned message "Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed.".
1
2845
by: manchin2 | last post by:
Hi, Can anybody please provide the information about "&quot" and its use, if possible please provide an example. 1)<tm:bom-expression>{Conf.getEquityConfLookupFields().getEventFieldText(&quot;AdditionalDisruption&quot;,&quot;Change in Law&quot;)}</tm:bom-expression> 2)07:41:08 Default ( call ( . ( call ( . Conf getEquityConfLookupFields ) ) getEventFieldText ) ( , AdditionalDisruption Change inLaw ) ) value=Not applicable Can you please...
2
2728
by: arnuld | last post by:
i am confused on some aspects of bitset class: /* C++ Primer 4/e * chapter 3 * * exercise 3.23 * */ #include <iostream>
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.