News from the Editor

Ajax Technology Implemented

Program
Posted by Joe (joe) on May 19 2008
News from the Editor >> Program

Some new improvements have been added to Front Accounting framework in last days. Most noticably we have now all what is needed for adding ajax functionality, although no page in CVS source use the feature in user interface yet. If you want to know look and feel of planned changes you can
test experimental Sales Order Entry page on our unstable demo at http://fa2.iron.from.pl.
where we added following ajax additions to existing controls:

  • update of options in customer selector.
  • customer exchange rate.
  • changing some delivery options in accordance to customer branch changes.
  • price updates with changing sales type/price list.
  • price/units update when item selector changes. The item selector also is updated after db search via ajax.
  • items table is updated after any edit/delete/add.
  • data validation on page submit

The whole page content is reloaded via usual POST call only after customer selector change. In this case all page elements are subjects to change, so ajax gives no adventages.

As a transport layer we have used JsHttpRequest class which has very good support for various local encodings, runs even on old browsers like IE 5+ , and uses light json implementation working both on php4 and php5 instead of xml. Global object $Ajax is responsible for collection of all needed ui
control updates in asynchronous call and sending them back to browser.
Choosen implementation gives us possibility to make incrementive ajax improvements with no need to rewrite all the source code. Comparing to other solutions the price for this approach are slightly lower performance (in fact in ajax calls all the page is rendered on server side), which I believe is
acceptable for such kind of web application. Anyway it should not be lower than in current version using synchronous page updates.

Due to rewitten errors routines we have unified error handling for all php and user errors/warnings/notices.

To preserve system performance also with new bigger js libraries we have added simple  compression function for javascript code. It have also the advantage to have well commented and formatted javascript files without performance loss. Thanks to xajax guys.

Last changed: May 19 2008 at 8:28 am

Back

Support This Project