Overview of the process and aspects of converting a YetAnotherForum.NET application to Sueetie.
Today's Assignment: Converting existing YetAnotherForum.NET App to Sueetie
Our assignment today is to convert an existing YetAnotherForum.NET Application (specifically YAF 1.9.3) complete with user and forum data from its standalone status to be part of a Sueetie Community. Our goal is to retain all YAF forum data and enjoy all Sueetie Framework features like tagging, global searching, Sueetie List Views to display forum topics and messages outside of the forum, single community login, and so on.
The State of Sueetie Migration Utilities
Currently there are no utilities to migrate user and application data from any of the Sueetie Applications (Gallery Server Pro, BlogEngine.NET, YetAnotherForum.NET and ScrewTurn Wiki) to Sueetie. The task of migrating a single application's data to Sueetie is a rather large undertaking, and we're talking about four of them. Perhaps someday as more and more people base their communities on the Sueetie Framework we'll have been migration support tools.
On the bright side, you'll see from this guide that converting an application to Sueetie is a series of steps dealing with a discrete set of objects. We'll also see that the application may have done much of the work for us.
We Begin with YetAnotherForum.NET
When we approach converting an application to Sueetie, it is usually best to start with the application and add Sueetie to it rather than install Sueetie and then add the application. More specifically, we want to start with the application's database rather than a Sueetie database. YetAnotherForum.NET (like Gallery Server Pro and BlogEngine.NET) support ASPNET Membership out of the box. (ScrewTurn Wiki requires a plugin, but also supports ASPNET Membership.) So your YetAnotherForum.NET database already has the ASPNET tables which are the basis for Sueetie Membership services. Bonus!
A basic principle of Sueetie Database Logic is that it never EVER modifies any table, view, stored procedure or function of any application. Ever. Sueetie is designed so that all applications and their database objects are as independent as possible. The data integration of Sueetie and application data is through ASPNET Membership and the Sueetie Data Core. More on the Sueetie Data Core in a bit. First let's look at ASPNET Membership integration.
ASPNET Membership Integration
Sueetie shares the same ASPNET membership data as its applications. Each application, like Sueetie, has its own "user extension data" to support the app's specific functions. Here are the Sueetie User data tables used by the Sueetie Framework.

As you can see, there's very little we need to do here, essentially populate the SUEETIE_USERS and SUEETIE_USERAVATAR tables only. (Sueetie_UserAvatar data and logic is based on YAF avatars, but adds a physical image file in /images/avatars for each user.
Data Core Integration
We've look at the basics of user integration with the Sueetie Framework, let's look at integrating data for List View Controls, Tagging, Global Searching, etc. That happens through Sueetie Data Core Unification, a collection of tables that uniquely describes every bit of data created on a Sueetie Community. It does this by application, application type and content type, storing this data in a central table called SUEETIE_CONTENT. If there was such a thing as the most important table in the Sueetie Framework, Sueetie_Content would probably take the prize. Here's a detailed description of
the Sueetie Data Core. It's slightly dated, but provides all of the essentials.
Here is a screenshot of the prize-winning sueetie_content table.

So to integrate all of our YetAnotherForum.NET data created over, say, the 3 years our forum has been online, we would populate the Sueetie User tables with a SQL script and the Sueetie_Content table using the forum's applicationID, applicationType and contentType as it resides in Sueetie. I'll describe how we obtain those values in a second.
Getting There From Here
We now know what data we'll want to populate to bring our YAF app into Sueetie, but how do we get there from here? What do we type, and when do we type it?
Let's say our YAF version is 1.9.3. This is using the .NET 2.0 Framework. Sueetie (with the release of v3.0) uses the .NET 4.0 Framework. Also, Sueetie 3.0 runs YAF 1.9.5 RTM. We need to consider how we're going to address those two issues.
Here's the plan:
- We're going to use our YAF SQL Database for our Sueetie Community
- We'll upgrade YAF to a compatible version with Sueetie v2.0
- We create our Sueetie community website
- We're going to execute the Sueetie SQL setup scripts in v2.0
- We populate the Sueetie User and Data Core tables
Doing it by the numbers
Sueetie v2.0 is available in
the Sueetie Marketplace and runs YAF 1.9.4 RC2. So we want to grab the YAF 1.9.4 RC2 and upgrade our YAF 1.9.3 to 1.9.4 RC2.
We still have our standalone YAF website at this point, updated to YAF 1.9.4 RC2. Now we'll preserve the /forum/uploads and any other YAF data directory and replace YAF with the contents of Gummy Bear (or Atomo) website contents. We'll want to follow the setup steps on the
Gummy Bear Setup Guide as if it were a new installation.
Now back to the database. Using our updated YAF 1.9.4 RC2 database we're going to execute selected SQL scripts from Sueetie Site Setup. Let's look at the SQL scripts used in the Gummy Bear setup.

Our YAF database should already have ASPNET membership tables. Notice the
gummybear_2.0.0_membership.sql table? It creates ASPNET membership, so we simply don't execute it. Sweet!
Next up:
gummybear_2.0.0_install.sql. This creates the essential building blocks for a Sueetie Community. Then we're going to execute
gummybear_2.0.0_populate.sql to, umm, populate them.
Now we get to
gummybear_2.0.0_GSP.sql. This is a copy of the Gallery Server Pro 2.3.3750 install script moved here to remove a step from the setup process. The Sueetie Framework expects that the blog, wiki, media gallery and forum are present, at least in the database schema. They don't have to be part of the website, but their respective database objects do need to be present in the database because of the dependencies required of integrated community functions. In other words, execute
gummybear_2.0.0_GSP.sql.Two SQL scripts remain:
gummybear_2.0.0_PostInstall.sql and
gummybear_2.0.0_PostPopulate.sql. These have a "post" prefix because they must be executed after GSP and YAF scripts are executed, again, due to dependencies. Execute them.
Populate the Sueetie Data and User Integration Tables¶
The next step is up to your own scripting ability...until someone provides us with YAF-User- and YAF-Data-To-Sueetie-Data-Core scripts. Populate the Sueetie_Users, Sueetie_UserAvatar and the Sueetie_Content tables.
Where We Should Be Now In the Process
Where we should now be in the YAF-to-Sueetie conversion process is a Sueetie Community with ASPNET Membership, Sueetie User Data, all YAF User and Application Data, and Sueetie_Content populated. We should be able to login to Sueetie and when we go to our forum, if we're in the Sueetie ForumAdministrator ASPNET Role, we'll have access to the Forum Admin area. If we login as a registered user and go to forums, we'll be able to create topics and messages.
Other Application Integration
This How-To Guide focused on converting YAF to Sueetie. To create a true Sueetie Community with Media Galleries, Blogs and Wiki, we would need to populate the respective app's user and roles data tables. For BlogEngine.NET this would be the be_ SQL tables and /app_data/profiles XML file, for Gallery Server Pro it would be gs_UserGalleryProfile (for Sueetie v2.3 and above), and ScrewTurn Wiki it would be /public/users.cs and /public/groups.cs. We'll leave the details of user integration in other apps for another Application Conversion How-To Guide.
Since other applications do not yet have data, the Sueetie Framework hooks from application events to Sueetie Data Core will take care of populating sueetie_content to support tagging, search, site activity recording and so forth for those applications.
Getting Current
We mentioned the .NET Framework incompatibility of YAF 1.9.3 with the current version of Sueetie. We've upgraded YAF to 1.9.4 RC2 so we could integrate it in Sueetie Version 2.0. We will want to get current with the Sueetie Framework and use the latest in YetAnotherForum.NET as well as the .NET Framework, which in Sueetie Version 3.0 is YAF 1.9.5 RTM and .NET 4.0. To do so we'll walk through the Sueetie v2.x upgrades to bring each application up to its current version, then apply the .NET 4.0 Upgrade Pack for Sueetie v2.4 which will bring us to Sueetie Version 3.0.