9 September 2005
Javascript Meets Ruby
Javascript meets Ruby, in the context of Kiko, a new online calendar application.  Specifically, Kiko has implemented a Javascript port of Ruby on Rails' "ActiveRecord" subproject, for implementing the "model" facet of an MVC (model-view-controller) application.  If record/model have you thinking data/database you'd be correct, and if you're thinking AJAX so Javascript can talk to the backend, you'd be correct again; see http://www.kiko.com/jsactiverecord/ for an abstract/tutorial and source code, a snippet of which is:
var me = types.user.create({email:"", password:"pass"});
Note, that is not XML being passed but rather a Javascript "object literal", or JSON.  No wonder Kiko, though barely a month old and still in beta, is being held up as a shining showcase for cutting edge Javascript technology.
Posted by htmatters at 6:36 PM | Comments (0)
22 August 2005
Javascript: Ten Years Squandered
Several technologies integral to the explosion that is "the web" are ten years old as of 2005, including ColdFusion, Java & PHP.  But let's not forget Javascript -- or, on second thought, let's.  Because Javascript came into being to enable client side form validation, and after ten years we are hardly closer to doing this correctly than in 1995.  AJAX is not the answer -- other than for simple logins where interaction with server side data is necessary anyway -- because AJAX introduces potential network latency and thereby defeats the original purpose.  JSON, being parsable on both the client and server, gets us partway, but not all the way there, as regular expressions, which are vital to form validation, are prohibited.  And that's too bad for JSON, because with vision beyond being yet another data exchange format, it could rival AJAX for buzz and utility.
Posted by htmatters at 11:29 PM | Comments (3)
19 June 2005
AJAX' Achilles Heel
maps.google.com with Javascript disabled
AJAX -- "Asynchronous Javascript and XML" -- is certainly getting a lot of attention lately.  Too bad it, and the so-called XmlHttpRequest upon which it relies, are misnamed: XML is not necessarily required.  Of much greater consequence, however, is that AJAX applications may not work if the user disables Javascript.

Try it yourself: disable Javascript in your browser, then visit maps.google.com, which arguably started the AJAX buzz.  You will receive the message that "JavaScript must be enabled in order for you to use Google Maps".

Enablement of Javascript is outside of the control of the developer and cannot be relied upon, except perhaps for a private intranet application.   For a public website however you should consider alternative strategies alongside of, or instead of, AJAX.  We will consider such a strategy next month.
Addendum, Dec 2005: The image below is a screenshot, dated Aug 2005, of visiting maps.google.com with Javascript disabled. Now instead they provide verbiage ("Your web browser is not fully supported by Google Local.") followed by this unhelpful link

Posted by htmatters at 6:27 AM | Comments (41)