This page describes the design and implementation of Sueetie Member Favorites.
Please note: Sueetie Favorites remains part of the Sueetie Architecture but is not currently implemented. The Favorites feature of YetAnotherForum.Net is the primary favorites method used in Sueetie.
Sueetie Member Favorites: Patterns
Sueetie Member Favorites is designed to give members the ability to tag content throughout the community as favorites for display and management in their User Profile. (As of this writing, the User Profile piece is still in development. Favorites is in "data gathering" mode.) Favorites are also intended to provide analytic data on what content on a site is most popular.
Sueetie Favorites was first implemented with BlogEngine.NET to capture both blog posts and comments. The comments can be made by both members and non-members alike. Here are a few screenshots of options when tagging a comment as a favorite.
This is the normal response when an item is tagged as a favorite. "You tagged this comment by 'Vistor Jones' as a favorite."

Sueetie favorite tagging is intelligent enough to recognize that you already tagged the content item as a favorite and will tell you so.

You will be asked to login or become a member if you wish to create a favorite and do not have a site account.

Favorites Data Storage Design
The design of favorites storage is quite simple. Below is a view of the Sueetie_Favorites table.

Each content item throughout the Sueetie Community has a ContentID. Each Content Item also has a SourceID to link back to its original location, an ApplicationID and ContentTypeID. (To learn more about how Sueetie centralizes data storage, see
Sueetie Data Core: Unification.)

Favorites was also designed to add analytics to determine the most popular content in the community site. It does so by calculating the total of number of favorites by content item as well as by content type. With the structure of the data Sueetie is storing on favorites we will be able to generate such values as how many favorites per user, per user by content type, and per item across the site, with date and date range information.
The Code Behind the Button
The implementation of Favorites will be slightly different from application-to-application, but in BlogEngine.NET as the first application to support Favorites, we used a JQuery-AJAX-WCF architecture. The JQuery used AJAX to calls WCF Services which processes the data. Here is the WCF Service method used for tagging a favorite blog post.
The logic for tagging favorites (which is similar to the logic of following members) is to obtain a richer Sueetie data object, here SueetieBlogPost using the unique identifier of the comment, postGuid, then take from that data object what we need to populate the SueetieFavorite object, which is then passed to the data provider and Sueetie_Favorites.

As for the JQuery and HTML involved in creating Favorites, the logic was very similar to
Member Following, where those aspects were demonstrated.
Sueetie Member Favorites: Origins
As for the technical origins of Favorites, like
Member Following, there was no established patterns to use. We knew it had to be all client-side avoiding postbacks, so it was a good time to use a JQuery-AJAX-WCF approach.
As for the concept origins, one of our adages at Sueetie Central is that you can't get fired copying Amazon. Their wishlist is similar to the basic concept we had for Favorites, to be able to tag any content item anywhere on the site and refer to it, not on a wish list, but on the User Profile page.
Top