Web Adventures: evaluating what to learn

— by

The past few weeks I’ve been greatly distracted while writing. Trying to build a supporting app for my dissertation and the inertia kick from chemdoodle web components brought me to learning Java / JavaScript. I’ve known for sometime that I need to learn web-dev for OpenChemArt (amongst other things), but haven’t put serious thoughts into it. Being a python coder with ancient C++ experience, none of this is familiar grounds.

Interactive web-dev as of 2011 seems to be real messy. The top level splits are in Flash, Silverlight, and JavaScript-HTML5. I cast my lot with a more open world, so JS-HTML5 it is. Within that realm there’s a second level split in the language used: Google Web Toolkit, and associated frameworks like Vaadin/Ext-GWT, compiles Java into JS. Pyjamas compiles python into Javascript. Cappuccino is based on Objective-J, which is a superset of JavaScript but with Objective-C syntax (and classes that apparently look like Cocoa). Then there’s the supposingly “pure Javascript” library/frameworks like jQuery, Dojo, Ext-JS, SproutCore, Qooxdoo, YUI, Closure…

I’ve since learnt that I don’t know enough to tell apart the strengths of the frameworks. I spent a day on each of GWT, Vaadin, Pyjamas, jQuery, Cappuccino and SproutCore (distractions!) All of them have enough eye-candy to please, and I have the hunch that probably the feature I need is one that they’ll miss. At the end I made the decision with a combination of learning goals, documentation, aesthetics, and anticipated potential. (And contributing to the imperfect world where the best doesn’t necessarily win.)

GWT/Vaadin wasn’t my thing. Even when there’s Eclipse (IDE), I still find there to be too much baggage (boilerplate and plain heavy package) to deal with. Vast number of library is a plus for the Java world, but other languages have lots of them too.

Pyjamas was the first one I tried out. Being a python coder this sounds great, but then realized that much of what I code with to provide the MVC structure (Enthought Traits) can’t be used. It’s light, and has a possibility for desktop apps, but I’m mildy anxious about it being a sinking ship (small community – and the demos were broken for me).

My cursory understanding of JavaScript is that it’s a confused language. Coming from a Python angle where there are “pythonic” ways to write code, I find JS jerry-built and have very little structure. I suspect the real programmers also think that way, since the JavaScript frameworks is quite strongly tied to extension of the core syntax (object creation etc.).

Cappuccino sounds like a good way out, but objective-J and the apparently dormant beta-Atlas (IDE) worries me. It sounds like a great thing to be able to essentially learn objective-C at the same time, but at the end of the day, I don’t really care about coding non-web apps anymore. Except for the odd game, maybe. Which I would do in Unity3D – and Unity3D uses JavaScript!

JavaScript it is. The roadmap is to learn plain JavaScript and work on a few projects with the awesome Protovis, Exhibit, and Timeline modules while keeping tabs on Sproutcore and jQuery. It seems like the two are going to be suitable for different kinds of tasks, and if I have time I should learn both.

Edit Mar 31st: I had a look at Coffeescript and loved the syntax. I’ve never realized how eliminating the braces and semi-colons can make code look so much nicer. Of course, it does other things too. Now we just need to learn 2 high-level languages…

Newsletter


Leave a Reply