Epigoon

Home

Thursday, October 20, 2005

Ajax out of the box, XULRunner

Before Ajax knew his name web developers had to fight javascript browser differences before they could even execute a request. Because Ajax is becoming a new user-standard (not a web standard) there are growing toolkits everywhere. It is nice that you don't have to write browser specific code again but the real challenge is connecting your clientside code and serverside in the most transparent way.
I'm still researching in this branch but I have used two libraries on two platforms already.

Ajax.NET
A very easy to use implementation for .NET written in C#. After you added a reference to your Ajax.dll you are almost done. Ajax.NET default has a list of very powerfull object converters which include Dataset, Datatable. The Dataset converter makes it almost a no-code operation to get your SQL query results on the clientside (ex: Tables[0].Rows[0].cust_name).
It makes use of annotations which allow all kinds of quick settings like access rights.

DWR
An open source Java implementation. DWR contains a HttpServlet that reads one xml document where you define creators (how to create an object) , converters (how to convert to JS) for your accessible objects. It also has a good set of default converters and provides an interface to write your own.
DWR has built-in support for Spring Beans wich makes your Ajax code very pluggable and lets you make use of the ApplicationContext (Database access...). With a simple ServletWrappingController your can add the servlet to your Spring configuration.

I am not sure if Ajax means XmlHttpRequest+Html or just the use of a quick responsive GUI that makes use of Http and Javascript. The last project I was involved in used Mozilla XUL and communicated with a DWR Java Servlet. Because my XUL application was written in Javascript it could make use of the automaticly generated DWR Interfaces. I added some Mozilla specific features (dynamic loading of interfaces, special exception handling...) which are not availble to insecure Html code and make XUL superiour.
This is a very powerfull combination of native GUI elements and the ease of use Http with Ajax as protocol. Ajax communicates in Javascript and Mozilla has the best Javascript implementation ever, this makes XULRunner/XUL a perfect thin client for any platform that supports Ajax (.NET, Java, Php, ...). Don't hesitate to try XULRunner.


0 Comments:

Post a Comment

<< Home

Archive: current  October 2005  November 2005  December 2005  January 2006  February 2006  May 2006  July 2006 
Previously on Epigoon: Back on track