ezAJAX Processing Model
The ezAJAX Processing Model is based on a client-server or RPC (Remote Procedure Call) model that causes the client and the server to be as tightly coupled as possible. This is to say whatever data the server returns to the client is able to consume directly with no intermediate conversion step. Or to put another way, the server is used to perform SQL Queries which means the server has access to one or more Query Objects which are then transferred to the client to allow the client to have access to the same Query Objects the server had access to upon returning control to the client.
The ezAJAX Processing Model allows Query of Queries to be performed on the client as well as on the server. The methods one uses to perform Query of Queries in ColdFusion does differ somewhat from the method one uses to perform Query of Queries using the ezAJAX API but both the client and server allow Query of Queries to be executed against similar datasets.
Additionally just as the ColdFusion processing model allows Query of Queries to be executed against in-RAM Query Objects which can greatly accelerate Queries that are considered to be sub-queries of already existing queries so also the ezAJAX Processing Model provides this same level of acceleration.
Query of Queries
Query of Queries in the ezAJAX Processing Model are constructed using “iterator” functions that are sent as a parameter to the iterator method of the Query Object. This will be discussed in greater detail shortly however for now you should simply be aware of the fact that ezAJAX provides this level of power and flexibility that is lacking from other AJAX Frameworks of which you may be aware.
Iterator functions are JavaScript functions that are executed against one Query row at a time until the entire Query Object contents have been processed.
Iterator functions can be used to perform Query of Queries for the purpose of collecting selected records from a Query Object.
Iterator functions can be used to perform aggregate functions such as SUM or AVERAGE of certain fields of a Query Object one row at a time.
Iterator functions are very powerful when used correctly.
Client-Server or RPC Processing
The ezAJAX Processing Model is said to be Client-Server in that there is a client, the browser, and there is a server, the ezAJAX Community Edition Framework Server.
The ezAJAX Client uses RPC (Remote Procedure Calls) to execute procedures found on the server each of which must return at least one Query Object to the client.
Keep in mind, the Community Edition Trial is limited to only one Query Object returned to the client at a time. The Community Edition Annual or Perpetual License allows one or many Query Objects to be returned to the client at a time and the ezAJAX Client properly processes both scenarios with equal ease.
It can be very useful to have the ability to return more than one Query Object from the server at a time since doing so allows the server-side logic to be simpler than if the same processing were done using a single Query Object.
The client uses the front-end of the ezAJAX Community Edition Framework while the server uses the back-end of the ezAJAX Community Edition Framework.
The front-end is composed of the following files: application.cfm, userDefined_application.cfm , index.cfm, cfinclude_index_body.cfm , javascript.js, StyleSheet.css, images (folder).
|