Ajax Framework

Last modified by Pascal Robert on 2013/05/21 17:15

Overview

When the subject of Ruby on Rails vs WebObjects comes up, invariably the first topic discussed is Ajax support, or rather the lack-thereof in WebObjects core.
 The Ajax framework in Project Wonder provides many of the features that Rails users have come to expect, but written in a style that fits well with "The WebObjects Way" of doing things. An attempt is made to avoid writing javascript whenever feasible, as well as providing as much support for component actions as possible.

The majority of Ajax framework is written without dependencies on ERExtensions (the core framework in Project Wonder). This means that for most Ajax capabilities, you can use the framework without making your Application extend any Project Wonder classes. A handful of advanced capabilities, however, could only be written with supporting classes that are only available in the ERExtensions framework or with your application extending Project Wonder classes (like ERXSession). These cases are documented below.

Browser compatibility

According to Mike the Ajax framework should support IE 6+, FF 2+, Safari 2+ (and perhaps Opera 8+, he wasn't sure) If you discover compatibility problems, please let the Wonder team know by filing a report on GitHub.

Examples

Examples of the Ajax framework are available here:

http://webobjects.mdimension.com/cgi-bin/WebObjects/AjaxExample.woa
http://webobjects.mdimension.com/cgi-bin/WebObjects/AjaxExample2.woa

Adding Ajax Support

For any features that don't require ERExtensions, you can add the Ajax framework to your application by simply downloading the latest Project Wonder from the nightly build server and just installing the Ajax.framework and ERJars.framework in your /Library/Frameworks folder.

If you are intending to use any of the advanced features that require ERExtensions, then you should follow the Project Wonder Quickstart guide. The quickstart guide is only a few quick steps and you will be able to take full advantage of Wonder.

Available Components

This list of components should not be considered authoritative. Project Wonder changes often, particularly in Ajax.framework, with new features and components being added all the time. Right now, the only place to see the complete list is in the framework itself.

JSONRPC

AjaxProxy