|
|
DWR - Direct Web Remoting
|
Java Based Frameworks
|
DWR is Easy Ajax for Java. DWR allows Javascript in a browser to interact with Java on a server and helps you manipulate web pages with the results.
DWR is a Java open source library which helps developers wanting to write web sites that include AJAX technology. It allows code in a web browser to use Java functions running on a web server as if it was in the browser.
DWR consists of two main parts: JavaScript running in the user's browser to communicate with the server and dynamically update the webpage, and a Java Servlet running on the server that processes requests and sends responses back to the browser.
DWR takes a novel approach to AJAX by dynamically generating JavaScript code based Java classes. Thus the web developer can use Java code from JavaScript as if it were local to the web-browser; whereas in reality the Java code runs in the web-server and has full access to web-server resources. For security reasons the web developer must configure exactly which Java classes are safe to export.
This method of remoting functions from Java to JavaScript gives DWR users a feel much like conventional RPC mechanisms like RMI or SOAP, with the benefit that it runs over the web without requiring web-browser plug-ins.
DWR does not consider the web-browser / web-server protocol to be important, and prefers to ensure that the programmer's interface is natural. The greatest challenge to this is to marry the asynchronous nature of AJAX with the synchronous nature of normal Java method calls. In the asynchronous model, result data is only available some time after the initial call is made. DWR solves this problem by allowing the web developer to specify a function to be called when the data is returned using an extra method parameter.
How it works ?
Download Documentation Video DWR Tutorial
Read more...
|
|
|
|
|
|
|
|
|
|
|
|