Computing, Libraries, Tennis, India & other interests of Vikas Kamat
Anatomy of a Blogging Engine
by Vikas Kamat
Update Feb 2003: A modified version of the software discussed below is now available for download. See the SimplyBlog Software page for details.
Why I did not use Manila or Blogger
When I decided to add a BLOG to Kamat's Potpourri, using a readymade tool did seem logical. But after investigation, I chose to implement my own blogging engine complete with HTTP-RPC, browser hosted editing, and content management. Here're the reasons why:
Anatomy of the Kamat Blogging Mechanism
Most importantly, I wanted the ability to update the blogs from anywhere. This meant that the blog had to be editable in a browser. It had to be protected -- so others cannot modify my writing. I considered hosting it on Linux with mySQL database and talking to the Windows NT via http, where all our content is managed by the Kamat Content CrowBot, but went with Microsoft SQL Server for no particular reason.
But Windows NT's COM library is fragile, and the server performance is weak compared to Unix (see Windows or Linux? -- Tips on how to choose a web hosting platform; compares Unix based plans with Windows based plans.), so I decided to static-render (see Amateur Webmaster: Static Rendering of Websites) the blogs and upload to Unix. Only the less used archives are dynamically served.
Thanks to the wonders of PHP, I had the option of running my scripts both on Unix or NT. In fact I am running identical copies of the script on both!
"What's the big deal about a blooging engine?" you might say. But wait until you find out how easy it is for me to write a weblog. Here is a sample:
The Kamat Content Crowbot understands predicates such as LINK, ANNOTATE, MENTION and tons of other directives. It also has a Smart-Tagger that finds the most relevant link to an annotated word. It determines whether to link to a definition (Glossary), story, or a picture, and takes care of templating. The CrowBot derives its smartness via a rule-based system.
Features of Kamat Blogging Engine
Separation of form and content
The blog ingredients and blog presentation are completely separated following best practices of content management. The look and feel of the blog is controlled by style-sheets and templates. This allows for merging of blogs, easy change of look and feel, and porting.
Partial to Complete URL Translation
I write Link orgasm, and the engine spits out /vikas/blog.php?BlogID=52&alias=/erotica/kamasutra/orgasm. This has turned out to be a very convenient shorthand for me.
Replacements and Shortcuts
I have these pet typos that I make all the time, and I'm sure everyone does. Replacements is a brute-force replacement (opposed to shortcuts, where abbreviations are expanded) for text that I type. Replacement also works great when you move a folder, or want to perform a global replacement on all of my 2500 files.
Shortcuts -- This is a feature provided by most content managed software. It's like a macro that replaces one string with another string at blogger's request.
The only difference between replacements and shortcuts is that the former one is automatic, while the second one is requested by the writer. So if you define a replacement of Krishna as Krishna, all occurrences of Krishna, including part of Krishnanand would be replaced. To prevent it, you should rather create a shortcut to Krishna and reference it via Krishna.
Custom macros are hard-coded logic for my writing convenience. Eg: If I want to refer to a picture, I just enter its number (the size, location, credits, caption etc is all inserted by CMS). There are many such macros I have written over years for Kamat Crowbot, most of which I was able to port into the blogging engine.
I can't believe no one blogging tool vendor has implemented a full-text searching for blogs. Although the search logic is not sophisticated, you can search Kamat Blogs via keywords and logical operators.
Future Blog Posting
You can post to any day. For instance, see my post for my 55th birthday.
The Good, Bad and the Future
Now that I went on my own, here's what I miss:
Here's what I've learnt:
Links to Sites Mentioned in the Story:
Update: A Belorussian Translation of this article is at Анатомія блогаў рухавіка by Bohdan Zograf
|Kamat's Potpourri Kamat Weblogs AnthoBLOGy|