没有合适的资源?快使用搜索试试~ 我知道了~
首页GWT 2.2 Tutorial and Developer Guide
资源详情
资源评论
资源推荐

Developer's Guide
Welcome to the Google Web Toolkit Developer's Guide. This guide introduces
the key concepts, tools, and libraries you'll encounter when building web
applications with GWT. The topics in this guide span project organization, coding,
debugging, testing, optimizing, and publishing your web application.
Note - If you're new to GWT and eager to start playing immediately, you might
want to try the Quick Start. For specific technical details, see
the Reference guide and Articles.
Tutorials
1. Create, build and run a GWT application – Create, build, debug and
compile a sample application.
2. Communicating with the server – Add an asynchronous call to a web
server using GWT RPC or JSON, serialize Java objects, and handle
exceptions
3. Internationalizing a GWT application – Translate the user interface of a
GWT application into another language
4. Unit testing with JUnit – Add unit tests to a GWT application using JUnit
5. Deploying to Google App Engine – Deploy a GWT application to App
Engine
Developer Guide
1. What's New in 2.2?
2. Organize Projects – Describes conventions to identify which code is
intended to run on the client browser, the server, or both
3. Compile & Debug – Describes development and production modes
4. Coding Basics – Describes GWT programming fundamentals
5. Build User Interfaces – How to work with widgets, panels, the DOM, events,
CSS, declarative UI and images.
Cell widgets / Editors - 2.1, Cell tables - 2.2
6. Security: Safe HTML
2.1
– Describes coding guidelines that prevent a large
class of Cross-Site-Scripting (XSS) vulnerabilities
7. MVP Framework
2.1
– Sample app and documentation showing how to use
Activities, Places, and the EventBus.
8. RequestFactory
2.1
– Guide to creating data-oriented services using
RequestFactory and EntityProxy classes.
9. Logging
2.1
– Describes how to log events in client-side code in GWT
applications.

10. Accessibility – Describes features that enable screen readers to interpret
what is displayed on the screen for a visually impaired user
11. Internationalization – Describes a flexible set of tools to help you
internationalize your applications and libraries
12. Communicate with a Server – Describes a couple of different ways to
communicate with a server via HTTP
13. Test with JUnit – Describes how to use the JUnit unit testing framework and
Emma code coverage tool
14. Deploy – Describes how to deploy both client- and server-side JavaScript
15. Optimize – Describes how to improve the performance of your application
16. Reference – Provides javadoc for GWT and related libraries and technical
details for GWT widgets
17. FAQ – Frequently asked questions
18. Glossary – GWT terminology
Get Started with the GWT SDK
Prerequisites
Download and Install Google Web Toolkit
Create your first web application
Run locally in development mode
Make a few changes
Compile and run in production mode
Set up an IDE
Prerequisites
1. You will need the Java SDK version 1.5 or later. If necessary, download
and install the Java SE Development Kit (JDK)for your platform. Mac users,
see Apple's Java developer site to download and install the latest version of
the Java Developer Kit available for Mac OS X.
2. Apache Ant is also necessary to run command line arguments. If you don't
already have it, install Apache Ant.
If you have problems running Ant on the Mac, try setting the $JDK_HOME
environment variable with export JDK_HOME="/Library/Java/Home"
Download and Install the GWT SDK

Download and unzip the Google Web Toolkit
SDK. This contains the core libraries, compiler,
and development server that you need to write web
applications.
See FAQ for system and browser requirements.
Download
GWT SDK
On Windows, extract the files from the compressed folder gwt-2.2.0.zip. On Mac
or Linux, you can unpack the package with a command like:
unzip gwt-2.2.0.zip
The GWT SDK doesn't have an installer application. All the files you need to run
and use the SDK are located in the extracted directory.
Create your first web application
GWT ships with a command line utility called webAppCreator that automatically
generates all the files you'll need in order to start a GWT project. It also
generates Eclipse project files and launch config files for easy debugging in
GWT's development mode.
You can create a new demo application in a new MyWebApp directory by
running webAppCreator:
Windows
cd gwt-2.2.0
webAppCreator -out MyWebApp com.mycompany.mywebapp.MyWebApp
Mac or Linux - you may need to make the script executable:
cd gwt-2.2.0
chmod u+x webAppCreator
./webAppCreator -out MyWebApp com.mycompany.mywebapp.MyWebApp
The webAppCreator script will generate a number of files in MyWebApp/, including
some basic "Hello, world" functionality in the
class MyWebApp/src/com/mycompany/mywebapp/client/MyWebApp.java. The script also
generates an Ant build scriptMyWebApp/build.xml.

Run locally in development mode
To run your newly created application in development mode:
cd MyWebApp/
ant devmode
This command starts GWT's development mode server, a local server used for
development and debugging, as follows:
Launch the local server in a browser by either 1) clicking "Launch Default
Browser" or 2) clicking "Copy to Clipboard" (to copy its URL), then pasting into
Firefox, Internet Explorer, Chrome, or Safari. Since this is your first time hitting
the development mode server, it will prompt you to install the Google Web Toolkit
Developer Plugin. Follow the instructions in the browser to install the plugin,
which may require restarting the browser.
Once the Google Web Toolkit Developer Plugin is installed in your browser,
navigate to the URL again and the starter application will load in development
mode, as follows:.

Make a few changes
The source code for the starter application is in the MyWebApp/src/ subdirectory,
where MyWebApp is the name you gave to the project above. You'll see two
packages, com.mycompany.mywebapp.client and com.mycompany.mywebapp.server.
Inside the client package is code that will eventually be compiled to JavaScript
and run as client code in the browser. The java files in the server package will be
run as Java bytecode on a server, in the case of this Quick Start on the App
Engine servers.
Look inside com/mycompany/mywebapp/client/MyWebApp.java. Line 41 constructs the
"Send" button.
final Button sendButton = new Button("Send");
Change the text from "Send" to "Send to Server".
final Button sendButton = new Button("Send to Server");
Now, save the file and simply click "Refresh" in your browser to see your change.
The button should now say "Send to Server" instead of "Send":
Compile and run in production mode
To run the application as JavaScript in what GWT calls "production mode",
compile the application by executing:
剩余610页未读,继续阅读



















yaffleshi
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- 分布式高并发.pdf
- 毕业论文java vue springboot mysql 4S店车辆管理系统.docx
- 计算机应用基础Excel题库--.doc
- 毕业论文springboot297毕业生实习与就业管理系统的设计与实现论文.doc
- Oracle 自动诊断资料档案库(ADR) 说明
- 本科毕业论文---单片机的人体脉搏指示仪.doc
- 本科毕业论文---基于matlab的倒立摆pid控制系统设计(论文)设计.doc
- 护理PDCA循环案例汇报PPT模板
- 基于STM32CubeIDE的LittleVGL的开发环境搭建
- 豫锦程室内设计网站建设与运营网上项目策划书.doc
- 《数据挖掘与大数据分析》分类与聚类实验报告
- 毕业论文ssm556班级事务管理系统+vue论文.doc
- 采购与库存管理控制策略与软件设计毕业论文.doc
- WScript常用对象及方法简介-批处理讲座
- 非标准化旅游产品预订系统的实现方法研究-计算机科学与技术等专业--学位论文.doc
- 高压电机叠频试验方法及数据采集的研究.doc
- datastage问题处理大全
- 基于python知识图谱的百科知识问答平台源码数据库论文.docx
- 基于python框架的课堂投票系统源码数据库论文.docx
- 第十一章-GIS组件开发-PPT课件.ppt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论1