About the New System
posted on april 16, 2004, tag: site
It's ironic that the reason I haven't posted details the site's new back-end is because any time I've come near the site it's been to work on the new back-end. I've spent a lot of time on the new system. Between planning out the new data model, cleaning old entries, changing a few design elements and everything in between, I haven't spent much time lately actually putting content into the new container.
Data Model
I store my data in MySQL. This includes just about every bit of textual content you see on the site, aside from little bits here and there (like the "where am i?" description, etcetera). I use PHP to extract data and, using a very simple custom class, create valid XML code. Depending on which format you're viewing (xml.maniacalrage.net is raw XML, rss.maniacalrage.net is RSS, atom.maniacalrage.net is Atom), the XML is properly formatted.
If you're viewing something other than just the site, PHP spits out the raw code. If you're viewing the site itself, there's more to the process. Using an XSL stylesheet, I transform the XML into XHTML, which is displayed in your browser.
So then, the process is as such: MySQL » PHP » XML » Output OR XSL » XHTML. Simple.
What You See
During the course of moving over all my content, I decided to finally move to XHTML Strict. Then I decided I might as well go all the way and moved to XHTML 1.1. I condensed two stylesheets (one for IE and one for the rest) into one using a few simple hacks. I cleaned up a lot of code and most of the entries.
Pretty much every page on this site is valid XHTML 1.1. I say pretty much because there are still a few entries that have junk in them. I'm slowly fixing them all, though. The CSS is valid, and even all the RSS and Atom feeds are valid. I tried to be as semantic as I could as well along the way.
The site hasn't really changed much in design, save the much better look of the main navigation bar. It used to be completely unstructured and strangely aligned and now it's much more even and usable.
Reusable
Because of the nature of the data model, every page on this site is now available in RSS and Atom formats. What's the point, you might ask. The point is, you can subscribe to any page on the site and see when that page is updated and get full content from updates. For instance, you can subscribe to this individual entry's page and get updates when people post comments.
It would be trivial now to create mobile version of Maniacal Rage, an "entries-only" version, etcetera, etcetera. The XML is ready and waiting to be transformed and reused however I (or you, potentially) see fit.
In the Future
I've got ideas about how to use some of the new features of this back-end. One idea I've been playing with recently is a small Cocoa application (like Kung-log) that would allow me to administrate all areas of the site from my machine. As a test, I built a small app really quickly that pinged my XML-RPC server and returned a list of all of my entries. I like the possibilities.
It's also very easy now for me to create new sections and add new content, which is great. I can very quickly have a new section up and running and creating it's own feeds without doing much work at all. And, since it's my system, I have control over every detail of how it works, which is nice.
CMS
A lot of people have been asking about my content management system, but I haven't built one yet. I've spent so much time on the new back-end that I'm still entering new data directly into MySQL. I'll eventually get to that point and when I do, I'll be sure to post information about what I've done and show you what it looks like.
This system will not be released, unfortunately. I wrote it by hand, and it's pretty specific to my needs. While modular for the most part, it still is very much a customized system, and I don't really want to go through all the work to make it possible for everyone to use. In all honesty, it would be quicker for other people to just create their own.
I'll probably talk more about all of this again in the future, but this is just a general purpose entry to give anyone interested an idea of what's going on here. Feel free to post your questions, comments or suggestions as always.
Comments
There are 3 comments, comments are closed
David Collantes on 04/16/2004:
Garrett, this is all very interesting. A friend of mine is working on an XML Compiler that will do —so he says— what you have done here and more. It will be written in .NET and will run on MS Windows first, but later (the server version, when it comes) on any platform that has .NET support —Mono, etc—.
I was talking to my wife last night about what you are doing here (we talk technical stuff every once and then) and we both agreed that while xPad hasn't generated that much income (http://maniacalrage.net/archives/2004/03/xpadstatus/), a release of an XML/XLS based CMS would. But that is oho. Not that I am saying or thinking you should do such thing, but it crossed our minds and we spoke about it.
Thanks for providing good reading, Garrett!
Tomas on 04/16/2004:
FYI: The new system generates erroneous URLs in the "Continue Reading..." links in the RSS feed (they're relative, not absolute, and therefore point at a (nonexistant) file on my own harddrive).
Garrett on 04/18/2004:
David—What you're saying makes sense. I just don't know if it would be worth attempting to make a CMS that I would charge for when there's MT and TypePad and (soon) Textpattern, etcetera.
It's also a ton of work. You never know, though, we'll see what happens. If, down the road, it starts coming together, maybe I'll just open-source it at least. I'm not sure.
Tomas—fixed, thanks.