Archive for August, 2005

* XForms Autocomplete

Posted on August 25th, 2005 by Dave Johnson. Filed under AJAX, Web2.0.

I seem to have missed this blog from back in April but Mark Birbeck has written about how to implement a Google Suggest type application using XForms [1].

It appears that XForms makes building the application quite simple and may be a good way of doing things, but does it offer the flexibility required for something like the EBA ComboBox? I can envision a situation where someone with little programming expertise would appreciate the mark-up based XForms for building a simple Google Suggest but in reality one generally needs a little more control - that’s why you program with Java rather than Hypercard. XForms may make it easy to build but it is still not a replacement for AJaX since with more abstraction you loose control of the details.

On the other hand, for component vendors like us it might make our job of building components that much easier.

[1] XForms Patterns: Incremental and ‘Google Suggest’


* Theoretical Dogma

Posted on August 24th, 2005 by Dave Johnson. Filed under AJAX, JavaScript, Web2.0, XML, XSLT.

There are a multitude of ways to get data to and from the client in an AJaX application.

A recent article by Jon Tiresn [1] outlines what he feels are the three most useful methods of returning data to AJaX client applications and makes a point of dismissing the idea of sticking to standards and other theoretical dogmas. I highly recommend reading the article but will mention the three methods he discusses which are:

1) simple return
2) snippit return
3) behaviour return

and I will add what I feel is an important fourth:

4) XML return

I added the last one because it is a very important tool in the AJaX toolbox since XML data can be transformed on the client very quickly using XSL-T thus reducing server load, enabling the inherent use of app server data caching and adhering to standard design principles. You can even do various tricks to reduce the size of your XML data so that you are actually transferring very little data.

All of these four options are good if used in the proper situation. I generally agree with Jon that there should not be any of this generic interface (SOAP, SOA, WS-*) type malarky in AJaX applications. There may be some special cases where one might put high value on being able to re-purpose AJaX data and thus make the client and server very loosely coupled but for the most part AJaX services will not be available to the general public and exist primarily to support the user interface.

Furthermore, due to the constraints that JavaScript places on AJaX applications in terms of latency and usability, one has to engineer both the client and sever interfaces for the best performance possible; this often includes performing time consuming operations on the server rather than the client and returning ready to process JavaScript snippets or behaviours as opposed to raw data / XML. This is not interoperable or standards based (yet) but pays huge dividends in terms of application usability.

That being said there may be instances where you are dealing with the same data in both internal and external applications and it might be helpful to be more standards based. Another strong case for being standards based arises from situations where you are building AJaX based components for use by the development community in web applications. These type of developer components should be easily integrated into internal systems and thus can benefit from being standards based - that is why there are standards in the first place after all.

In the end one has to ask several questions to determine what method to use. Some of the important questions to ask about the application would be

  • is the data going to be used for several interfaces or systems inside or outside of your company (SOA type situations)
  • is the application a one off (Google Suggest)
  • how important is application latency
  • how important is browser compatibility
  • how much traffic and server load is expected
  • how much client processing can be done without compromising latency goals
  • how important is it to be standards based
  • how difficult will it be for a new developer to extend / debug the application
  • how much raw data is being transferred between the server and client
  • how much formatted (HTML or JavaScript) data is being transferred

and so on (its late and I am tired:)). One thing is certain - the lines that define a traditional MVC architecture can get very blurry when dealing with AJaX.

What are other metrics that people have found useful when considering data access in an AJaX application?

[1] Designs for Remote Calles in AJaX


* It’s Good to be Green

Posted on August 18th, 2005 by Dave Johnson. Filed under Energy, Uncategorized.

I noticed today on the CBC that the average price of gasoline (petrol) in Canada has risen to over $1 CAD a litre [1] for the first time ever (not sure if that is considering inflation or not). It is no wonder given that a barrel of crude oil costs nearly $66 USD these days.

I find it strange that Steven Harper (the leader of the official opposition party in the Canadian Parliament) seems to think that we need to reduce taxes on gasoline to help out Canadians … given that the trend of rising oil prices will likely continue due to Peak Oil [2], if he really wanted to help Canadians he would suggest increasing taxes to get people to ride their bikes or take the bus and then put any extra tax revenue towards helping people to kick their nasty gasoline habit. If fewer high flying executives, soccer moms and Internet tycoons would drive ridiculous cars like these (for the internet tycoons) or these (for the soccer moms) then we might be in a better situation both environmentally and economically. As fuel prices rise in the future it will increase the cost of everything that needs to be moved arround like food or products from Amazon. At least it will even the playing field for local food producers who traditionally cannot produce food as cheaply as you can in places further afield.

Given that transportation acounts for about 2/3 of our oil usage [3] it just seems silly reduce taxes or wage billion dollar wars for oil [4] rather than combatting consumption. Please Mr. Harper (and the rest of the Canadian Government) wake up and smell the reality of running out of oil.

[1] Gas Prices Soar Above $1 - CBC
[2] ‘Peak Oil’ Enters Mainstream Debate - BBC
[3] US Oil Demand by Sector - US Energy Information Administration
[4] Cost of War

Tags: .