10/07/2006 令Sn GWT Architecture
GWT Architecture 10/07/2006
10/07/2006 ●S GWT Architecture JRE emulation library GWT Web UI Class Libraries (java. lang and class library java util) GWT Java-to- JavaScript GWT Hosted Development Tools Web browser Compiler 12 GWT has four major components: a Java-to JavaScript compiler, a hosted"web browser. and two Java class libraries:
GWT has four major components: a Java-to-JavaScript compiler, a "hosted" web browser, and two Java class libraries: Source: http://code.google.com/webtoolkit/ 12 GWT Architecture 10/07/2006
10/07/2006 ●S GWT Architectural Components GWT Java-to-Java Script Compiler translates the Java programming language to the Java Script programming language GWT Hosted Web browser > lets you run and execute your GWT applications in hosted mode, where your code runs as Java in the Java virtual Machine without compiling to JavaScript JRE emulation library GWT contains JavaScript implementations of the most widely used classes in the Java standard class library GWT Web UI class library Source htpelcodegooglecomettoo 13 The components, from bottom to top are GWT Java-to Javascript compiler The GWT Java-to JavaScript compiler translates the Java programming language to the JavaScript programming language. You use the GWT compiler to run your GWT applications in web mode GWT Hosted Web browser The GWT Hosted Web Browser lets you run and execute your GWT applications browser control (an Internet Explorer control on Windows or a Ges voMoile cla? compiling to JavaScript. To accomplish this, the GWT browser embeds as vith in hosted mode, where your code runs as java in the Java Virtual Machin control on Linux) with hooks into the JVM JRE emulation library GWT contains Java Script implementations of the most widely used classes in and a subset of the java tla, including most of the java. lang package classes the java standard class librar isn't supported natively win ghg classes. The rest of the Java standard library For example, packages like java. io dont apply to web applications since they access the network and local file system GWT Web Ul class library The GWT web Ul class library is a set of custom interfaces and classes that let your create web browser"widgets, like buttons, text boxes, images, and text. This is the core user interface library used to create GWT applications. GWT ships with the complete source code for the library under an open source license
The components, from bottom to top, are: * GWT Java-to-JavaScript Compiler The GWT Java-to-JavaScript compiler translates the Java programming language to the JavaScript programming language. You use the GWT compiler to run your GWT applications in web mode. * GWT Hosted Web Browser The GWT Hosted Web Browser lets you run and execute your GWT applications in hosted mode, where your code runs as Java in the Java Virtual Machine without compiling to JavaScript. To accomplish this, the GWT browser embeds a special browser control (an Internet Explorer control on Windows or a Gecko/Mozilla control on Linux) with hooks into the JVM. * JRE emulation library GWT contains JavaScript implementations of the most widely used classes in the Java standard class library, including most of the java.lang package classes and a subset of the java.util package classes. The rest of the Java standard library isn't supported natively within GWT. For example, packages like java.io don't apply to web applications since they access the network and local file system. * GWT Web UI class library The GWT web UI class library is a set of custom interfaces and classes that let your create web browser "widgets," like buttons, text boxes, images, and text. This is the core user interface library used to create GWT applications. GWT ships with the complete source code for the library under an open source license. Source: http://code.google.com/webtoolkit/ 13 GWT Architectural Components • GWT Java-to-JavaScript Compiler > translates the Java programming language to the JavaScript programming language • GWT Hosted Web Browser > lets you run and execute your GWT applications in hosted mode, where your code runs as Java in the Java Virtual Machine without compiling to JavaScript • JRE emulation library > GWT contains JavaScript implementations of the most widely used classes in the Java standard class library • GWT Web UI class library 10/07/2006
10/07/2006 令Sn Building User Interface Built-in GWT Widgets
Building User Interface: Built-in GWT Widgets 10/07/2006
10/07/2006 ●S GWT User Interface Classes Similar to those in existing Ul frameworks such as Swing except that the widgets are rendered using dynamically-created HTML rather than pixel-oriented graphics While it is possible to manipulate the browser's DOM directly using the DOM interface, it is far easier to use Java classes from the Widget hierarchy Using widgets makes it much asier to quickly build interfaces that will work correctly on all browsers 15 GWT Swing HTML g attest erface classes are similar to those in existing ul frameworks such as WT except that the widgets are rendered using dynamically-created r than pixel-oriented graphics While it is possible to manipulate the browser's doM directly using the DOM nterface, it is far easier to use classes from the widget hierarchy. You should rarely, if ever, need to access the dOM directly Using widgets makes it much easier to quickly build interfaces that will work correctly on all browsers
GWT user interface classes are similar to those in existing UI frameworks such as Swing and SWT except that the widgets are rendered using dynamically-created HTML rather than pixel-oriented graphics. While it is possible to manipulate the browser's DOM directly using the DOM interface, it is far easier to use classes from the Widget hierarchy. You should rarely, if ever, need to access the DOM directly. Using widgets makes it much easier to quickly build interfaces that will work correctly on all browsers. Source: http://code.google.com/webtoolkit/ 15 GWT User Interface Classes • Similar to those in existing UI frameworks such as Swing except that the widgets are rendered using dynamically-created HTML rather than pixel-oriented graphics • While it is possible to manipulate the browser's DOM directly using the DOM interface, it is far easier to use Java classes from the Widget hierarchy • Using widgets makes it much easier to quickly build interfaces that will work correctly on all browsers 10/07/2006