XForms and Ajax Languages
The motivation for XForms way back when, was also to push HTML further as a rich-client language. But the approach the early advocates of XForms took (and this pre-dates Ajax by a number of years) was to add more mark-up to HTML, rather than more script. Yet despite the differing approaches, I think the common goal means that XForms is very much an 'Ajax language'.
When Jesse James Garrett coined the term 'Ajax' he summed up perfectly where we are at in terms of building web applications:
Ajax isn't a technology. It's really several technologies, each flourishing in its own right, coming together in powerful new ways. Ajax incorporates:But if you put aside the specific technologies that Jesse refers to, and instead focus on what he is suggesting we should achieve, you are left with:
- standards-based presentation using XHTML and CSS;
- dynamic display and interaction using the Document Object Model;
- data interchange and manipulation using XML and XSLT;
- asynchronous data retrieval using XMLHttpRequest;
- and JavaScript binding everything together.
- standards-based presentation;
- dynamic display and interaction;
- data interchange and manipulation using XML;
- asynchronous data retrieval;
- and something binding everything together.
The how of achieving these goals is significantly less relevant than the what, and the great thing about Jesse's original article was that it in effect said 'this is the set of features our users will expect from web applications, from now on'. The genie was out of the bottle, and there was no way we could deliver below standard applications from here.
To my mind this raised expectation is the core of what Ajax is, whether achieved with a script library, hidden frames, or a full-fledge language like XForms. It gives us a convenient way to refer to this set of requirements, and a useful benchmark against which to measure our efforts.
But as I have discussed before, using JavaScript is still more than most authors want to do. Given the different approaches to the design of what amounts to Ajax langages, it's instructive to revisit Brendan Eich's original motivations for creating JavaScript in the first place. I'll quote some of it:
There were people who argued strongly that Java's fine for programmers who build components, but there's a much larger audience of people who write scripts or maybe copy a script from somebody else and tweak it. These people are less specialized and may be paid to do something other than programming, like administer a network, and they write scripts part-time or on the side. If they're writing small pieces of code, they just want to get their code done with the minimal amount of fuss. Finally, we agreed that this new language should look like Java, but be a scripting language.
Like all languages, it borrowed from others. LiveScript was the official name it was given when it first shipped in beta releases of Netscape Navigator 2.0 in September 1995, but we rechristened it JavaScript in a joint announcement with Sun on December 4, 1995.
JavaScript attracted a lot of developer attention, because what people wanted back then (and still want) is the ability to go one step beyond HTML and add a little bit of code that makes a web page dynamic - that makes things move, respond to user input, or change color; that makes new windows pop up; or that raises a dialog box to ask a question, with an answer necessary to proceed - things that HTML cannot express. That's really where you need a programming language, but something simpler than Java or C++.
Ten years on I would say that the goal has not changed--but now it's time to lower the bar again. Just as Brendan saw JavaScript providing an easier set of constructs than Java and C++, so today it's time for something easier than JavaScript.
Don't get me wrong; we use JavaScript a lot. We've even incorporated SpiderMonkey into the forthcoming Sidewinder 2...that's how much we like it! But just because we use it to build widgets and communications libraries, doesn't mean that it's the right language for an audience that is actually bigger than the one Brendan referred to.
Ajax has captured the aspiration amongst both developers and users for another generation of software, and it has raised the bar. Thanks to Jesse it's once more a pretty exciting time to be involved in software development!
Tags: xforms | webapps | ajax | javascript | programming









0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home