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.

Receive Email Updates

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!
Code Formatter for Windows Live Writer

Here's a handy tool for all of you code-slinging bloggers out there. Steve Dunn has created a Code Formatter for Windows Live Writer, which allows you to paste formatted code directly into your blog posts. It supports C#, XML, and other languages, and should make your blogging experience far easier. Check it out.

Thanks to Roy Osherove for pointing this out!

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Mar 08 2007, 01:52 PM by John | with 1 comment(s)
Filed under: ,
Database Vulnerabilities: SQL Server 2005 vs. Oracle

I'm not usually one to grab the coattails of other bloggers, but this post is worth mentioning. It indicates that SQL Server 2005 has not had a single disclosed vulnerability in its first year of release, which is an impressive feat. Heck, I've found vulnerabilities and errors in software I've released in the first ten minutes. SQL Server 2005 - 1 Year And Not Yet Counting...

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Dec 21 2006, 03:48 AM by John | with no comments
Filed under: ,
Escaping Tables With CSS

(skip the lecture, get straight to the challenge) 

I must say that I've become a fan of CSS and the ideas behind the semantic web. I like the notion of table-less design, using <DIV> and <SPAN> elements everywhere to make my HTML clean and self-descriptive.

Juxtaposed against my desire to create slick CSS, though, are the desires of my employers. I'm a consultant, and my job is to get things done. The clients that I work for are businesspeople; they want their applications built quickly, and they aren't terribly interested in paying for hours of tweaking CSS to look exactly right on every browser. They want applications that are functionally complete, look good in IE 6, look acceptable in Firefox, and could look like hell in Opera, Konqueror, or whatever other browser had 0.6% of the market share last week.

That being said, while I would like to use CSS solutions to solve many of the layout problems that I face, I often find myself falling back on good-ol' tables. I just don't have the time to figure out CSS solutions to some presentation issues. As I've reflected on the layout problems that have forced me to use tables, I believe that I've boiled them down to one exercise, and I'm asking for help to solve it without tables. If you want to take a shot at it, I've included the problem here, and you can post potential solutions in the comments.

Essentially, what I want is an HTML/CSS structure that has two columns of arbitrary heights and widths. I use this structure for form entry fields and labeled multi-line values, and every time I try to put together a CSS solution, I throw my hands up in frustration and create a table. I've included here a table-based solution that displays the format that I want, and I've created a small HTML segment that is the starting point of a CSS solution.

Now, before you begin, let me point out that I'm looking for a *simple* solution. Sure, I bet you can solve this problem with thirty lines of Javascript, but why is that necessary for a basic presentation issue? The problem can be found on this page.

[Edit 12/6] Okay, I've realized that the problem case I presented is a bit too simple. In reality, what I want is to be able to have multiple label/value sets on top of one another, with each column of labels and values vertically aligned. When I get a chance, I'll update the test. I know, I know, I'm changing the rules of the game. If you don't like it, you can write about it on your own blog :-)

[Edit 4/30] After many months, I've finally updated the challenge to include two rows of label/value entries.  This gets at the crux of my problem: that I cannot easily change the text of one of the labels and have all of the value entries left-align with one another.  There are several comments on my old blog, and I'd love to see some folks weigh in on the updated challenge.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Dec 06 2006, 02:55 AM by John | with no comments
Filed under: ,
GMail vs. Windows Live Mail

As you probably know by now, I'm a Microsoft fan. My company is a Microsoft certified partner, I develop using Microsoft technologies, and in general, I really like what I get from them.

That being said, when GMail appeared, I was looking for a webmail service to separate my work and personal email, and so I signed up for an account. I like it very much: labels are cool, searching is great (what would you expect), and I am personally fine with the UI experience.

Then along comes Windows Live Mail. As I said, I'm a Microsoft fan, so I thought I would try to sign up for an account and think about switching.

Bad idea.

I simply couldn't figure out how to get started. I signed up for a new MSN Passport account (not a Windows Live ID, strangely enough) since that was where my attempts to create an account led me. Once I had that account all set up and in place, I started the Windows Live Mail signup process.

Sorry! You can't get to this page.

It could be because:

  • You're not authorized to see it
  • You've bumped into some technical problem, and may need to try again

So, I guess I'll be sticking with GMail until I hear that Live Mail is better. Albeit, this is just one user's opinion, but I think it counts for something.

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Aug 28 2006, 04:04 PM by John | with 1 comment(s)
Filed under:
NDoc 2.0 is Dead!

I just got an email from Kevin Downs, chief of the NDoc .NET code documentation project, saying that he is no longer supporting development of the 2.0 version of the software. His primary reasons for quitting are (1) a lack of community support (read: $$$) for the project, and (2) a mail-bomb attack directed at him personally, apparently related to the fact that he's not working as fast as someone would like him to.

I love NDoc, I consider it to be the standard for documenting Microsoft .NET class libraries, and I'm sad to see it go. I really hope that someone is willing to pick up the project, since it really is (at least so far) the best thing out there to cleanly document custom assemblies. But I cannot fault Kevin for his choice, since I have a family to feed and relate with as well, and I can't spend all of my spare time working on massive software projects for free.

Here's the text of the email that Kevin distributed to his alpha tester group:

I have decided to discontinue work on NDoc 2.0 and no longer participate in any open-source development work. The development and release of NDoc 1.3 was a huge amount of work, and by all accounts widely appreciated. Unfortunately, despite the almost ubiquitous use of NDoc, there has been no support for the project from the .Net developer community either financially or by development contributions. Since 1.3 was released, there have been the grand total of eleven donations to the project. In fact, were it not for Oleg Tkachenkos kind donation of a MS MVP MSDN subscription, I would not even have a copy of VS2005 to work with! To put this into perspective, if only roughly 1-in-10 of the those who downloaded NDoc had donated the minimum allowable amount of $5 then I could have worked on NDoc 2.0 full-time and it could have been released months ago! Now, I am not suggesting that this should have occurred, or that anyone owes me anything for the work I have done, rather I am trying to demonstrate that if the community values open-source projects then it should do *something* to support them. MS has for years acknowledged community contributions via the MVP program but there is absolutely no support for community projects. Once Sandcastle is released, it is my belief that it will become the de-facto standard and that NDoc will slowly become a stagnant side-water. This will happen regardless of technical considerations, even if Sandcastle were to be less feature-complete. It's just an inevitable result of MS's 'not-invented-here' mentality, one only has to look at Nant and NUnit to see the effects of MS 'competition'. This is not, however, my only reason for stopping development work - I have a big enough ego to think I could still produce a better product than them :-) As some of you are aware, there are some in the community who believe that a .Net 2.0 compatible release was theirs by-right and that I should be moving faster despite the fact that I am but one man working in his spare time... This came to head in the last week; I have been subjected to an automated mail-bomb attack on both my public mail addresses and the ndoc2 mailing list address. These mails have been extremely offensive and resulted in my ISP temporarily suspending my account because of the traffic volume. This incident has been reported to the local authorities, although I am highly doubtful they will be able to do anything about it. This has was the last-straw and has convinced me that I should withdraw from the community; Im not prepared to have myself and my family threatened by some lunatic! Kevin P.S. If anyone wants to take over as admin on the SourceForge NDoc project - contact me. If not, I'll be removing myself in 14 days.
Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Jul 26 2006, 07:39 PM by John | with 1 comment(s)
Filed under: ,
More Posts Next page »