Whizzy new site features

Today I finally added a couple of new and, ahem, rather snazzy features: a photo album and an RSS feed. Just like the proper grown-up blogs have…

– # –

The technical details, for anyone who wants to know.

The photo album is a ASP.NET web application written in C# with a Jet database at the back-end. (I don’t yet feel like dropping $100/year for SQL Server.) As with classic ASP, the pages are all generated on-the-fly at the server using the database. The output formatting needs some adjustment and the code is still fairly raw and unforgiving of errors, but hey – it works.

This was my first webforms app, and it went quite well. Knowing a bit about winforms and its object model certainly helped. Having built an Intranet at Cogsys using classic ASP 2.0, VBScript and InterDev, this experience was certainly several orders of magnitude less painful. Now is probably a good time to get Dino Esposito’s book to find out how I should have done it.

By contrast, the RSS feed’s XML is built by CityDesk when it generates the site. No dynamic server-side stuff at all, just a statically generated file. Viewed from within CityDesk, its really just some boilerplate XML with an embedded CityScript loop that iterates over all the articles in the CityDesk database. For each article, it then emits a chunk XML with appropriate tag values pulled out of the article’s properties. Although this approach is nice and simple, it does have one problem. Because CityScript lacks string manipulation functions, I can’t escape any HTML tags in the <description> block, and therefore I can’t have hyperlinks inside the description text.

(If you’ve got this far and you still don’t know what RSS is, take a look here. Its cool stuff indeed.)

Ultimately, and time permitting, I intend to cut the dependence on CityDesk by re-implementing the whole site using ASP.NET, with the dynamic content in a database. Even if nobody ever reads the site, it’ll be a nice learning exercise.

– # –

Update: 22nd October 2002. Found a fix for the tage escaping problem described above. Thesolution is to bracket the field in a [CDATA[ … ]] .block