New in 0.5 RC1 since Beta4: xajax PHP Changes: * Added configuration option for response queue size * Added optional third argument ($sId) for includeScript() / includeScriptOnce() * Added optional media type for ->includeCSS() defaults to 'screen' * Added optional script type for ->includeScript()/->includeScriptOnce() defaults to 'text/javascript' * Several minor bug fixes and improvements * Fix for bug when passing bool value from browser to server * decodeUTF8Input is now default true when XAJAX_DEFAULT_CHAR_ENCODING is set to other encoding than 'utf-8' * Fixed minor bug in argument manager (empty parameters error) xajax JavaScript Changes: * Added code to properly detect duplicate CSS files when Media type is specified, changed response handlers to only send media type, script type and script ID if they are specified, else default value is added on browser side, clean-up / update of start-up code for JS modules. * Cleaned up the command handler registration and built in command handlers. * Fix for getFormValues. name="foo[]" will now return a single array no matter which type of field * Added translations in en, de, es, fr, nl, tr and bg. Thanks to all contributors! * added support for variable type transfer accross request -> response. * minor bug fixes in xajax_core.js * Added header parameter for xajax.request() to add additional HTTP header informations. * Tested on Internet Explorer 7.0, Firefox 2.0.0.6, FireFox 3.0.1, Opera 9.23 ---- New in 0.5 Beta 4 since Beta 3: xajax PHP Changes: * Resolved issue with argument parser / decoder that could cause an infinite loop condition when a malformed request is sent to the server. * Added the ability to compile the xajax core files into a single include file, thus reducing load time. The compiled core has been stripped of all code comments, debug code and error trapping code. It is designed to be used on a production server with production ready xajax enabled pages (which have already been tested with the standard version of the xajax core). * Fixed issues in the script deferral feature that was introduced in beta 3 so that plugins are included in the correct order. * Added the ability to load an alternate language module that can provide debug, error and status message text in the desired language. * Tested on PHP 4 (4.3.10), PHP 5 (5.1.4, 5.2.2) and the Zend Core 2.0 xajax Javascript Changes: * Identified and resolved memory leak issues. * Added the ability to load an alternate language module that can provide debug, error and status message text in the desired language. * Improved / fixed issues with the newly renovated xajax.getFormValues: 1) Fixed the handling of input field names formatted as an array 2) Improved performance and organized the code * Tested on Internet Explorer 7.0, Firefox 2.0.0.6, Opera 9.23 ---- New in 0.5 Beta 3 since Beta 2: xajax PHP Changes: * Modified the plugin system so that plugins can effect the initial page load, the request processing and response processing phases. * Added / updated plugins to support the existing function registration, registration of callable objects and a new server side event processing registration. * Added a script generation deferral feature that allows xajax to insert a SCRIPT tag with a src attribute referring back to the xajax request URI that will then generate the client side javascript code. Style blocks generated by the loaded plugins will be handled in a similar manner. * Added xajaxUserFunction class to aide with the specification of a user call back function. The xajaxUserFunction objects can be used when registering functions and can include a reference to an include file. * Updated the function registration process so that functions can be registered in a variety of ways depending on which plugins are loaded. New registration methods can be added by adding a plugin to support the registration method and handle the processing of the functions specified. * Call options can now be specified when functions are registered. When the associated plugin accepts the function registration, the call options are saved; when the javascript function stubs are generated, the call options are included. Thus, each javascript stub function can be customized from within the PHP script. This elliminates the need to call xajax.call or xajax.request directly (in most cases). xajax Javascript Changes: * Added xajax.request function to replace xajax.call and provide support for the latest core changes that allow greater flexibility in registering functions, callable objects and server side event processing. * Added a context member to the request object so that the caller can set an object or value to be maintained throughout the processing of the request. Added response commands that allow the php script to effect the context object or value. * Reworked the xajax.getFormValues function to add two new features: 1) You can now request that getFormValues return only a portion of your form by passing the ID of a DIV tag or similar that contains the input controls to be read. 2) You can now access the return value of getFormValues as a javascript array. In prior versions, you would receive a string that could be transmitted to the server, but it was not very useful on the client side. Instead, you can read those values in your javascript and / or send them to the server as needed. ---- New in 0.5 Beta 2 since Beta 1: xajax.inc.php changes: * Modified portions of the code to allow PHP functions registered with xajax to optionally return text or XML data other than a response object that can be handled by a custom response handler function. These kinds of function must be called using xajax.call with a parameter that indicates the function that will handle the response. To use it the allowAllResponseTypes flag must be set to true. * New useUncompressedScripts flag allows you to switch to using the uncompressed * Javascript files easily. * The risk of cross-site scripting attacks via the automatic URI detection has * been dimished through additional protection. xajaxResponse.inc.php changes: * New removeScript and removeCSS methods to unload Javascript or CSS files in the client * New waitForScript and waitForCSS methods to attempt to load Javascript or CSS files and hold off on processing further commands until they're loaded or the queue times out. * New xajaxCall object you can use to assemble Javascript code for xajax.call quickly. Javascript engine: * It's new and it's shiny! Inside of xajax_core, there are ten modules: * xajax is the main module which handles the basic call/request/response lifecycle * xajax.callback allows functions to be called during the response lifecycle * xajax.config stores the run-time configuration of the xajax engine * xajax.css contains functions that manipulate stylesheets * xajax.dom contains functions that manipulate the HTML DOM * xajax.events contains functions that setup run-time DHTML events * xajax.forms contains functions that help you construct HTML forms * xajax.js contains functions that handle Javascript files * responseProcessor contains the default xajax XML response processor (with more to come) * tools contains some miscellaneous utility functions The changes between this engine and the previous one in Beta 1 are simply too numerous to mention, so your best bet is to check out all the tests to see how you can perform various tasks, and of course read the documentation once it goes online. This engine will provide a solid platform for further xajax client-side innovation going forward. ---- New in 0.5 Beta 1 since 0.2.4: Package-wide changes: * All of the PHP files have been moved to xajax_core, so the PHP and Javascript files are now in separate folders. * All tests and examples have been updated to work with the new 0.5 API. * A new file, legacy.inc.php, can be included in your PHP scripts if you want to be able to use the 0.2.4 xajax API. However, it is recommended you update your scripts to the 0.5 API as soon as possible as the legacy API will likely be dropped in a future version of xajax. * A new plugin layer has been implemented for the xajax and xajaxResponse classes. The basis for this is the xajaxPluginManager class which provides for registering and accessing plugins for the different xajax components. * xajax is now licensed under the BSD license rather than the LGPL license. This means you can include xajax and modify it when using it with commercial PHP applications without having to worry about tricky legal issues. xajax Plugin Layer: * xajax now uses plugins to process requests and output Javascript include code. You can subclass the default plugins to alter major xajax functionality or write your own plugins from scratch. * You can use plugins with xajaxResponse, allowing you to output custom commands to the Web client. (Note: this won't be very useful until the a new plugin system is implemented in the xajax Javascript engine.) * Plugin layer documentation forthcoming. xajax.inc.php changes: * The xajax constructor has been simplified to allow only one optional argument (the request URI). * New getGlobalResponse method lets you use the same response in multiple functions. It also makes it easier to set up the response to have the same encoding and entity settings as the xajax parent object. * New getVersion method returns the xajax version. * All of the ___On and ___Off methods have been replaced with a single setFlag (or setFlags) method. For instance, debugOn() would now be setFlag("debug", true). exitAllowedOff() would now be setFlag("exitAllowed", false). * New setTimeout and getTimeout methods for controlling the delay before the client shows an error alert if the xajax Javascript engine failed to load (just set to 0 to suppress any error alert). * Registering functions to use only GET or POST for the HTTP connection is no longer possible. All functions use POST by default, and if for some reason you need to force using GET, you can use the xajax.call syntax on the client-side. * The registerFunction method now provides an optional second argument for specifying a PHP file to include, thereby eliminating the need for the registerExternalFunction method. * New registerCallableObject method registers an object that xajax will check to see if it contains a method with the same name as the incoming xajax function. If it finds one, it will go ahead and call that method as if it had been manually registered with xajax (and in PHP 5, it will _always_ go ahead with the method call if a __call magic method is present). * The registerPreFunction and registerCatchAllFunction methods have been eliminated and replaced with the new registerEvent method. You can register one or more functions or class/object methods to be notified when certain events in the xajax lifecycle are triggered. The "pre function" is now the "beforeProcessing" event. The "catch all function" is now the "onMissingFunction" event. * The canProcessRequests and processRequests methods are now singular (i.e., canProcessRequest and processRequest). * All of the following methods use an xajaxRequestProcessorPlugin subclass (typically xajaxDefaultRequestProcessorPlugin) to perform all neccessary work: * canProcessRequest * getProcessMode * processRequest * All of the following methods use an xajaxIncludePlugin subclass (typically xajaxDefaultIncludePlugin) to perform all necessary work: * printJavascript * getJavascript * getJavascriptConfig * getJavascriptInclude xajaxResponse.inc.php changes: * All method names for adding commands have had their "add" prefixes removed (though of course addEvent and addHandler remain). In other words, addAssign is now just assign, addScript is now just script, etc. In addition, all of the command methods return $this (the xajaxResponse object) to allow for "fluent interface" usage in PHP 5. * Internally all of the commands are stored as array-based data structures and are only converted to XML upon final output. Several new methods allow for adding command data manually and merging commands from other response objects. Much of this functionality is extremely useful for response plugins. * As part of the new xajax plugin layer, response object plugins that were registered with the plugin manager can be accessed either via the plugin method on PHP 4 and 5 (with two different call types) or as properties via the __get magic method in PHP 5. * New includeScriptOnce and includeCSS commands available. * IMPORTANT: you may no longer return the getXML() method output as your return value in registered xajax functions. Please return the response object directly. xajax_uncompressed.js Javascript changes: * The Javascript engine for xajax has been substantially rewritten and is still undergoing major changes. Note that some of the changes are "reversed" when using the xajax legacy PHP class (specifically xajax.call, xajax.loadingFunction, and xajax.doneLoadingFunction work the same as before). * xajax.call now supports only two arguments, the first being the function name to call on the server and the second being a Javascript dictionary-style object you can use to specify parameters, event callbacks, and other options (in a manner reminiscent of Prototype). * xajax.loadingFunction and xajax.doneLoadingFunction have been replaced by xajax.eventFunctions.globalRequestDelay and xajax.eventFunctions.globalRequestComplete (though in most cases it is recommended that you make use of the per-call event callbacks mentioned above). * Instead of expecting options set by the xajax include code such as xajaxRequestUri or xajaxDebug, the Javascript engine now expects an xajaxConfig object to be present in the global namespace with properties such as requestURI and debug. * The xajax Javascript object is now written using brackets syntax ala Prototype and many other modern Javascript libraries.