473,386 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

"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+functional 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 CustomerProviderBase for the
Customer class. CustomerProviderBase 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.Provider.Access, i had subclassed the
CustomerProviderBase from the MyApplication.Engine assembly to create
an AccessCustomerProvider class.

I did this for all Provider classes in the MyApplication.Provider
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 CustomSectionHandler i had to create to
read in the section XML for each of the "features" so it would return
a ProviderBase object from

ConfigurationSettings.GetConfig("mysectiongrp/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 2447
Hi Spam,

For whidbey visualbasic there is a special newsgroup

microsoft.private.whidbey.visualbasic

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

Cor
Nov 20 '05 #2
Richard,

* sp*********@intermension.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.microsoft.com/newsgroups/default.asp?icp=whidbey>

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

<URL:http://communities.microsoft.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

"spamfurnace" <sp*********@intermension.com> wrote in message
news:81**************************@posting.google.c om...
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
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...
0
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....
7
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...
3
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...
0
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...
1
by: manchin2 | last post by:
Hi, Can anybody please provide the information about "&quot" and its use, if possible please provide an example. ...
2
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.