GWT QQ 交流群:28310588
最近在玩 Google Web Toolkit
一个可以用纯java编写ajax,然后自动翻译成可以用在j2ee工程里的程序,太强了。
因此不用学ajax,只要会java(尤其awt基础)和这个工具,ajax任我玩
介绍一下,好东西,感觉有望成为热门ajax开发工具,而且目前还出了与eclipse插件:googlipse。
我刚用过,很方便
收集的资料:
1. 非常完整的gwt+netbeans的教程:http://www.javapassion.com/handsonlabs/ajaxgwtintro/
2. 有3篇IBM文章介绍Google Web Toolkit
3.(GWT eclipse 插件1)gwtdesigner
http://www.instantiations.com/gwtdesigner/download.html
4.(GWT eclipse 插件2)googlipse
1) 下载:http://sourceforge.net/projects/googlipse
2) 安装前提:
a)
Eclipse 3.2 with WebTools Platform 1.5(一定要装,)
b) 运行在
Java 1.5 上
c) 还需要下载
Google Web Toolkit
3) googlipse从安装插件到做出实例全过程(官方)
(*) Drop the com.googlipse.gwt_<version>.jar file in your eclipse\plugins folder
(*) Open Eclipse. Select Window->Preferences->Googlipse and set GWT home to the directory where you have installed the Google Web Toolkit.
(*) You are all set to code.
Adding Googlipse to your project:
Googlipse is implemented as a WTP Facet. When creating a new Dynamic Web Project, select Googlipse in the Project Facets page. If you already have a Dynamic Web Project, you can add Googlipse facet by selecting Project->Properties->Project Facets(Please make sure you don't have gwt-user.jar in your classpath). In case you didn't like Googlipse, you can remove the facet.
Creating a Module:
Once you have a Dynamic Web Project with Googlipse facet, you can add a new module by File->New->Other->Googlipse->Gwt Module. Modules can be created only in valid java packages (default package is not allowed). Either you can type in the package (with project & source folder) in the location field or you can select it by clicking Browse button. You can also click the Create button to create a new package. Next type in the name of the module. Click Finish, you will have all the artifacts for the module generated.
Adding a Remote Service;
Note :A Remote Service will be created only in a module. So if you don't have a module, you need to create one using the New Module wizard, before this step.
You can select File->New->Other->Googlipse->Gwt Remote Service. Click the Browse button and select the module (the gwt.xml file). Type the name and uri for the service and click Finish. Now the artifacts for the remote service will be generated. (You have to add an entry in the gwt.xml file manually. Googlipse doesn't add it. This feature will be implemented in future versions)
Adding a Remote Service method:
You can open the RemoteService interface and add/change methods in it. You need to provide the implementation of those methods in RemoteServiceImpl class, but thanks to Googlipse, you don't have to do anything in RemoteServiceAsync. Googlipse will automatically update the corresponding Async file whenever a RemoteService interface is changed.
Calling a method using Remote Service:
The utility class in the Remote service should help you in making the remote call.
MyRemoteServiceAsync async = MyRemoteService.Util.getInstance();
async.makeRemoteCall(param1, param2, callback);
Running/Debugging a Gwt Application:
Select Run->Run/Debug to activate the Lauch configuration dialog box. Double Click "Gwt Application". In the main page, you can select the Project & Module you want to run. In the parameters page you can select the parameters such as port and log level. Click Run to execute the GwtShell & bring up your application. The laucher will add the jar files & all the source folders in the project to your application.
Questions/Bugs/Suggestions?
Drop a mail to googlipse-users@lists.sourceforge.net