Sunday, February 27, 2005

Finished the Nephrotic Syndrome site

It feels really nice when you finish a project and sit back to look at the results. I have just finished creating a website for parents with kids who have the Nephrotic Syndrome.
What is the Nephrotic Syndrome?

The site is a ASP.NET based website. It has a DotNetNuke portal and a CommunityServer forums application. Both applications are easy to setup and install. A bit of experience with MS SQL helps though.

To jumpstart the discussion forum, I decided to import messages from an existing discussion site @ siteboard.de. This took some time. I spent two days trying to see if someone had written a utility to import messages. Most hints on the net seemed to point to writing your own code - but I couldn't download the source code for CommunityServer from anywhere.

So I broke the problem into two parts.
1. Scanning the webpage of the old site - and building a list of threads with their messages.
2. Posting these threads and messages into CommunityServer.

Both parts were written in Perl 5.8.
The first part used regular expressions to parse the HTML files and store the appropriate data sections in a array of SB_Message objects.
The second part was simple in the end. There is a stored procedure cs_PostCreateData that creates a new post and updates all the tables. So I can create messages directly from Perl!
The challenges were
1. Learning to use the DBI module in Perl.
2. Parsing the German dates into a HTTP::Date format.

The next challenge was to take this utility and allow it to update the messages ongoing. This would let people continue posting in the old forum, but repost it in the new forum. This required some thinking - finally I decided to use the PropertyValues field to store the old message post code.

Anyway enough said.

No comments: