Building BG Views Network - Part 1

user-pic
Vote 0  

Filed:

 
Since I have had a number of people ask me about how we built BG Views, from BGSU, other colleges, Facebook and even some people on Twitter, I have finally sat down to write about it. For the most part, you can gather how BG Views has been built by reading the posts already here on this blog.

Sections of these posts will be overview and cursory, while others will be technical in nature. You have been warned! This will span many parts, this is more or less the introduction.


The project started a few years ago when Bob Bortel and I wanted to re-launch our BG News web site to be a community site, not just an online version of our newspaper. Timing for this was right, too, as College Publisher was getting ready to release CP5, with many more community driven features.

Fast forward to the time we went to put the wheel to the pavement, and College Publisher did not have those features fleshed out yet - and still don't. This blindsided us, as mtvU and College Publisher were not going to be able to deliver features they had promised us months earlier, and we had a looming launch with a feature set in place as a goal.

Luckily, I had for months toyed with the idea of handling much of the site ourselves, not through our partner. In the end, that is what had to happen. So, as the site runs today, the "news" portion of the site, Our Views, is run through College Publisher, the rest running on our own servers that we maintain.
The question was never "will we use Movable Type?" but "how much is Movable Type going to cost?" The first quote we got was very high, and thus we looked at either using MTOS, WordPress MU, Joomla, or something else. But patience is a virtue, and that is more relevant here than anywhere else. Six Apart restructured their licensing a couple times in the past years, and we finally signed on the dotted line for a fraction of the cost of the initial quote. Our current license even supports more admin users and user profiles than what we originally were quoted.

While BG Views could have been built using Movable Type Open Source, (and indeed, parts of the site are running MTOS) Movable Type Pro was needed for the features we wanted, the Community Pack and the Professional Pack. I will discuss the nitty gritty of that in a future "Building BG Views" segment.

I have been using MT since 2003, and have a good relationship with Six Apart and the MT community. When we were going to purchase Movable Type Community Solution, (later renamed Movable Type Pro) I was allowed to develop with MTCS before the ink was dry, so to speak.

Despite the setback in community features from College Publisher, being able to get under the hood with MTCS was a major boon. In more ways than one, I owe a lot of thanks to Anil Dash, and his support in this project, from initial planning and inception on through today.

Movable Type

Many of the features of our site were earmarked for MT from the start. Even though CP5 has blogs, they were severely lacking in features (like RSS feeds, categories, and multiple user support) and I made the decision to not wait on them to improve upon them. I am glad I did, because CP5 blogs still leave a lot to be desired, even today.

Blogs, Community Sites, Forums, and Galleries were all marked for Movable Type. We originally used Joomla and jReviews for our Guides, but that has not worked out for us and this summer we have moved Guides into MT as well.

I started with MTCS 1.0, which was a modified version of MT 4.0. MTCS 1.1 (4.1) was a major upgrade, so much so that I scrapped much of what I had done in MTCS (other than the template work) and worked from a fresh 4.1 install. When 4.2 was released, everything got better, especially in the templating language and design.

Our template, which you are seeing on this blog, is based on the built in Tristan Blue 4.2. The MT.org forums currently use the Tristan Blue theme. Tristan Blue was chosen because it is a very versatile template, allowing for many column configurations with little changes to CSS, and ultimately Movable Type variables. Tristan Blue was also chosen because it had a overall architecture that matched the design we had made, namely horizontal navigation and column structure. It is also nice to not have to start from scratch.

Multiple Blog Design

You need to start by drawing out on paper how your site is going to be structured. I knew right away that a majority of my template code was going to be shared between blogs. The best way to do this is what I call "globalizing Movable Type," which means taking every single one of the template modules and widgets from the local blog, and make them global template modules and global widgets. This takes time. It takes more time in MT Pro than it does in MTOS (there are more parts in Pro). Grab Mark Carey's ConvertToGlobalTemplate to make this job a snap. If you are not yet familiar with installing plugins, see Byrne's Ultimate Guide to Installing Movable Type Plugins.

Once you have done this to a "Master Blog" you have your starting point for your design to manage five or 500 blogs inside of Movable Type. It is important to understand that local template modules and widgets override global versions that have the same name.

Take 'Entry Detail' for example. You can have four of your five blogs use the same global Entry Detail template module, but your fifth blog can use a local Entry Detail module that has customizations for that one blog. This way your mt:Include statements do not change one bit, since all five blogs use Entry Detail - but one of them is customized with a localized version.

The next important step is modularization of your code. MT 4.2 has done a better job than any version previous, but for multiple blog design, you need to take this to the extreme. This means that many of your Index templates will be nothing more than mt:Include statements. And inside those modules, there will be nested mt:Include statements. This is all in a grand effort to only write template code once.

Template code and logic should only ever be duplicated if you are customizing something. This is why breaking up your template modules, such as Entry Detail into smaller bits is really important.

Using the "cascading" template structure in reverse, you can place template modules at the local blog level that do not exist at the global, or system level. When templates are rendered, the template code from the local blog is compiled with the globalized code, all with the use of the mt:Include statements.

Template module caching is a very important subject when you are working with many different blogs on a single install. You cannot cache global templates, so you have to pick which template modules and widgets you want to reside locally wisely. But it is very beneficial in the long run to read up on and fully understand template module caching.

Not only do we use template module caching to keep rebuild times down, we use it because they can be set to only rebuild based on specific parameters.

The next most important thing to do is setup run-periodic-tasks, which is the cron job to schedule rebuilds of your templates. Read Using Movable Type's Publishing Queue to learn how to use the feature, and grab Byrne's Publish Queue Manager to keep an eye on things.

Globalizing Movable Type and making use of Template Module Caching are the building blocks and the way BG Views Network was built to support a large amount of growth, and a very short development cycle.

The next installment will focus on the hardware and software used for running BG Views, as well as the specific features and functionality that ultimately made Movable Type the only choice for BG Views. Please leave comments and let me know what you would like me to cover in future installments.

Email to a friend

Name and Email are required for anonymous comments. You can sign in to comment using Facebook, OpenID, and many other services. Register with BG Views to access community features.

Leave a comment

 Network Search
Custom Search

Poll

Do you like the toolbar at the bottom of this blog?

View results

View & Download PDF


View our support community!

About This Blog

Ken Edwards (and hopefully other project members) will be blogging here — a place to keep up on what is happening on the BG Views project. You will find bits of code, project updates, and random technical information aimed at confusing the hell out of you. More »

Subscriptions

Mobile Edition

Mobile EditionAccess the BG Views Developer Blog on your iPhone or other mobile device. Read more about our mobile site »
Powered by Movable Type 4.261

 

Also powered by:

  • Caffeine (Dr. Pepper)
  • Cup Cakes (Hostess)
  • Pizza (Pisanello's)