John's Brain Dump

All the technical gyrations I go through to build software, so I don't forget them and others can benefit from them.
Telligent Community Fragment Control URL Resolver Available on CodePlex

I'll briefly announce that I've created another CodePlex project related to Community Server, or in this case Telligent Community 5.0. This module essentially allows you as a Community Server developer to create ASCX controls for widgets that are tied to a particular theme rather than being tied to the site as a whole. It will allow us at ATGi to contiune our standard Community Server development practice of not touching theme or code files that are distributed by Telligent while still being able to provide clients with fully-customized communities.

Check out the ATGi Telligent Community Fragment Control URL Resolver (or TC FCUR for short) project on CodePlex at http://tccontrolurlresolver.codeplex.com/. Please let me know what you think and if you find any defects or issues with the code, or if you have changes you would like to contribute to the project.

You'll also want to check out this thread on telligent.com, where my colleague Jeff Espenschied dialogues with Telligent's Ben Tiedt about the necessity of this sort of solution. Kudos to Telligent for allowing one of their top guys to interact with users of their project at such an in-depth level.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Jul 09 2009, 12:53 PM by John | with no comments
Filed under:
Community Server Video Preview Image Module on CodePlex

I've just created a CodePlex project for the Community Server Video Preview module. I've made several updates to the module, including support for YouTube video thumbnails and background processing. I've also spent quite a bit of time refactoring the code to adhere to SOLID principles, and the project includes several unit tests of the module.

Download the module, check out the source code, leave me feedback, contribute a patch, and enjoy!

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Upgrading a Community Server Site to a New Version of the Product

With the recent release of Community Server 2008.5 SP2, I've heard a lot of questions about how best to upgrade a customized Community Server site to the latest service pack. Therefore, I hope to spell out the method that we at ATGi use when upgrading custom sites for our clients.

When I say "custom sites", there are really four levels of customization that could be performed in Community Server. Each level involves more complex customization and deeper integration with the Community Server code provided by Telligent. For the purposes of this article, these levels of customization are:

  1. Control Panel Customization-this is the most basic level of customizing Community Server. You are at this level if the only changes to your application that you have made have been done in the Control Panel. You haven't changed any of the files that came from Telligent, much less added custom code to the application.
  2. Theme Customization-this is the level at which most communities are customized. You are at this level if you have changed HTML/ASPX pages that came with Community Server, moving controls on certain pages, adding controls to show different data on pages, and so forth. A Level 2 customized site doesn't include any modifications to code provided by Telligent, but may call web services exposed by the application.
  3. Additional Code Customization-this is level of most sites built by ATGi. At this level, we have modified the site's theme by altering ASPX files and creating new ones. We have also created additional .NET assemblies that extend certain controls provided by Telligent, and we have configured the community to use custom providers, modules and so forth. All of this is done, though, without modifying the base Community Server assemblies provided by Telligent.
  4. SDK Customization-at this level of customization, you have cracked open and changed the Community Server SDK, so all the assemblies provided by Telligent are your own custom versions. I don't recommend this level of customization at all, since you can perform just about any customization that you want at level 3. Many developers dive right into the SDK to customize Community Server, and it works just fine until you get to the stage you're at right now--trying to upgrade your community to a new version of the product.

Level 1 sites are relatively simple to upgrade. I recommend simply exporting your theme configuration file and using Telligent's provided upgrade tools. (Make a backup of your site first, of course.) Once the upgrade tool is complete, you shouldn't need to do much else; the site should "just work" on the new version.

Level 2 and 3 sites are more complex to upgrade, but there is a standard process that I use that makes the operation relatively painless. The process requires performing a three-way merge on all of the site's theme files. If your community is in a decent source control system (Your community *is* in source control, right?) then the process isn't difficult to perform. (It's tedious, sure, but not difficult.) In the event that your community is not source-controlled, I'll run through the complete process:

  1. Get the version of Community Server that your custom community is based on. You may need to search your downloads folder for the original ZIP file, or search Telligent's list of all Community Server downloads for the correct version.
  2. Commit the web project from this original version to your source control system. (If you are already using SCM, then just find the changeset/version number corresponding to this original check-in.) We're going to refer to this version of the code as the base version.
  3. Create a branch of the base version of your code in your source control system. This branch will be used to store the original Community Server code from Telligent, and you should never write your own code in this branch.
  4. Check out the entire branch and overwrite all the files with those in the latest Community Server service pack. Depending on the source control system that you use, you may need to add or delete certain files. You may also want to rename certain files if it is obvious to you that a new file has largely similar content to an old file that was deleted. Renaming files in this way could help your SCM better merge in your custom theme. Once you're done overlaying the CS service pack, check in all files in the branch.
  5. On the main code line (the one you branched from), check out all files and overwrite them with your customized Community Server site. Again, you may need to add, remove, or rename files for the source control system. Once you have made the main code line exactly match your custom site, check it in. (If you are already using SCM, you probably don't need to do anything in this step. The latest SCM version of your site will work.)
  6. Now, using your source control tool, perform a merge of the service pack branch into your main code line. If you've set everything up correctly, your source control system should be smart about presenting you with only conflicts in the upgrade--lines of code that you customized and that were changed by the service pack. You'll need to examine these conflicts one-by-one and resolve them manually. (This is the tedious part!)
  7. Once you have resolved all merge conflicts, you should have an upgraded version of Community Server that includes your customizations. Make sure that your site is running against the new Community Server assemblies, test it thoroughly, and you should be done!

Vendor Branch Merge

For level 2 and 3 custom communities, this process should be all that you need to do in order to upgrade your application. With level 3 communities, you will need to verify that your custom code executes properly, of course. I've performed upgrades of Community Server sites in which the new version of the product no longer called methods I was depending on, so you need to be wary there. But for the most part, this process will give you an upgraded Community Server site costing you as little time and pain as possible.

Make sure that you are using a good merge tool. I prefer DiffMerge and P4Merge, both of which are free.

Lastly, if you have a level 4 site in which you've customized the SDK, you will need to perform the same basic steps outlined here. The only difference is that rather than merging only the web files, you need to merge every file in the SDK. If you've made a substantial number of customizations, then you may have a very difficult time reconciling code changes, moved files and so forth between one version of Community Server and the next.

This pattern is essentially the "Third Party Codeline" configuration management pattern, explained in great detail in Software Configuration Management Patterns. I highly recommend this book for learning how to manage your codebase. And if you want to master the ins and outs of Community Server customization, I recommend that you take the Mastering Community Server Class being offered at ATGi in Columbus, OH on April 27-29, 2009. In the class, you'll learn about many other considerations and design principles that will help you build a highly customized community that is relatively straightforward to upgrade.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Apr 08 2009, 12:47 PM by John | with 2 comment(s)
Filed under:
Mastering Community Server Training Class is Here

I'm very pleased to announce that I'll be one of the instructors of the "Mastering Community Server" class, being held here in Columbus, OH on April 27-29.  I've been furiously writing lecture materials and lab content, trying to put to ink all that I've learned over the last few years about working with the product.  I am convinced that this course will be a great help to any Community Server administrator or developer.  We'll be covering all aspects of configuring and extending Community Server, from creating custom themes to adding whole new applications to the platform.  We'll also be dicussing Evolution, Telligent's behind-the-firewall Community Server solution, and I'm sure that we'll have some nuggets to share about future versions of Community Server as well.

We just recently finalized the dates and costs for the course, and registration has been opened.  We are offering the full three-day course as well as two different two-day tracks that focus content for administrators or developers.  Like I said, if you're responsible for getting all that you can out of Community Server in your organization, this is the course for you.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Feb 20 2009, 11:41 AM by John | with no comments
Filed under:
Community Server 2008.5 SP1 Sitemap Hotfix

Community Server 2008.5 SP1 contains a bug in its creation of sitemaps.  This bug has been brought up quite a bit on the Community Server forums and Telligent is aware of it.  They have fixed this issue internally, but (last I heard) the fix will only be released with Community Server 2009.

So in the meantime, you can download the Community Server 2008.5 SP1 SDK, make the following changes, recompile, and your sitemaps should function properly.

CommunityServer.Components\Components\CSContext.cs (added ", true")
Line 734:  _applicationType = (ApplicationType)Enum.Parse(typeof(ApplicationType), QueryString[CommonQueryStringProperties.ApplicationType], true);

CommunityServer.Blogs\Components\WeblogSiteMapIndexBuilder.cs (changed "blog" to "weblog")
Line 24: string url = UrlBuilder.FormatUrl("siteMap", "weblog", "app", content.ApplicationKey);

CommunityServer.MediaGalleries\Components\MediaGallerySiteMapIndexBuilder.cs (changed "media" to "mediagallery")
Line 25: String url = UrlBuilder.FormatUrl("siteMap", "mediagallery", "app", gallery.ApplicationKey);

CommunityServer.Web\sitemap.ashx.cs (changed "blog" to "weblog" and "media" to "mediagallery")
Line 74: case "weblog": return GetWeblogWithAccessCheck(context);
Line 75: case "mediagallery": return GetMediaGalleryWithAccessCheck(context);

 

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Community Server Video Preview Module

I just posted our Community Server Video Preview Module to the downloads area of Hydrus Software.  The module automatically generates thumbnail preview images for videos uploaded to media galleries and as attachments to other posts.  The module executes FFmpeg (not included) to read the video file and extract an image, which it stores in Centralized File Storage alongside the video attachment.  The preview generation module can create previews for all of the video file formats that are supported by Community Server, including AVI, MOV, SWF, MPEG, WMV, FLV and others.  The module is also configurable, allowing site administrators and individual users to specify how long into a video to take preview images.

I know that a lot of people have wanted this feature in Community Server, so I'm happy that I finally had the time to create it and make it available.  You can direct questions about the module (or problems you're experiencing) here, and I will be glad to try to help you.

In order to use the module, you must have FFmpeg on your web server.  You can download a binary executable of FFmpeg here.

I'm hoping to be able to release some more modules in the future, so check back here for new content.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Hotfix: Group pages not displayed in Community Server 2008.5

I have encountered a bug in Community Server 2008.5 and have a hotfix that I thought I would share with the community.  The bug is described in this post, and involves the fact that group (hub) pages do not display properly when the accessing user is not an owner or moderator of the group.

Telligent has plans to release a fix for this bug in Community Server 2008.5 SP1, which is code-complete at this point.  So, this hotfix will be obsolete very quickly.  But the defect is significant enough that I thought it fitting to post it.

Please direct all questions regarding this hotfix here.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Nov 03 2008, 03:17 PM by John | with no comments
Filed under:
NDoc 2.0 is (Not Quite) Dead!

Many of you were saddened by the news that Kevin Downs quit development on NDoc, the .NET documentation engine.  For those of you who haven't moved on to Sandcastle, though, there may be hope for you.  Kim Christensen has taken up the torch and continued development on the NDoc source under the SourceForge project NDoc3.  She indicates that a beta version has just been released that supports .NET 2.0.

I haven't had a chance to check out this new project yet, but it looks like I'm going to need a documentation engine in the near future.  I'll try NDoc3 for sure and let you know what I think.  In the meantime, check out the project yourself and let me know what you think.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Jul 23 2008, 04:49 PM by John | with no comments
Filed under: ,
Community Server 2008 Form Breaking Changes

I've been charged recently with the task of upgrading several custom Community Server 2007.1 sites to CS 2008.  Most of these upgrades are quick-and-dirty, without all of the effort necessary to fully re-theme these applications.  During the upgrades, one problem that I encountered frequently was the issue of changed properties in form classes (classes derived from PreTemplatedWrappedFormBase and WrappedSubFormBase).  Most of these forms have properties containing the ID's of controls in the form.  What I found was that from 2007.1 to 2008, several forms had these ID properties removed or renamed, which causes pages that reference them to not function properly.

So, this post is an attempt to list all of the breaking changes in these ID properties between CS 2007.1 and 2008.  I'm not including properties that were added between 2007.1 and 2008, just those that were renamed or removed.  If you find any changes that I missed, please let me know and I'll update the list:

Oh, and I didn't include anything from the Control Panel, since it's been radically changed between versions.

CommunityServer.Blogs.Controls.CreateEditWeblogPostForm

  • IsLockedCheckBoxId - this property was replaced by the EnableCommentsCheckBox, which has the opposite meaning.

CommunityServer.Controls.SearchForm

  • SectionTreeViewId - the ComponentArt.Web.UI.TreeView was completely eliminated from the form.

CommunityServer.Controls.EditUserForm

  • SignatureTextBoxId - this was replaced by the SignatureEditorId, which expects to point to an Editor rather than a simple TextBox.
  • BioTextBoxId - this was replaced by the BioEditorId, which expects to point to an Editor rather than a simple TextBox.
  • EnableInkCheckBoxId - this was eliminated in 2008.
  • ThemeDropDownListId - this was eliminated in 2008.

CommunityServer.Discussions.Controls.CreateEditForumPostForm

  • RecipientsTextId - this was eliminated in 2008.  This text box was only used when creating Private Messages, which became Conversations in CS 2008.  If you didn't have the create/edit post page customized, then you can go ahead and ignore this one.

CommunityServer.Discussions.Controls.ForumPostTreeForm

  • PostTreeViewId - this property was replaced by PostTreeId, which expects a Telligent.Glow.Tree rather than a ComponentArt.Web.UI.TreeView.  If you don't fix this then the threaded view of a thread will not work at all.
  • PostTreeContextMenuId - this property was replaced by PostTreePopupMenuId, which expects a Telligent.Glow.PopupMenu rather than a ComponentArt.Web.UI.Menu.  Again, fix this or your threaded view will raise an error.

That's all I was able to find.  Again, let me know if there is anything missing.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: May 21 2008, 03:00 PM by John | with no comments
Filed under:
Debugging MOSS 2007 Web Parts

Oh, I've had a heck of a time trying to debug some custom web parts that I've written for our internal portal application.  I'm using Jan Tielens' SmartPart v3, which is an excelent webpart for hosting ASP.NET UserControls.  (It even now supports ASP.NET AJAX!)  But the problem that I've constantly run into with sharepoint is the dreaded "An unexpected error has occurred" issue.  It gives no event logging, no trace logging, nothing.  It's a dead end.

But thanks to Vincent Rothwell, I finally have an answer.  He details the solution to this problem here, and the answer is to simply change a single attribute in your web.config: 

<SafeMode MaxControls=200 CallStack=false

to

<SafeMode MaxControls=200 CallStack=true

You will also need to set custom errors to 'Off' .

<customErrors mode=Off/>

This wouldn't be appropriate for a production portal, but for testing and debugging, it's a lifesaver.  Thanks Vincent for this; you've saved me from a huge headache!

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Silverlight = .NET Framework in the Browser

The buzz from MIX07 is that Silverlight is far more than just Microsoft's answer to Flash.  According to Ray Ozzie, Silverlight will include a CLR engine that is "identical to the desktop CLR", allowing developers to leverage .NET programming skills for client-side code.

Check out the article here.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: May 01 2007, 04:48 PM by John | with no comments
Filed under: , ,
TableAdapterManager in ADO.NET Orcas

I was reading the Visual Basic Team Blog a couple of days ago, and stumbled upon a pure gem that will be available in Visual Studio Orcas.  From the post:

Keeping track of all inserts, updates and deletes across multiple related datatables and sending those changes in the right order back to the server is not an easy task. How do you make sure that new orders for your customer are added correctly to the system while updating the shipping address of the same customer and deleting one of old orders that had been canceled all at the same time?

With hierarchical update support in Typed Dataset, all you need to do is to call UpdateAll() method of the new TableAdapterManager component we've added. It takes care of collecting all changes and sending them back to the server in the right order. Of course, everything is wrapped into a transaction.

We believe this would significantly improve the productivity of developers using Typed Dataset to create data applications. You can try this new feature in March CTP of Visual Studio Orcas.

Apparently, the VS team has finally solved one of the most horrendous problems that comes with using DataSets.  Before the TableAdapterManager, you needed to write a great deal of custom code in order to update your database with changes from different DataTables in the proper order.  Each time you wanted to commit the changes in your DataSet to the database, your code had to follow a process something like this:

  1. Determine which DataTables in the DataSet have changes.
  2. Determine how the DataTables are related to one another (parents and children).
  3. For each table with changes (ordered from parents to children):
    1. Extract the rows inserted/updated in the table.
    2. Use the table's DataAdapter to commit the changed rows to the database.
  4. For each table with changes (ordered from children to parents):
    1. Extract the rows deleted from the table.
    2. Use the table's DataAdapter to commit the changed rows to the database.

ADO.NET provided a great deal of infrastructure to make the whole CRUD job easier, but it stopped short of implementing this fundamental algorithm for you.  The DataAdapter class took care of managing these operations for a single table, but MS didn't provide any sort of "meta-DataAdapter" that orchestrated updates for the entire DataSet.  Even with the introduction of generated TableAdapters in VS 2005, you still had to write this coordination code by hand.  But now, (now meaning whenever Orcas is released) this piece of the data-access puzzle has been solved.

In case it isn't clear, note that the TableAdapterManager is not a framework class.  It's a custom class generated for each strongly-typed DataSet in your project.  The TableAdapterManager for a DataSet knows about the relationships between the DataTables in the set, and so is able to coordinate update operations for the individual tables.  Like the conductor in an orchestra, the TableAdapterManager cues each TableAdapter to step in and play its part at the proper time.

I'm particularly interested in Microsoft's answer to this data access problem because I worked a few years back on a solution to the exact same issue.  The Hydrus DataSet Toolkit is a data-access framework that also deals with this problem of coordinating DataAdapters to perform update operations in the proper order.  The DataSet Toolkit contains a class called the MultiTableDataAdapter that implements the DataSet update algorithm listed above in a generic fashion.  By inspecting the relationships between tables in a DataSet, the MultiTableDataAdapter can determine the order in which insert, update and delete operations should be performed against a database.

If you want this sort of functionality now, you can download and start using the DataSet Toolkit for free from Hydrus Software.  It gives you hierarchical updates, as well as hierarchical DataAdapter.Fill operations and dynamic SQL generation.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Moving to blogs.hydrussoftware.com (which is here)

I've been spending some time over the last few months getting up to speed on Community Server, and with its blogging capabilites, we at Hydrus Software thought it best to move our blogs onto an in-house CS installation. So, all of my future blogging activities will be conducted on John's (new) Brain Dump. But since you're reading this, you probably already know that.

(By the way, I was able to update my CSS vs. table layout challenge, in case anyone wants to play with that further.)

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Apr 30 2007, 04:05 PM by John
Filed under: , ,
Rapid-Fire Highlights of SD West 2007

I returned from a full week of SD West on Saturday, and it was a fantastic experience! While I don't have time to dive into all of the details of the trip, I do want to get the highlights out of the way:

  1. Juval Lowy and WCF: I spent the first full day of the conference listening to Juval Lowy discuss Windows Communication Foundation in the .NET Framework 3.0. His explanation of all that you can do with WCF was worth the whole price of the conference! His high-level look at the benefits of service orientation was compelling, and the followign discussions of each facet of WCF gave me a solid picture of each piece of the service framework. And his Dirty Harry impression during the WCF Operations and Calls talk was hilarious!
  2. O/R Mapping: Scott Ambler gave a talk on object/relational mapping that I thought was very good. He focused on the divide between developers and database professionals, and he stressed that DBA's need to adopt development methods that the software people have been using for some time now. Since I live as both a developer and DBA, I got some good ideas about how to merge the two disciplines. I also thought it was very interesting that Microsoft has built many of the "agile database techniques" that Scott recommends into Visual Studio Team System. (Much of the material from Scott's talk can be found here.)
  3. LINQ: While there wasn't as much LINQ at the conference as I would have liked, I did get to see Rocky Lhotka show off the fundamentals of LINQ to SQL, and he briefly discussed LINQ to Entities, or the ADO.NET Entity Framework. In light of my interest in O/R mapping, the entity framework really caught my attention, and I've been experimenting with it ever since I've returned home from Santa Clara.
  4. Food and Fun: If you're ever in the San Jose area, check out El Camino Mongolian BBQ. I went there with Jeff, and then went back later in the week with Eric Sink and the guys from SourceGear. (Don't fill your bowl all the way the first time; leave room for more iterations. You need to practice "agile barbequeing"!) Being from Columbus, I got to watch the Ohio State Buckeyes advance in the tournament with some folks from Seapine Software. And finally, I got to go on a whirlwind tour of San Fransisco.
Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Mar 29 2007, 01:50 PM by John | with no comments
Filed under: , ,
Understanding ADO.NET Orcas

If you're like me and enjoy diving into a technology before reading the manual, then you may have experienced confusion when working with the version of ADO.NET Orcas (formerly ADO.NET vNext).

I've been playing with the March CTP of Orcas for a couple of days now, and I finally believe that I have the different ADO.NET features sorted out. I was planning to write my own post to summarize the different new query technologies that are provided, until I found Julie Lerman's entry on the same topic. I may add details later, but her post is a great place to start.

Sorting out LINQ and Entity Framework for Data Access

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
More Posts Next page »