Sunday, November 8, 2009

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.
Source

No comments:

Post a Comment

Disclaimer:- All articles are not written by me.i copied some useful definition and tutorials from others site, copied site location is shown in all articles bottom as source.