Tuesday, December 07, 2004

Javascript on the march

JavaScript is thoroughly underrated as a 'proper' programming languge. I've worked on projects where developers hate the task of implementing client-side functionality in JavaScript. They see it as a 'toy' language. Perhaps this is because of its association with performing little hacks on webpages, or maybe it's because of the difficulty in getting scripts to work correctly on multiple browsers. I'm sure everyone's first introduction to JavaScript is the image rollover trick, or perhaps having to writing ugly branching code that checked for the presence of document.all to determine which browser is being used.

In fact, JavaScript is a fully-fledged prototype-based object-oriented language. There are other prototype-based languages of note, including
  • self, which 'combines a pure, prototype-based object model with uniform access to state and behavior'
  • Io, which 'is a small prototype-based programming language'
Part of the beauty of these languages is the ease by which the language and code written them is understood. This explains why JavaScript became so popular - the fact that is was easy for people without a computing background to produce useful, correct, embedded programs quickly.

Others have long noticed JavaScript's utility. It is a key component of the Mozilla and Firefox applications. In those, it is used to script the various XPCOM components and services that these applications use, but it is also used to define the behaviour linking the various XUL components together in these products' user interface.

Mozilla are not the only people using JavaScript to deliver a 'rich' client experience. Bindows does this, but the applications are deployed entirely in your browser. Their component framework seems very impressive, although so far, I've only run their demo applications.

Perhaps its time that we stopped thinking about web applications as having most of the functionality defined on the server-side in Servlets or JSP or ASP or PHP or any-one-of-those. We probably don't even need the next big server-side things being promised by the usual suspects (cf. XAML, JavaServerFaces).

In the future, we can start to restructure web applications so that they consist of CSS and JavaScript for most of their behaviour. The server would only be invoked at points when behaviour that actually needs to reside on a server is required.

Maybe the wise have started doing this all ready, and I'm thinking about sites like Gmail and Blogger

Wednesday, December 01, 2004

First Ever Blog

This is my first ever blog entry. I've just started a job at a software engineering consultancy where everyone seems to blog. I've always thought the blogging concept to be pretty cool, but have never had to the impetus to start one myself.

Well, as they say, there's no time like the present! This blog will mainly be about dynamic languages, as I'm quite keen on them, and I'm more likely to keep this going if its about something I find interesting.

Blogger have made it amazingly simple to start this blog up. And as a dynamic language (in this case Javascript) fan who's done a bit of DHTML, I can really appreciate the editing interface that Blogger provides. I know this type of widget is becoming more common thanks to Frederico Caldeira Knabben and the FCKEditor team, but it has not always been - someone's done a really good job.