Okay, maybe the title is a bit dramatic... but it's a true sentiment that I think needs to be expressed.
For those who aren't familiar with CGI.pm, it is one of the most commonly used Perl modules on the planet. If you're doing CGI with perl, then the chance you're not using CGI.pm is about the same as winning the lottery. It is a cornerstone of web development with Perl, and Perl is one of the most common languages used for web development. So, to say CGI.pm is fairly popular is an understatement.
I tend to think of CGI.pm as one of those stepping stones that sometimes pop up in languages that beginners and intermediates use until they find something better. scanf in C comes to mind, as does goto in basically every language on the planet. I see CGI.pm similarly, being a stopping point until one moves to more advanced web development systems such as Mason or even pure mod_perl.
Those are pretty harsh words, likening CGI.pm to scanf and goto. As ubiquitous and useful as it is, CGI.pm is fundamentally flawed. It is, for all extents, a swiss-army knife for web development. Not necessarily a bad thing, but it is the implementation choices I find flaw with. There is basically one class for the whole system. Want to parse CGI variables? CGI is the class. Want to munge headers and redirect a user to another page? CGI is the class. Want to generate some html, including html forms dashed with JavaScript? You guessed it, CGI is the class. All of this in one class. For all intents and purposes, CGI.pm is a rather thin object veneer on a set of utility functions centered around web development.
Which isn't so bad. It just is rather old-school. Very 90s. I find it unfortunate that one of the first modules almost every new perl programmer will use is so poorly structured. Contrary to what many people think, perl is a sophisticated object-oriented language, as-or-more flexible than any other OO language out there. It has its warts, but it is very capable, and you can have well-designed, clearly-structured class hierarchies in Perl. I just wish CGI.pm were one of them.
(Here's my deathbed recant; I learned CGI with CGI.pm, and it was very helpful for me. It definitely has its uses, and its flaws are more a result of its success and organic growth than anything else. I also have tremendous respect for its author, Lincoln Stein.)
Sunday, April 24, 2005
Sunday, April 17, 2005
Obligatory First Post
This is my obligatory first post. All blogs must have a first post. This is actually about the third blog I've made (not counting my rarely updated website), so I wouldn't hold your breath between updates if I were you. I guess what is different this time is I actually have a bunch of people I want to share information with, but email is so ineffecient!
Anyway, the reason for suddenly having people to share stuff with is because I no longer live near some of my best friends on the planet. I recently moved from Raleigh, North Carolina to Sunnyvale, California. Quite a move! It was for a new job, and represented a bit of a chance to start anew, something I think everyone should do when they can. I'd been in the same job for just over four years and I was feeling... antsy? That and some recent changes in the company convinced me it was time to look elsewhere. Fortunately I found somewhere extremely cool (I won't mention the company by name yet, but clever readers may be able to figure it out from the subtle clues), and so... I jumped!
I moved out here about three weeks ago, and just finished my second week on the job. I'll post more here about life in California. I doubt there is much here interesting if you don't already know me, but hey, feel free to spam and slame me all you want -- that's what the Internet is for!
Chip
Anyway, the reason for suddenly having people to share stuff with is because I no longer live near some of my best friends on the planet. I recently moved from Raleigh, North Carolina to Sunnyvale, California. Quite a move! It was for a new job, and represented a bit of a chance to start anew, something I think everyone should do when they can. I'd been in the same job for just over four years and I was feeling... antsy? That and some recent changes in the company convinced me it was time to look elsewhere. Fortunately I found somewhere extremely cool (I won't mention the company by name yet, but clever readers may be able to figure it out from the subtle clues), and so... I jumped!
I moved out here about three weeks ago, and just finished my second week on the job. I'll post more here about life in California. I doubt there is much here interesting if you don't already know me, but hey, feel free to spam and slame me all you want -- that's what the Internet is for!
Chip
Subscribe to:
Posts (Atom)