Ajax (Asynchronous Javascript and XML) is a methodology of web programming based on Javascript code that makes requests to a webserver in the background of the page, and uses DHTML to provide on-the-fly updates without a full page refresh. The fundamentals of the request-response process are identical to that of a normal request, but to the end-user of your applications, you can create a web experience that is much closer to that of a native app.

While WebObjects has not been traditionally known for its Ajax support, the framework provides all of the groundwork necessary to build Ajax components and actions.

Ajax with DirectActions

Pierce T. Wetter III has written an extensive an excellent article comparing Ajax support in Ruby on Rails and Webobjects. In his article, he also provides examples of how one might integrate some of the popular Ajax libraries with WebObjects using Direct Actions.

Ajax framework

If you would like to get up-and-running more quickly, Project Wonder provides an Ajax framework (called, of course, Ajax.framework), which provide support for many common Ajax techniques like sliders, drag-and-drop, updatable areas, etc. For the base Ajax framework, there are no dependencies on any other frameworks in Project WOnder, so it's a great place to test the waters.

Ajax request handler

If for any reasons you can't/don't use the Ajax framework or DirectActions, WebObjects 5.4 have support for a Ajax request handler that can help you handle Ajax requests. Check CodeFab presentation from WOWODC 2008 for more details.

Related Reading

  • No labels