Punch and yellow lies

Dogs are barking outside in the last rays of the summer sunshine, as they were invoking fall. The washing machine is making the distinct noise of it's kith and kin and I have just finalized my blog software, which probably causes the surge of the pathetic metaphoras.

Onto less prosaic spheres, spheres like balloons in an arid wasteland.

I wanted a blog, although I am inexcusably late from the heyday of the fad. I tried MovableType, but unfortunately making it work with the features and infrastructure I wanted was not feasible. So, I wrote a blog software with C# based on MySQL, RSS.NET and FreeTextBox. I am not very sure yet what I am going to write about and how often that is going to happen, but I hope this is not going to be a diary in the traditional sense. I will start by pondering the technical aspects of blogs and the basis of this particular blog. It's like with cartoons: I am sure every cartoonist draws a cartoon about drawing cartoons at some point (most of these are never published). The more metaphysically inclined cartoonists draw about drawing cartoons in a cartoon. And we end up with Hofstadterian strange loops: recursive cartoons and blog entries about blogs.

Ok, onto blog infrastructure. Amongst the features I wanted to have were Unicode output. The most boring technology of them all, character sets, provided very hard to get right with MovableType. Maybe it was the ActivePerl framework, but it just could not save the data into the database correctly. Perl apparently has methods for encoding characters into unicode, but since I am no expert in Perl, I didn't want even to try tweaking the libraries.

Easy and usable urls without file extensions are a must-have. The file extensions are a most stupid feature of most web server application: the visitor is hardly very interested that the web page is an ASPX file! Of course, the file extensions are just legacy, but nevertheless, they are just plain pointless. In order to accomplish this, the request handling of .NET classes had to be intercepted. I wrote a HttpHandlerFactory, which maps url requests with no extension to corresponding, existing aspx pages (if the server gets a request to http://arje.net/poing, it tries to get compiled page instance of http://arje.net/poing.aspx invisbly to the visitor).

If the file is not found, the http handler factory uses the default page, which I call scaffold (maybe it's not very accurate term, but it sounds cool and one of my favourite records is Solefald's The Linear Scaffold, so can't help it...). The scaffold has it's own page handling logic and it generates the front page, monthly archive pages and entry detail pages. Neither the entries nor the archives exist in the web folder. The scaffold fetches the entries from the database based on an arbitrary url, which is assigned to the entries. If a certain regular expression matches, the scaffold knows an archive is being sought. It just occurred to me that using the Levenshtein method for close string matches, it wouldn't be very hard to build a 404 page, which suggests near matches of the incorrect url: "The page /beginnign was not found on this server - did you mean /beginning". Maybe I'll do that.

Easy link management. This is not quite finished yet, but all the link lists and categories can be managed from the blog administration.

Rich text editor. NO! The evil information technology cliché buzzword! But yes, editing of the xhtml content must be easy. FreeTextBox is very cool, although it seems to have some bugs and I still need to slightly edit the xhtml by hand to attain standard compliance.

My custom software turned out quite nicely. It's very easy and straightforward to use, although my objectivity is out of reach here. I probably used something like ten hours for the core and a few hours for the graphical layout so I think that's pretty effective, not that I'm counting, though... I shall extend my gratitude to Jari Laiho, who commented the layouts I made and although I did not take heed of all his suggestions, the site looks a lot better now.

Of course, a RSS feed is provided for your feed consumption pleasure. If you are new to them, get SharpReader or Opera for consummation.

I probably will release the blogging software under GPL. Before that, I need to make it more configurable and find out whether the components I used are GPL-compatible.

Categories: Programming, Web
Posted by Matias at 29.08.2004 20.02 (13 years ago) | 561 comments


Post a new comment

Will be displayed within an image file, hopefully undecipherable to address harvesters.

content licensed under Creative Commons BY-NC-SA - Valid HTML 5