The origins and construction of the Sueetie Application Class.
It's all about Context
When you are bringing intelligence and additional functionality to an application like Sueetie which consists of several discreet web applications that run independent of one another, it's important to know where you are at the moment. In which application, the type of application we're in, and other context-related issues, like if we're in a group. Context.
Patterns: The Current Sueetie Application Object
The Current Sueetie Application object is called with
SueetieApplications.Current.[property] Below is an example of using SueetieApplications.Current when saving a wiki document to the Sueetie data core content area for community display outside of the wiki. With Intellisense you can see many of the SueetieApplications.Current properties. (The single application object is SueetieApplication.)

One of the reasons for creating the SueetieApplications model was to implement smarter caching through better context awareness. For instance, when a user updates his or her site avatar, the change in the SueetieUser object is updated in the current application, but on another application with its own cache of the SueetieUser object, no change is reflected in the user's avatar. Through comparing
SueetieApplications.Current with another property of the SueetieApplications class,
SueetieApplications.Prior we can flush the SueetieUser object and update object properties when changed in another Sueetie application.
Below is [a teeny-tiny screenshot, sorry, of] the data supporting the Sueetie Application object (sueetie_vw_applications.) SueetieApplications uses a Get().All object to retrieve a List
for processing current and prior application context.

Determining the Current Application
The current Sueetie Application object is based on location, specifically, the path of the current Url. This is obtained through URI Segments[] in SueetieApplications as shown here. One additional aspect of this logic is determining if the current application is part of a group. That is performed through comparing the second URI segment element with the site configurable groups designation. For instance, at sueetie.com the designation for groups is "groups," as in http://sueetie.com/groups/demo/blog.

Origins: SueetieApplications
The structure of BlogEngine.NET objects with Get() and Load() we've covered in other Sueetie objects are used here. Otherwise, because the structure of Sueetie communities are currently fixed as http://domain/[appkey] and http://domain/[groupdesignate]/[appkey], URI Segment Elements and Linq did the rest.
Managing Application Objects and Futures¶
At the time of this writing there is no Administrative Application Management function where new applications and groups can be added, removed or deactivated. That is, of course, planned. Other methods will be added to the SueetieApplications, including obtaining property information for a given application in the form of
SueetieApplications.Application(string appkey);
and a variety of overrides.
Top