Thursday, September 21, 2006

Java SE starting a features diet

Apparently Java SE will take on a slimming program. With new guidelines from JSR 270, Java SE 6 will start shedding some weight. First on it's way to the dumpster: javax.sound.midi, according to SD Times. Here's the link: http://www.sdtimes.com/article/story-20060915-04.html

I hope they move that into add-ons library. Sure the feature appetite need some control, but why not keep things which are already available as add-ons for those who may need it to maintain backwards compatibility?

Short intro to Ajax

What is AJAX?

Ajax in mythology was a Greek hero of the Trojan War. He was the son of Telamon, the king of Salamis as descibed in Homer's Iliad. He was one of two Trojan War heroes named Ajax. The other was Ajax the Lesser, Oilean Ajax, a Greek hero and legendary king of Locris.

But AJAX in relation to web technology is: Asynchronous JavaScript Technology and XML (AJAX)

AJAX is neither a new technology nor a new programming language, but rather a new way of using a composite of supportive technologies, mainly javascript and XML (hence AJAX) to create a more interactive and faster web applications.

The technology uses JavaScript to send and receive data between a web browser and a web server by using an XMLHttpRequest object to facilitate the exchange. Then, the next part of the process is having a callback method processes the data returned from the web server. This callback method is specified when the XMLHttpRequest object was setup prior to sending the request (xmlHttpReqObjectName.onreadystatechange = javascriptCallbackMethodName;.)

The data request can be made via a GET or POST. The rule of thumb is:
  1. If you're not changing the state of the server use get.
  2. Otherwise use POST.
And off-course things are not always that simple, there are always other consideration to be observed.

The slick thing about AJAX is that it makes the life of a web developer a little easier when all the developer needs is to update a small portion of the webpage in question. Instead of reposting everything, change a tiny bit of data and re-render everything - now, the developer can do that behind the scene: exchange data with the web server transparently and then use JavaScript to process the retrieved information and refresh the small block of information that need refreshing.

AJAX can be a tool for an elegant web solution, but like any other technology can be abused and overused to create a monstrous size of a mess.