Gwt [Server & Client Side] :
Models :
Pojos with Serializable implementation
RPC :
RemoteInterface --> Class extends the com.google.gwt.user.client.rpc.RemoteService
RemoteAsynInterface --> Class [RemoteIntefaceName]+"Async"
All the methods in RemoteInterface should defined in this interface with an extra parameter AsyncCallback.
Server : [ServerClass]
Class should implement RemoteInterface and extends com.google.gwt.user.server.rpc.RemoteServiceServlet
web.xml :
Tells the default page.
Also ServletClass & Mapping.
This the the class responsible for AJAX type updates to clients from Server (i.e., ServerClass)
CallbackClass Should implements com.google.gwt.user.client.rpc.AsyncCallback
Two methods:
public void onSuccess(T resultToClient)
The interface is parametrized, thus it supports strong typing. We can proceed with logic instead of worrying about type-casting.
public void onFailure(Throwable exception);
Client:
Probably like a Backing-Bean which has all the component's reference/Object that our page should have.
It should implement com.google.gwt.core.client.EntryPoint
This EntryPoint has the method onLoadModule()
We can override this method to load components in our page.
Project XML : [Project_Name.gwt.xml]
Specifies the compiler which is the Entry_point class.
It also specifies the name of other applications [via
It also has the URL - Servlet Mapping [As in struts-config file], to which URL which servlet/class is invoked.
[Typically like a WSDL file, since this also the remote call]
HTML Page:
GWT will generate this file, no need to take care on this.
Comments (0)
Post a Comment