I’ve moved from Python to Javascript on the server side – specifically, Tornado to Node.js.
Three years ago, I moved from Perl to Python because I got free hosting at AppEngine. Python’s a cleaner language, but that was not enough to make me move. Free hosting was.
Initially, my apps were on AppEngine, but that wouldn’t work for corporate apps, so I tried Django. IMHO, Django’s too bulky, has too much “magic”, and templates are restrictive. Then I tried Tornado: small; independent modules; easy to learn. I used it for almost 2 years.
The unexpected bonus with Tornado was it’s event-based model: it wouldn’t wait for file or HTTP requests to be complete before serving the next request. I ended up getting a fair bit of performance from a single server.
Trouble is, Python’s a rare skill. I tried selling Python in corporates a couple of times, and barring RBS (which used it before I came in, and made it really easy for me to build an IRR calculator), I’ve failed every time. Apart from general fear, uncertainty and doubt, getting people is tougher.
Javascript’s a good choice. It has many of Python’s benefits. It’s easy to recruit people. Corporates aren’t terrified of it. Rhino was good enough a server. All it lacked was the “cool” factor, which node.js has now brought it. And besides,
- It’s fast. About 20 times faster than Rhino, by my crude benchmarks.
- It’s stable. (Well, at least, it feels stable. Rock solid stable. Sort of like nginx.)
- It’s asynchronous. So I don’t miss Tornado
- It has a pretty good set of libraries, thanks to everyone jumping on to it
- I can write code that works on the client and server – e.g. form validation
Bye, Python.
Comments