Is the server or the client in control in AJAX? AJAX techniques can be implemented by server only, client or, or even mix of both. It depends on what technology and architecture one chooses. When providing complete control to the server, the server ensures that the client pages are in sync with the server. Whereas, one could use javascript and apply AJAX at the client level through it. The most common approach is to use a mix of server side and client side control.Is the server or the client in control in AJAX? With AJAX the control can be more centralized in a server-side component or a mix of client-side and server-side controllers.
Centralized server-side controller
In this type of architecture, the controller ensures that the data on the client and the server are synchronized.
Client and server-side controllers
In this type of architecture the presentation related control, event processing, page manipulation, and rendering of model data is done through Javascript on the client side.
The server-side is responsible for business logic and pushing updated model data to the client.
Both methods are viable depending on the kind of task. However, the centralized server side controller is preferred as in the other case (Client and server-side controllers) the server might not have the knowledge of the state of the client page.
|