Saturday, May 12, 2007

Admitted defeat

That's right, I give up. Despite having devoted the last five years exclusively to Perl development, my next project will be written in another language.

I am not happy about this, quite the contrary. I love Perl. I've learned so much of the ins and outs of Perl syntax vagaries that I feel like I've been married to it. But for at least a year I have been looking at the web development tools and frameworks in other languages and drooling. Where are the Perl tools that will double my productivity in web development? No, for two years I have spent most of my time building those tools for myself, because those available do not suit my needs and do not measure up to the tools available in several other languages. But of course, I'm not as smart as those other guys, so my home-grown tools are not as good, and not really useful outside my personal bubble.

Now, the Perl fanatics out there are going to start yelling about things like Catalyst and maybe Jifty. Hey, I know, because I am (was) a Perl fanatic myself. But Catalyst is unnecessarily complicated. In trying to be all things to all programmers, it creates more slow-downs in overhead than it does speed-ups in infrastructure. Jifty is pretty cool, and it even comes with a pony, but it just isn't there yet, and the community behind it is comparatively small. None of the Perl frameworks I've examined make it particularly easy to implement REST-based web services (it's certainly possible, but the frameworks don't make it any easier than doing it "by hand").

Now, if I had my druthers, based purely on language syntax and tools, I probably would go with Python, and a framework like Django. Django is a beautiful piece of work, in my mind the Python alternative to Ruby on Rails, and far superior in productivity to Zope or anything based on it. Also, Python's Universal Feed Parser is by far the best library for manipulating RSS and Atom feeds that I have found in any language.

But there are also disadvantages to choosing Django over PHP. PHP has the simplest deployment path, and is still the most broadly deployed of the open-source technologies on my radar. Django requires mod_python or FastCGI, and Rails similarly relies on FastCGI. These technologies are not widely deployed and not nearly as simple as just dropping a bundle of files into your document root.

But really there are two big reasons for me to run PHP: MediaWiki and phpBB. Both are excellent applications at what they do, and I need to run them both on my new web server for compatibility with previous deployments. And both are built with PHP. Since I have to have PHP installed anyway...

So in addition to Django, I will also give symfony a test-drive. This is a PHP web framework. I have no experience with it yet, but it looks more mature than the Zend Framework, seems fully capable of doing what I want, and happens to be the first hit on Google for "PHP framework", so there must be plenty of people who think it's good.

My relationship with Perl has not ended. I'm still building large-scale applications with it at my day job, and I have no doubt I will turn to it when the going gets tough in my sysadmin role at home. But it's time for me to stretch my legs, to look at some other languages in the hope of finding tools that will increase my productivity the way Perl did when I first started using it. Python and Django will be my first try, followed closely by PHP and symfony. And if neither works out, well, there's always Rails.


TheHick said...

Sissy :)

Vince Veselosky said...

@thehick: What the heck do you know, you write Java for a living! ;)

Anonymous said...

If you are planning to switch to Python, you might want to consider performance, first. I recently posted OpenGL benchmarks comparing C, Perl and Python ( Given that your GPU is doing most of the work, it’s not surprising that C and Perl compare favorably - however, Python suffers considerably in terms of string and array handling.

I hope to do Ruby benchmarks in the future; I suspect that it will do much better than Python… and if you are going to switch, you might as well switch to a language that offers functionality not available in Perl.

In terms of Perl frameworks - like you, I’ve created my own framework over the years. gcSite ( is a completely portable, template-based framework for online services.

Carl said...

I'd highly recommend symfony. I just finished up a smallish project with it and it simplified things so much. The learning curve isn't all that steep and the documentation is top notch.