Cross-compatibility is probably my major complaint in about every aspect of my life. If css isn't cross-compatible with browsers and my new shoes aren't cross-compatible with all my different sweaters, then there's a definite hitch in Fate's threads. I shake my fist at you, Fate, and demand that you allow neon orange and pink to go together. Okay, not really.
The big kicker, in this case, is cross-compatibility between different frameworks. I know that you're guessing that I'm talking about glasses and photographs, but what I'm really discussing are the different CMS/E-Commerce/Blog/etc. programs that I get to "code" (I say this with quotation marks, because any developer out there would tell you that I do not actually code) in every day. In specific, the primary ones are Boogaloo, AbleCommerce, and BlogEngine. RSS feeds port over pretty nicely between them, but getting AbleCommerce controls to work in Boogaloo or Boogaloo controls to work in BlogEngine turns me into a pestering little chinchilla that hounds Rusty until his ears bleed (I think I saw it happen once. Maybe. You could ask him).
Today, Rusty and I specifically scheduled an hour of time to take some controls from Boogaloo and add them into a blog (BlogEngine) for a client. It makes it easy(er?) in this case because we're going from one .NET application to another. Surprisingly, I think I understood enough of it (except the one menu control that had to be ported from VB into C#) that I can tell you how to take your Boogaloo controls and slap them nicely into BlogEngine so you only need to make your changes in one place. And what a miracle it would be, if life were always so compatible and simple. Perhaps Fate thinks that brown is the new pink?
I make a few basic assumptions (and statements) in this post. First off, I assume that you have both Boogaloo and BlogEngine already installed. Second, I state that you can have either type of Boogaloo or BlogEngine installed, by which I mean that you can have installed Boogaloo on either SQL Express or SQL Server, and you can have BlogEngine installed with either XML or SQL Server or SQL Express as well. Since the sites don't specifically interact with each other, the database types don't matter. Thirdly, I assume that your install of BlogEngine is not in a sub-directory of Boogaloo, but is rather being hosted separately with its own sub-domain, etc. I'm not going to be talking about having a blog installed "inside" Boogaloo, as that's another host of issues that I know next to nothing about. So, if all of these base assumptions are correct, we're ready to move over into actually adding Boogaloo to BlogEngine.
The Actual "How-To":
- I find the best way to do this (if possible) is to open two windows and have your Boogaloo file structure in one window and your BlogEngine file structure in the other. Windows 7 nicely lets you split the screens, or if you have two monitors like me, you can put one in your left and one in your right monitor. Whatever works best for you.
- Bin files: The first thing that you'll need to do is take these three files from Boogaloo and copy them into the bin folder in BlogEngine. Since they have the same basic .NET file structure, it should be easy to locate both places. Here are the files:
- Boogaloo.Base.dll
- Boogaloo.Core.dll
- Boogaloo.Syndication.dll (this one isn't specifically necessary, but good to have nonetheless)
- Config files: Due to the way Boogaloo is set up, you shouldn't have to worry about having strange conflicting config files. Simply copy from the App_Data folder in Boogaloo the following files to the App_Data folder in BlogEngine:
- Boogaloo.config
- Database.config
- Web.config file editing: After you have copied over the first initial steps, the next thing to do is connect BlogEngine to Boogaloo. This is done in the Web.config (which you do not need to copy over, we'll be merely editing the one that is already in BlogEngine) and Database.config files.
- Open the Web.config file in the root BlogEngine directory.
- Underneath "configurations" and inside the first "configSection" tag, add the following (This can be found inside Boogaloo's Web.config file):
<sectionGroup name="Mindfly">
<section name="Boogaloo" type="Boogaloo.Base.Configuration.BoogalooSection, Boogaloo.Base"/>
</sectionGroup>
- Cut everthing inside the "connectionStrings" section from the Web.config file and paste it inside the "connectionStrings" in the /App_Data/Database.config file
- Back in the Web.config file in the root, take the now empty "connectionStrings" section and remove the opening and closing tags.
- Where the "connectionStrings" were, paste the following (This can be found in Boogaloo's Web.config file):
<!-- Database Connection Strings -->
<Mindfly>
<connectionStrings configSource="App_Data\Database.config"/>
</Mindfly>
- Save the Web.config and Database.config files!
- Controls: Now its time to actually move over the controls that you're wanting to use on your blog.
- Make a new folder in the root BlogEngine directory and name it "Controls". You will want to mimic the path structure that Boogaloo uses, since we will be referencing them in the same way that we would in the masters or embedded controls in Boogaloo itself. (Note: You will not need to copy over any Editor controls. Since those are being used in Boogaloo, only the front-end controls (ones that do not have "Editor" in the filename) will be needed in BlogEngine)
- Once you have added your Controls folder, add the folders inside it that have the location of the controls that you wish to copy over.
- Copy over the controls from Boogaloo's location to the new folders that you have created in BlogEngine.
- Add your controls to your theme's site.master: Once you've finished copying the controls over, it's time to add them to the master page. The most common use for controls from Boogaloo to BlogEngine is for embedded controls that are going to be edited in Boogaloo and you want to update in BlogEngine. I'm going to specifically focus on getting the information from those for this tutorial.
- Open your web browser and your website, and log into Boogaloo. Once again, I am making the assumption that if you're going through the trouble to do all this, you already know how to use Boogaloo enough to log into it.
- Drop down the "Settings" link and click on "Embedded Controls".
- Click on the name of the Control that you are wanting to add to BlogEngine. (I'm using an example from the Mindfly site and clicking on my "Janae's Blog" Control)
- At the bottom of the control, you will see "Information for your web designer". That would be you! Copy everything from the first carrot to the last one. In my case:
<%@ register tagprefix="mfb" tagname="rssfeedlist" src="~/Controls/MIND/RSSFeed/RssFeedList.ascx" %>
<mfb:rssfeedlist runat="server" node_control_id="77" />
- Paste the code into your master in the location you want the control to be located.
- Optionally, then cut out the register (<%@ register tagprefix="mfb" tagname="rssfeedlist" src="~/Controls/MIND/RSSFeed/RssFeedList.ascx" %>) and paste it at the top of the master with the other registered controls. I like to do this so that everything stays neat and tidy.
And that just about covers everything. You've copied over your core Boogaloo components (.dll), added your important Boogaloo config files, and then added your controls and synced them all into a nice tidy package through your Web.config and site.master pages. The last step to do is test it out. You should find that every control that you make (or use that comes standard with Boogaloo), barring extra back-end compiled configuration should work just as easily in BlogEngine as it does in Boogaloo.