A quick introduction into the CKS:EBE

Search

Accessible SharePoint WebSites
Download ARF

A quick introduction into the CKS:EBE

http://blog.thekid.me.uk

As the Beta2 release of the CKS:EBE is now available I thought that it would be good to write some articles around it. In them I'll try to describe the architecture, the projects and the code. This first article will look at how the CKS:EBE is implemented and all the different 'bits' involved.

Standard WSS blog site

The first thing to say about the CKS:EBE is that it is a feature, not a site template. Essentially this means that you can create a standard WSS blog site and use it, later you can add the EBE functionality if you want. This is very useful as it does not require you to make a decision about what type of blog you are going to use when you initially create the WSS site.

Once your site is created and you decide to use the CKS:EBE then you can easily add the solution to the farm and activate the feature on your blog site. All the CKS:EBE functionality will become available to you and your blog will switch to the default CKS:EBE site template. This can be done immediately after creating the site or after months of use. If you then decide you wish to go back to the original blog site template, then just de-activate the feature...everything will return to normal.

I should point out here that currently the CKS:EBE leaves behind all the lists and columns it creates when you de-activate it. This is so that you do not lose any information by de-activating the feature. If you don't want them anymore then you can safely delete them.

Four features deployed

The installation is very straight forward, as we use SharePoint solution deployment to install all the binaries and features. The main consideration after deploying the solution is activating the two required features.

The main feature is the obvious one. After the .WSP has been deployed you should see a new feature in the 'Site Features' section of the site settings. However there is another one which is hidden away in central administration. The site will not use the EBE without both of these features being activated.

WebApplication feature

This feature is the one responsible for modifying web.config, and so it makes sense to have it as a WebApplication feature...activating it affects all sites using that IIS application.

image

But also, as explained in a previous post, you need greater privileges to create timer jobs which modify web.config. Activating the feature in central administration generally ensures you have the rights to create these jobs.

Site (Web) Feature

The site feature contains all the pages, lists and new columns needed for the EBE. Upon activation the feature receiver executes code which performs all the updates, modifications and additions. This code also activates two other features to the web.

Themes Feature

The themes feature is the one which contains all the default themes shipped with the CKS:EBE. These can be used as they are, extended with new functionality or used as the basis for a theme of your own. This feature is hidden and is activated by the site feature.

Trackback Feature

The EBE now includes functionality for track backs. When activated this feature creates the required lists and adds columns to the Posts list. This feature is also hidden and is activated by the site feature.

New Lists and Columns

When you activate the feature the existing Posts list has some columns added to it and a two new lists are created.

Post List

The post list has some new columns added...Categories, PostTitleForUrl, CategoriesAsText. They provide the data for the new functionality of the EBE.

Media

A new document library is created called Media. This is used by the MetaWeblog API to store all the media posted to the blog using LiveWriter, or a similar blogging tool.

HttpHandler and HttpModules

The CKS:EBE makes use of handlers and modules to achieve a lot of the functionality. The main two are...

RssFeedHandler.cs

This handles requests for your RSS feeds. The handler lists the 10 most recent posts and formats it into an RSS feed. During the formatting process the CKS:EBE fixes some of the missing or incorrect tags in the feed, adds the required DC tags and the DC namespace.

Also during this process the links within the posts are fixed so that absolute URLs are used for the images and URL references. This also gives the EBE the chance to fix any links which use '/post.aspx?ID=', by changing it to use the friendly URL.

This handler also allows feeds based on categories or tags. By adding ?cat= to the end of your feed URL, the latest 10 posts with that category are included.

HttpModule.cs

This is the main HttpModule used in the feature. It is responsible for re-writing the URLs, protecting 'system' pages (if so desired), authenticating the MetaBlogApi requests and switching the .master for the current theme.

New EBE base SharePoint controls

The CKS:EBE contains a number of controls, most of which produce XML. These controls provide all the basic functionality for the blog and are what allow the blog to skinned with themes. The CKS:EBE provides a number of base classes which you can extend to provide additional functionality.

BaseXmlControl.cs

This is the basis for the majority of the controls. It provides all the methods and properties to transform the XmlDocument produced by the inheriting control. This control handles the rendering, by making use of the XslTransformControl.

XslTransformControl.cs

This is the control used to transform the XML into the HTML. Other controls in the project do not actually produce any HTML themselves as they are only responsible for producing the XML, they all delegate the production of HTML to the XslTransformControl. This control knows how to retrieve the XSL from SharePoint, do any caching and render the HTML from the supplied XML document.

BaseQueryControl.cs

This is the base control for anything that queries the site using the SPSiteDataQuery object. It exposes all the properties of the CAML query and allows you to add a specific query to any of your layouts without writing any code. Generally this control is inherited from and the Query, ViewFields, etc are set within the inheriting control.

ListControl.cs

This control gives you access to a specific list XML. You can place this control within a page layout, specifying the list name and it will return the XML. This gives you the ability to create any list in WSS and display its content within your blog using XSL.

The Themes - Modular Theme Framework - MTF

The modular theme framework is what allows the blogs to be skinned and also allows them to be easily switched. The MTF gives blog owners the ability to switch themes as desired and makes creating custom themes for WSS blogs much easier.

The MTF uses of XSL and CSS to style a blog by transforming the XML produced by the EBE. Creating a new theme involves modifying the .master page, creating some new CSS and modifying the XSL...for the most part new themes can re-use existing XSL provided OOTB.

Ari, has written an excellent user and design guide how implement a new theme using the MTF.

 

Next time I will try to expand on the inner workings and how some of the more interesting features are implemented.

Posted by Vincent Rothwell on Monday, 22 Oct 2007 14:43  - 24 Comments
Orininally printed from http://thekid.me.uk - Copyright Vincent Rothwell 2007
 

Comments

Sunday, 27 Jul 2008 10:36 by

Sunday, 27 Jul 2008 10:36 by Korea, North
Nice Site! http://google.com

Sunday, 27 Jul 2008 10:37 by Jason Samuels
We are crafting a Community Portal on WSS. I installed the Beta 1 of EBE early, but ended up uninstalling it. The reason it didn't work for me was that I did a lot of work branding the portal to (roughly) match our website, and did not want to use any of the OOB themes included with EBE. All of the other features were great, but with no way to deactivate the themes that apply with EBE the choice came down to either uninstalling it or doing a lot more work to create another theme within EBE to match our site. I chose to uninstall. I understand that there is supposed to be a way to port my theme and master page over into the EBE Themes library. But as a newbie I just couldn't get it to work. Perhaps I'll try again in a test environment, but it does seem that if I could activate the feature and de-activate the theme override that would have been a simpler solution. Another thing to note, when I uninstalled EBE it deactivated Team Collaboration Lists within Site Settings - Site Features. Took me a while to figure out why I could no longer create any type of library except Web Pages.

Sunday, 27 Jul 2008 10:37 by Vince
Jason, The original intention of the EBE was to allow you to create your own themes and to 'break away' from the default SharePoint layout. From the looks of it, your site using the defualt.master layout with some custom CSS. You should still be able to use this master page with the EBE by copying the default.master from _catalogs folder to the themes/default folder. I haven't tried it but I can;t see why it shouldn't work. I am interested to know features you want to use if you don't want a custom theme though? I am suprised about the Team Collaboration Lists as when the EBE is de-activated/un-installed it does nothing but restore a hidden column. I have not seen this behaviour. Also, as an aside, I would recommend using FeedBurner for your RSS feed. This will allow you to hide the current GUID based URL with a more meaningful one and to change the URL in the future if you start to use the EBE supplied RSS feed. --Vince

Sunday, 27 Jul 2008 10:37 by Eric Portney
Wow! Just installed the CKS:EBE B2 release... works like a champ! It solves just about all of the problems I had with the out of the box MOSS Blog template, in particular the XML in the RSS Feed no longer displays the ugly "Body:" and similar label descriptions, which were showing up in my RSS Viewer webpart inmy portal site collection. This really made my day! Now, on to customizing my own theme... Eric

Wednesday, 8 Jul 2009 08:51 by Myra Bitzer
4Nj4TF Thanks for your insights � I couldn�t agree more.,

Wednesday, 8 Jul 2009 08:52 by blaah blah
Good Thank you It�s very beautifully,

Wednesday, 8 Jul 2009 08:52 by Melinda HOLT
Thanks I�ll give that a go!,

Wednesday, 8 Jul 2009 08:53 by Rich Walters
it�s nice post, specially newbie like me,

Friday, 10 Jul 2009 11:40 by Timothy Rosso
MPfipN Hi! The post is really interesting! I�ve read your blog and can say it�s a good job.thanks,

Tuesday, 14 Jul 2009 02:14 by Brenda Downs
uMb2St Hi! The post is really interesting! I�ve read your blog and can say it�s a good job.thanks,

Tuesday, 21 Jul 2009 12:44 by Woody Means
I've just install the EBE Beta2 in our MOSS dev and I need the ability to fill in the Name of the comment from our AD. Can you share the webcontrol solution?

Thursday, 30 Jul 2009 01:03 by Jordan Winters
it�s nice post, specially newbie like me,

Thursday, 30 Jul 2009 01:03 by BirdDog Bowling.com
it�s nice post, specially newbie like me,

Thursday, 30 Jul 2009 01:05 by Brian Bitsky
nice job, very thanks�,

Thursday, 30 Jul 2009 01:05 by Michael Jaeger
Oh hell yeah� no graphical smilies around here.,

Friday, 31 Jul 2009 01:20 by pablo herrera
Oh hell yeah� no graphical smilies around here.,

Friday, 31 Jul 2009 01:20 by Brad Christensen
Thanks for your insights � I couldn�t agree more.,

Friday, 31 Jul 2009 01:21 by weiqing sun
it�s nice post, specially newbie like me,

Friday, 31 Jul 2009 01:21 by chris kinkaid
Hi! The post is really interesting! I�ve read your blog and can say it�s a good job.thanks,

Friday, 31 Jul 2009 01:21 by brandy taylor
Great work �. Thanks for your ideas.,

Saturday, 8 Aug 2009 07:54 by zQnSygqus
tr2.txt;20;50

Wednesday, 31 Mar 2010 04:29 by rfarqleet
Great posts, loved reading it, thanks!



Url

Email

Comments