frameworks
Introducing Prankmail.org (and the Drupal way VS roll’yer'own)
BlogA few rainy weekends ago, I had the urge to roll up my sleeves and build something. Every web application I've built in the last few years has been built on Drupal, and I wanted to see (remind myself) what it would be like to develop an application from scratch (where "scratch" = a random collection of open source components combined with bits from Drupal). I also had given myself the timeframe of a weekend, so building "Basecamp right" was out. I wanted a simple coding project.
Since I'm extremely childish, immature, and a fan of the practical joke, I decided to build a web app that let you send an email to someone, but make it appear as if it comes from someone else. I decided to call it Prankmail. Frivolous, slightly dangerous, and perfect for a rainy weekend indoors.
Skipping to the good part, you can check it out at:
http://prankmail.org
And if you would like to read about how I built it, and how the
"build from scratch" process compares to building a Drupal site, continue on:
Before I really started with application specific code, I wanted to grab a few Open Source pieces and get a simple and efficient framework to build on (We're not using Drupal, after all).
I wanted to have clean URL's (none of that goofy query string nonsense) so I took a look at how Drupal uses MOD_REWRITE and .htaccess files and cobbled together a simple solution. I've also been looking at the new Zend framework, and I like the way it maps URL's to controllers. I am also a fan of Drupal menu system, so I hacked up the arg() function from Drupal, and made it route URL's to controllers. I like Ruby's "convention over configuration" and so by default, I set it up so a URL of '/message/123' gets passed to a function 'controller_message' with an arg of '123', if that function exists.










