This was a Sueetie Documentation Saturday! It was a gorgeous day in Vermont with fresh snow on the ground, clear blue skies and sunshine. I probably should have gone skiing, but as a freelancer I can go any day of the week to avoid the weekend crowds. Instead I published several new documents in the Sueetie Wiki describing some of the framework classes I haven’t yet documented and new features coming in Gummy Bear 1.2. I’ll blog a couple of the new documents tonight and the remaining ones tomorrow.
Below is a new Developer Resources document describing the Sueetie SiteSettings object Site Setting properties are items like Community Name, Site Contact Email Address, and Registration type that are set in the Administration area and stored in SQL Server as opposed to SueetieConfiguration properties and objects which are stored and described in the Sueetie.config file.
____________________
Sueetie Site Settings: Patterns
The architecture of Sueetie Site Settings is pretty straightforward: property names and their corresponding values. The pattern was largely based on BlogEngine.NET's smart and simple approach to storing application settings as we'll see in Origins below. The best way to demonstrate the use of the Sueetie SiteSettings class is how it's used on the Administrative General Site Settings page.

On the back end we're retrieving the properties with SiteSettings.Instance.[propertyname].

Unlike BlogEngine.NET's handling of blog application settings where all properties are rewritten to file storage or sql in bulk, Sueetie updates properties individually.

There's also a cache clearing method we want to use whenever we update the site settings object.
SueetieCommon.ClearSiteSettingsCache();
Sueetie Site Settings: Origins
As I mentioned earlier, the Sueetie Site Settings model was based on BlogEngine.NET's BlogSettings object, instantiated with a Get() / Instance property.

Like BlogEngine.NET, Sueetie Site Settings are loaded from a StringDictionary collection, with each dictionary key compared with the PropertyInfo elements of the SiteSetting properties: SiteName, ContactEmail, RegistrationType and so on.

Below is a screenshot of how properties are stored in SQL Server
