Why would anyone want to replace nano.js? Well, nobody would. Not by a far stretch of imagination. However, the thought process benefits our readers in three ways:
1. A well-built system should have replaceable components. Replacing one critical component should be viable. Let's see if Gyroscope passes the test.
3. What are the differences between Gyroscope-bundled nano.js and the stand-alone download?
Gyroscope uses the LCHH architecture – a AJAX pattern that is optimized for execution and maintenance. The pathway from client-side H
andler to server-side H
andler is an XMLHTTPRequest call. The server response then replaces the C
ontent of a designated L
in nano.js can be written as the following in jQuery:
calls in Gyroscope tab functions can be replaced with the above code.
POST or GET
function, which in turn calls ajxb
, a synchronous variant of ajxpgn
The Gyroscope version of nano.js has the extra reajxpgn
, which reloads the container with previously set parameters. When ajxpgn
sends a request, the call parameters are stored on the loader's DOM node. This feature is necessary for the List View to remember the lookup context.
Slow Loading Indicator
When a request takes too long, nano.js displays a waiting animation. This is different from standard wait indicators as it only shows after enough time has passed.
Parallel AJAX calls do not guarantee in-order delivery. A slow response from an earlier request may override the display of a later, but more promptly returned request. nano.js automatically clears any prior calls that are "in the way" and cancels the in-flight requests on the client side. The server receives and processes the requests in the order of sending; the client displays the response also in the order of requests.