Contrary to popular belief, I serve a purpose here at University News.
Over time, I’ve become regarded as less of a ‘worker bee’ and more of a ‘thinker bee.’ For that, I’m grateful because I would lose my mind if I had to print web pages to PDF for 34 hours a week. :)
So what am I up to? With all this new ‘thinker bee’ action, you’d imagine that I have something to show for it, right? Well, if you’re half as impressed with my conversational writing as I am, then you’re going to love this:
Using the smokingest OO PHP on the market, we’re developing a management system that is super-scalable, tag-searchable, schema-validatable, and MVC patternful. By the time my birthday rolls around, the University News web site should be fully supported by this new system.
Now for the really geeky stuff.
Problem: How are you going to store all of these news releases, N&E articles, UMag stories, syndicated stuff, and a handful of static pages (about us, emergency info, calendar)?
Solution: XML. In a situation where almost every piece of information produced by this department can be derived into a ‘story’ format (that is, everything has a headline, byline, copy, etc.) developing a our own abstract ‘story’ format using XML was optimal.
Problem: How are you going to retrieve and organize all of these stories/XML files?
Solution: We’ve got several different types of ‘stories’ here. Though we (read: humans) can skim a block of text and see that it’s an article from the latest News & Events, computers need much more explicit identifiers to do the same. So I came up with a sort of story index in the form of a database. Now we can track stories w/out modifying the story files. Excellent.
Problem: You really shouldn’t cram thousands of XML files into a single folder. How are you going to store all of these stories?
Solution: This was a toughie. That is, until Professor Sonstein pointed out that I’m hitting the database every time I want to retrieve an XML file anyway (due to the index that I created). I just stored the XML files in a database column alongside the info about them.
The code is certainly cleaner, I still have the ability to transform the contents of each story, and I don’t have to worry about creating/searching/deleting directories. Nice.
The work is getting more satisfying every day. :)
* p.s. – the cat in the bowl serves no purpose here.