Solutions Architecture Blog

Thursday, July 19, 2007 - Posts

Webparts, Wonderful Webparts
by Mark Strawmyer 07.19.07

Comments    No Comments

As we were designing out the myColts.net site we went through a lot of possible design concepts. We were chasing after the ability to be able to support a site where you could radically changes the look or layout without a ton of effort. The Colts are in the entertainment business, so there is an extreme need to be fast and nimble and change on a dime to take advantage of opportunity. Do you use content management and templates? Use concepts similar to DotNetNuke where there is one page that loads webparts dynamically? During design exploration I just kept coming back to thinking about SharePoint and the way that portals work. The idea of being able to allow users to have various templates from which they could choose to make their profile page look, or even possibly give people the option to design their own page altogether was very appealing.

We did some early prototyping to see how far we could push some of the webpart plumbing that was newly available in Microsoft .NET 2.0. We were concerned that it would be extremely difficult to figure out how to get something workable to provide the plumbing we were going to need. As it turned out, we had a couple of parts that fit very well together. We had a custom built content management system that is database driven. We tossed a few web part zones into an ASPX page with a master page with multiview to support display and edit mode. The edit mode allows webparts to be pulled from the webpart catalog and stored on the page. The structure was then stored in our CMS. The entire blob could then be retrieved that had the page structure set with webpart placement. The webparts would then render. This set the stage for us to provide different templates by loading the page in edit mode, setting up the webparts differently, and then saving the metadata of the page layout off in the database. At runtime we then retrieve the desired page template for display. And a flexible and dynamically set system is born!

From the results to date, I would definitely call it an early success. We launched the myColts.net site back in mid-June. Since then we've added another profile layout which consists of nothing more than a page template with the webparts laid out differently on the page. Users have the option to set which layout they want, which is nothing more than storing the ID of the page to display with the chosen layout. Additionally, just today, I'm happy to announce the launch of myIndianaFootball.net. myIndianaFootball is a site that is built on the myColts.net technology to provide a site dedicated to Indiana High School football. The beautiful part about it is that it really isn't much more than a different theme applied to a set of webparts built to provide specific functionality for the high school site. It is running in the exact same shell as myColts.net, so there is an ultimate amount of code reuse in the core site.