I am in the process of designing a new web page system yet again. Through the years I have embarked on this process many a time, but no examples are left on up the web. Most of the time I’ve just never published the result, but the few times where I did publish the resulting page only remained up for so long, since I never had anything to put on there. And when there’s nothing to use the page for, there no reason to keep it around either.
For many years I made webpages with PHP. Some of them were quite advanced, backed with databases, integrated with a login service on a friend’s domain (through an API we designed together) and with features for publishing and editing content. PHP is however not very conductive to good design (from a programming point of view), and I can’t say that I did end up with particularly good designs either.
In mid to late 2014 I finally decided to put my PHP days behind me (having seen the language endlessly denounced and generally made fun of all over the internet), and I instead picked up the Django framework being as I were already quite familiar with Python. My first project was the TLJ Transcript. I’d previously saved a copy of the script to my hard drive, in case it’d disappear on us again (which it did – in fact that’s what prompted me to host it myself), and I wrote a quick parser in Python to convert what I had saved into a JSON document which separated the content into spoken lines and favour text.
I wrote a small Django project to read the JSON document and convert it into web pages separated by chapters. By separating the content and the presentation in this way it was quite easy both to work updating the content (which hadn’t been converted perfectly, lacked some diary entries and other stuff, and parts of which contained minor errors) without being locked into a particular presentation. This last part is important, because while I can do the programming and I can mostly get the page to look the way I want, it turns out that I suck at design.
Django worked reasonably well, and I’ve enjoyed working with it, but it appears to produce quite slow pages. And this despite caching the pages and running a very low volume site. In all likelihood I’m just not using it correctly, but even so this slowness did end up significantly impacting the technology I chose to use for my next web page, this one.
This page is created with CppCMS, a C++ web framework with compiled templates. If that can’t produce a speedy page, then nothing will. For these blog-style pages I’ve chosen to create a very simple system that reads flat Markdown documents with special names from a predefined folder and converts them to HTML using a handy library.
Strategic caching of the file names and the most accessed posts (i.e. the front page) will minimize how many hits need to access the filesystem, and by versioning static content and telling the browser to cache it forever repeat visitors should be able to load the page lightning fast. Theoretically this static content could be pushed to a CDN, but I do not anticipate having the kind of traffic where that’s worth it. In fact, I don’t anticipate seeing much traffic at all.
As I said earlier I suck at design. That is quite evident both on this page and on the transcript itself. I can write HTML and CSS that mostly does what I want it to do, but I have no artistic vision and I cannot for the life of me draw. If you, kind visitor, should wish to give me some pointers, or perhaps even help with a design (most likely of the transcript, after all I presume that’s why you’re here in the first place), feel free to get in touch with me. One email address you may use is admin ‘at’ kircp ‘dot’ com – though that email is only occasionally checked, and it would be easier to get hold of me through sending me a PM on the forum.
If you liked the construction page, I’ve left it up under a different URL.