Dave Burke : Online Community and Social Business Specialist

Kinda-sorta adding a new application to CS 2.0

I wanted to describe the process of adding a new application in Community Server 2.0.  Kinda-sorta.  I say "kinda-sorta" because it's important to quantify the term "application" here. We're not talking about adding a full-blown module to CS like CSFiles or CSForums that is integrated into the core of Community Server.  We're referring instead to something that only looks like a full-blown Community Server module, something that quacks like a CS application but really isn't a duck.

We will be using my iTunes Library lists as an example.  It's got several pages, its own templates and skins...heck, it even has its own menu tab.  Other Real World examples might be a Product Listing or FAQ. 

My approach to the extending CS to include my iTunes app was by starting in the CS module nearest and dearest to my heart: CSBlogs.  You could also go with a broader approach using the CS default templates, but our process is extending the CSBlogs space.  The extended CSBlogs approach gives us the ability to create user-specific data (on blog ApplicationKey), but there would be more overhead if supporting multiple Themes.

Here is how we might approach adding a new application thingie to CS.

What we'll need:

  1. Menu Tab that's integrated with the CS Main Menu
  2. A simple web page to kick-start the template and skinning process
  3. Templates to integrate yet distinguish the app from other areas of the site
  4. Skinned controls to perform application specific functions

The rest is just typing.

As for a (1) Menu Tab, we'll add an iTunes navigation link item and url to SiteUrls.config.

<link name="itunes" navigateurl="/blog/itunes.aspx?PageIndex=1" resourcename="itunes" roles="Everyone">

<url name="itunespage" location="myblog" path="itunes.aspx?PageIndex={0}" pattern="itunes.aspx?PageIndex={0}" vanity="itunes.aspx?PageIndex={0}">
</url>


The "itunespage" url can now be referenced by BlogUrls.cs.

        public virtual string iTunesAlbumPage(int pageIndex)
        {
            return FormatUrl("itunespage", pageIndex);
        }


Then we add a (2) simple web page (for this app, /blog/itunes.aspx) whose only line of significance is

<Blog:Page runat="Server" View = "iTunes" id="bp" />

...where it calls a View, which loads a few skin controls and specifies the layoutTemplate, which specifies the Master Page Template.  Here are each of the items in a single file demonstrating the process.

This is the fun part, as this is where our app starts taking shape and becomes a distinct area on our site.  We would use the existing Layout and Master Page Templates to (3) create our own Templates of Distinction (iTunesTemplate.ascx and iTunesMaster.ascx.)  This solution folder below may help demonstrate.




At this point, all that needs done is (4) code up the skinned controls we've called from our iTunesMaster.ascx and View-iTunes.ascx files.  (Shown here.)

Here we are with a new CS application, happily quacking away.  The brush strokes in the step-by-step were broad, but the colors vibrant!


[tags: Community Server, iTunes]

Comments (2) | Post RSS RSS comment feed

Posted on 4/12/2006 6:52:00 AM by Dave Burke
Categories: Community Server
Tags:

Related posts

Comments (2) -

4/13/2006 1:16:57 PM Permalink

very useful - I am definitely going to use this - thanks.

Jaxon Rice |

4/13/2006 1:21:31 PM Permalink

Jaxon, thank you for your comment.  I tried to keep the process as simple as possible.  If I failed and you have problems, get back to me.

daveburke |


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke

Copyright © 2013 Dave Burke.  All Rights reserved.