This post originated from an RSS feed registered with .NET Buzz
by Scott Watermasysk.
Original Post: Providers Rock
Feed Title: ScottW's ASP.NET WebLog
Feed URL: /error.aspx?aspxerrorpath=/blog/rss.aspx
Feed Description: ASP.NET and Blogging
Rob Howard is talking about the great new ASP.NET 2.0 providers. I really like this approach to making pieces of your application “plugable”. The newest version of .Text (0.95) is not yet complete, but currently has the following providers (and is running on WaN):
<BlogProviders>
<!-- Controls how .Text formats Urls --> <UrlFormatProvider type = "Dottext.Common.UrlFormats.SimpleUrls, Dottext.Common" />
<!-- This provider powers the wrapper classes such as Entries. In general, it controls whether data is loaded
from a DbProvider, GenericDataProvider, or some other custom implementation. Having a valid DTOProvider is not
optional.
--> <DTOProvider type = "Dottext.Framework.Data.DataDTOProvider, Dottext.Framework" />
<!-- By default .Text uses SQL Server as the backend data store. The DbProvider determines which DbProvider
(a class which implements IDbProvider) is used. This is optional and can be replace with a GenericDataProvider
--> <DbProvider type = "Dottext.Framework.Data.SqlDataProvider, Dottext.Framework"
connectionString = "xyz" />
<!-- The ConfigProvider enables .Text to know which blog to load. You may specify a host, application, or blogid. These
values can be used to override what might be found via the current url or web.config. It is up to the class which
implements IConfig to decide how and when to use these values. In the Dottext.Common asembly you should find two
sample implemenations. SinlgeBlogConfig and MultipleBlogConfig. Single will load a blog based on the Request.ApplicationPath
values (which you can override by setting the Host and Application values). The MultipleBlogConfig will load a blog based on
the value found in the first folder after the Request.ApplicationPath. You may override the host value. BlogID is not used for either
implementation.
--> <ConfigProvider type = "Dottext.Common.Config.MultipleBlogConfig, Dottext.Common"
cacheTime = "120" />
<!-- Controls how .Text sends email. By default, SystemMail is used. --> <EmailProvider type = "Dottext.Framework.Email.SystemMail, Dottext.Framework"
smtpServer = "MyServer"
UserName = "x"
Password = "y"
adminEmail = "Scott@TripleASP.NET"/> </BlogProviders>
There will be one other provider, “FileProvider” which how/when/what files such as images and zips are stored by .Text.