Whidbey Provider Design Pattern pitfalls
Note: this entry has moved.
A couple weeks ago Rob Howard
(from the ASP.NET team)
announced the "disclosure" of the
Provider Design Pattern they are using in Whidbey ASP.NET (v2).
I've got a couple complaints with this implementation:
While the first two are a matter of taste in the end, the last
one should be fixed promptly. I didn't hear any voice complaining,
however. Am I the only one envisioning complex providers with the need to
configure themselves with hierarchical XML information? It's all too common
everywhere!
You want a a concrete example? Here it goes:
What if I develop a provider that implements automatic DB schema installation
and migration? My super provider could allow the full DB schema to be specified
in the configuration itself:
...other tables...
The provider can detect the presence of the schema and create it automatically
if necessary. I could even go as far as saying that it could even define
through configuration the way to migrate a schema if it's incompatible, or
whatever.
Another one: maybe my provider uses a webservice. I may need to pass complex
information to the provider, such as credentials, proxy information, SOAP
message skeletons, or whatever. None of this is possible with a NameValueCollection.