Title Image

Don Xml's Grok This

The home of Don Demsak
Welcome to Don Xml's Grok This Sign in | Help
in Search

This Blog

Syndication

Site Sponsors

DonXml's All Things Techie

CommunityServer 2.1 Enhancements

Well, it has definately been a long time in development, but I finally migrated my site to CommunityServer 2.1.  I've been telling Scott that I was planning to move this site to CommunityServer since version 1.1, so I'm sure he thought this day would never come.  I made the move that much more complicated by deciding that I needed to get off of WebHost4Life.  For the average blog, WebHost4Life is a great deal.  But, I detailed the reasons on this post from over the summer, and in the comments I detailed all the different options.  Eventually I decided that I really should move to ORCSWeb for their great service, but I didn't think that I needed that level of service (and the associated cost) just yet.  So, when Scott mentioned that he was trying out ASPNix, I had to check them out, and for a similar price to WebHost4Life, they offered more (more databases, and SQL Server 2005 64 bit to boot).  So I decided to give them a try, and that is where this site is hosted now.  I still have a large credit left on Webhost4life, so I'm going to maintain some sites there for a while, and move them here later.

But, this post is really about CommunityServer 2.1.  I've found this release to be much improved over the previous versions.  The skinning experience is easier, but because of the lack of documentation, it can be very difficult to figure out with out some serious splunking of the code.  I decided to use ASP.Net 2.0, and switch it to use the Visual Studio Development Server (instead of IIS).  This gives me the ability to develop multiple websites using CommunityServer on my WinXP Pro laptop, without having to continuously jump over to IIS and switch the Home Directory (I don't like to work in Virtual Directories, since that is not the way the site will be deployed).  I have a bunch of sites that I maintain (this one, my wife's site, my friend's sitemy daufghter's site, and the NJSQL site), and each one has its own skin.  At this time, only NJSQL and this site are live on CommunityServer, but the others are close to finished.  And on top of different skins for all those sites, I have 2 branchs of CommunityServer that I'm working on (I'll detail them later in this post), plus the orginal code shipped with 2.1.  So, I had to create a easy to use way to work on each of these different implementation of CommunityServer, along with a way to do branching and merging.  The current process is pretty manual, but it is very easy for me to work with, since I have a organized structure.  WinMerge has become one of my favorite tools for the manual merging of these development streams.

I migrated from a modified version of .Text 0.95, which is .Net 1.1.  There is no straight migration to CommunityServer 2.1 for .Text.  I used the DotText-CS-Converter to migrate to a CommunityServer 1.1 database.  I had to customize the code a bit to handle some of my customizations, but since I've been playing with this process since 1.1, this step was pretty easy.  I then ran the 1.1 to 2.0 upgrade SQL Scripts to get to 2.0.  Next, I had to fix a known bug where Anonymus users names are lost when you upgraded from .Text.  It is a simple SQL update script, but something that took a while for me to find a fix to.  Then I could run the 2.1 upgrade scripts, and then bring up the site with the standard CommunityServer skin.  The process was pretty painless, although there were a lot of steps that I had to make sure I executed in the correct order.  Once I had the standard site up and running, then I could proceed to skinning the site.  I decided not to go with a fully tableless site, and instead utilize the majoroty of the layout that was in the default skin.  I didn't want it to look like every other CommunityServer site, and I also wanted something that I could easily modify for the other sites that I host.  I wanted people to know that the other sites were skinned by me, but not have them all look too similar.  This is the part that took me the most amount of time, and you can judge the results for yourself.  I am not a graphic artists, but I occasionally play that role in some of my consulting assignments, and I'm dangerous with Adobe Illustrator.  I think the site looks a little flat (no shine), but that is a style I'm good at, so I don't fight it too much.  I even made sure to implement my Custom Border style (detailed in the post CSS Tutorial – Designing Without Tables and Not Lose Resizable, Custom Borders).  I found a couple issues with that article when using IFrames, but for the most part, that custom border style works well, and is easy to drop back to Tables if you run into a bug you can't fix.  Still, custom borders is a pain to do in HTML and CSS.

The first branch I create for CommunityServer 2.1 is to try to make it valid XHTML.  Most of the changes are done in the various ASPX and ASCX files, but there are a couple places where I needed to go into the code and fix either hardcoded tags, or places where the RenderBeginTag and RenderEndTag were not overridden.  What happens is that you get a span tag by default, which may not be valid, depending on what the child tags will be.  I also updated a lot of the warning messages (like using nowrap), and updated it to use the XHTML approved style attributes.  If anyone wants this code base, let me know.  It is alot of work to try to make a framework this large valid XHTML, and it is so easy to make it invalid with all the non-XHTML valid blog writers out there, so I'm not sure about the value beyond saying I've got an XHTML compliant site.  But, I'll try to keep this site as XHTML valid as possible (without going back and fixing all the old posts). Update: I forgot to mention that after my initial announcement that I was looking to make CommunityServer render valid XHTML, Chris Wallace volunteered to help, and is contributing to the codebase (yes it still is a work in progress).  Thanks Chris!

The second branch (built upon the XHTML branch) is all things I wanted in CommunityServer but isn't in 2.1.  This branch currently has 2 major features, an upgraded Navigation Menu Bar, and HTTP Compression.  The new navigation bar now lets me put individual blogs in the menu, and will highlight them if you are in the area of the site for that blog.  Out of the box, this feature only works with the major areas of CommunityServer.  I updated the SelectedNavigation control to parse out the blog part of the url. and then use the SiteUrls.cofig file to place the blogs in the nav bar.  You have to add a new url element, a location element, and then a link element in the navigation element.  Email me if you want the details.  The other major enhancement was adding HTTP compression support.  With Jeff Julian, I added this to .Text way back when utilizing Ben Lowery's component.  Since .Net has gzip built in I first just tried to roll my own.  But eventually decided to check out Ben's updated .Net 2.0 and use it as the basis of my implementation.  His version does a much better job determining the correct flavor of compression to use, and tryint to write that all myself was a waste of time.  But, I didn't like that Ben's code defaults to using compression for all mimetypes and urls.  I wanted mine to opt in, instead of forcing people to opt out.  So, I reworked that section of his code, and then retrofitted his HTTPModule into the CSHttpModule.  Thru the web.config file, I then only turned on HTTP compression for HTML mimetypes and only ASPX pages.  I got the dramatic reduction in bandwidth that I'm looking for, with minimal exposure to browser problems cause by compression of nonsupport mimetypes.  Eventually I'll get around to writing a blog entry detailing my customizations.

Published Thursday, September 21, 2006 4:12 AM by donxml

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Community Server Daily News said:

from the editor's desk occasional messages that don't fit anywhere else Greetings from Telligent Corporate

September 21, 2006 1:52 PM

Jason Haley said:

September 21, 2006 9:13 PM

jayson knight said:

Congrats on the migration, looks great. Welcome to the big bad world of Community Server, and I'm looking forward to the branches you release!
September 21, 2006 11:19 PM

Atlanta .NET Regular Guys said:

Great job to our friend Chris Wallace on helping to make changes to Community Server. He and DonXML...

September 22, 2006 6:42 AM

Daily News Faq List said:

DonXML (Don Demsak) migrates from .Text 0.95 to Community Server 2.1 and begins working in the source
November 22, 2006 9:16 AM

Community Server Bits said:

DonXML (Don Demsak) migrates from .Text 0.95 to Community Server 2.1 and begins working in the source

March 12, 2007 9:21 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About donxml

I’m an independent consultant, specializing in .Net solutions architecture, based out of New Jersey who also doubles as an evangelist for XML, Domain Driven Design, enterprise architecture and .Net. I do not work for Microsoft, the W3C or any other big company that you may know of (at least not yet). I’ve been an indie for over ten years, and although I’ve been tempted a couple times to take a job with companies like Microsoft, I’ve haven’t found something better than my current situation. I work mostly with the large pharmaceuticals that are based here in New Jersey, and usually find myself on long term contracts. Definitely not the prototypical indie consultant, but it lets me dedicate time to my non-income generating activities like the developer community stuff, plus financing open source projects like XPathmania and MVP-XML. If you would like to talk to me about doing some contract work, just contact me via the contact page. My rates vary widely, depending on lots of different variables, but mostly distance from Jersey, and type of work. Plus, I’ve been known to donate some of my code for various projects.
Powered by Community Server, by Telligent Systems