Just over a year back and I wouldn’t have had an inkling of what lay beyond Java/J2EE for web development. That’s how scarily claustrophobically blind-sighted I was. Many reasons for that – both personal and professional but let me concentrate on the latter :-).
In my extremely humble opinion, the greatest misconception that many students have and which is further reinforced by the half-baked information they are “imparted” in school by folks who, congenial enough in person, are clearly in the wrong profession and also by the lazy and narrow-minded one-track-mindedness of the students themselves, is that when it comes to the web, there is only one way that you can go – the Java/J2EE path (of course, if one can afford to shell out some decent moolah, there is always the MS way – .NET et al). Add to this the tremendous propanganda by SUN ( “We are the ‘dot’ in ‘dotcom’ ” etc. ) and its lackeys – IBM and Oracle, Java has been hyped and overhyped to death. The plain truth is that it is a compromise. A very bad compromise at that! Portability? By installing a platform-specific JVM on each and every machine, and the size of which is bloating by the day? It’s laughable! And performance wise too it is a poor compromise between purely compiled languages and purely interpreted languages. The only reason why Java has survived and indeed flourished is the industry backing that it has received from stalwarts like the two sell-outs mentioned above.
This may seem a particularly harsh review from a novice in the “industry” but then again, one cannot gain “common sense” by being in the industry for five, ten or twenty years. Capisce? I do code in Java and am learning J2EE on my own, but the impression that I have is that it is way too cumbersome to go from initial conception of the idea to the actual deployment in any short period of time. The frameworks hide too much actual detail and add unnecessary gunk in the wrong places. I may do it for my main job, but not for my personal projects.
That is when I started looking at the options. Actually it was Paul Graham’s excellent essay Beating the Averages where he clearly stated that any language could be used when the code itself was entirely located within the server. And I quote :
“Back in 1995, we knew something that I don’t think our competitors understood, and few understand even now: when you’re writing software that only has to run on your own servers, you can use any language you want. When you’re writing desktop software, there’s a strong bias toward writing applications in the same language as the operating system. Ten years ago, writing applications meant writing applications in C. But with Web-based software, especially when you have the source code of both the language and the operating system, you can use whatever language you want.”
Now that made a tremendous amount of sense to my logical mind. For a while, I even toyed around with the idea of using Lisp itself but then after a bit of research, I decided that the lack of any decent repository of libraries made it a huge (and I mean huge) amount of effort and time investment. So for now, as far as Lisp for web development is concerned, I would rather wait and see if it matures to the point of feasibility.
Python and Django
That brings me on to Python and the excellent framework Django. Python is quite an old language but it seems to have become a huge favorite with all sorts of programmers – from beginners to the mighty brains at Google. The pros are many – cross platform, Object-oriented, bindings with C/C++/java and powerful enough to quickly create and deploy applications ( from simple CGI scripts to complex GUIs ) in record times! Around 4-5 times faster than in Java and around the same ratio of shorter code. The only drawback(s)? Its pathetic performance which trails even that of Java and yet it is much faster than Ruby. However,I came across this wonderful piece of software called Psyco which practically speeds up Python code by unbelievable factors ( over 100% ). A must have for any serious Python developer, Okay, about Django, my research tells me that it is the best web framework out there, And it is so indeed. I suppose Aaron Swartz’ Web.py framework is the
only serious competition. In fact, the whole of Reddit was rewritten from Lisp into Python using this framework. In the words of the authors of the site, the powerful threading capabilities of web.py was a strong reason of choosing that framework. All in all, Django seems the sanest choice for Python. The only nagging problem with the whole setup is
My Rating – 4.5/5
Ruby on Rails
Next up is Ruby on Rails. I must confess upfront that the more I see of this language, the more I like it. Of course, the fact remains that Ruby by itself is not much of a head turner. It is the whole Rails framework which has given it a much needed boost. After all, both Ruby and Python have been around for almost the same time. When I mentioned that I like the language the more I see of it, I meant strictly in terms of the features and power that it provides. Not in terms of the aesthetic beauty of the language itself. In fact, the syntax is even more cryptic than that of Perl. Going by all the research that I have put in ( Phew!!! ), Ruby on Rails is a much more popular combination that Python with Django, but in terms of performance, the Python combo beats it fair and square. The one advantage that it does have is that there is no need for any extra templating language as in the case of Python. This would save me a lot of time, but considering my personal dislike of Ruby’s syntax and a slight leaning towards Python’s, I would say that it comes a close second, but still second compared to Python-Django. Another important reason is that there are more jobs oriented on Python per se than Ruby. Which is to say, from a career perspective, Python alone provides better opportunity than Ruby alone. RoR ( Ruby on Rails ) does provide more opportunities than Python-Django but till when?
My Rating – 4/5
PHP and Symfony
At last we come to arguably the most popular web development technology – PHP. Let us also consider the commonly used framework – Symfony. There is no doubt that PHP is the easiest and the smallest of the three – Python, Ruby and PHP, especially developed for rapid web development. However, the places where it suffers terribly – performance ( the worst of the three combinations ), security ( a major major drawback ) and a not-so-friendly developer community as the Python and Ruby communities. All in all, not as much potential for the future as the other two.
My Rating – 3/5
So the overall winner (again) in my most-humble-but-well-researched opinion
is Python with Django. Here is an instructive little video from Google Techtalks but presented by one of the creators of Django – Jacob kaplan Moss.
Enjoy creating the next web!