资 源 简 介
Intoduction
Dpc framework simplifies clean-server communication in a GWT application allowing direct calls to server-side services without creating any communication structure as special interfaces, action classes or handlers.
The framework uses the GWT RPC communication technique and is inspired by gwt-dispatch project.
## 1. Create the service ##
Define a service with an interface and its implementation. The interface must extend DPC interface.
public interface GreetingService extends Dpc { String greetServer(String name) throws IllegalArgumentException;}
And the implementation extends the interface.
public class GreetingServiceImpl implements GreetingService { public String greetServer(String name) throws IllegalArgumentException { return "Hello " + name "!"; }}
(see 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报