Book Image

Google Web Toolkit 2 Application Development Cookbook

By : Shamsuddin Ahammad
Book Image

Google Web Toolkit 2 Application Development Cookbook

By: Shamsuddin Ahammad

Overview of this book

GWT 2 radically improves web experience for users by using existing Java tools to build no-compromise AJAX for any modern browser. It provides a solid platform so that other great libraries can be built on top of GWT. Creating web applications efficiently and making them impressive, however, is not as easy as it sounds. Writing web applications for multiple browsers can be quite tasking. In addition, building, reusing, and maintaining large JavaScript code bases and AJAX components can be difficult. GWT 2 Application Development Cookbook eases these burdens by allowing developers to quickly build and maintain complex yet highly efficient JavaScript front-end applications in the Java programming language . It tells you how to make web experience all the more thrilling and hassle free, using various tools along with GWT SDK.This book starts with developing an application from scratch. Right from creating the layout of the home page to home page elements including left and right sidebars, to placing tree like navigational menu, menu bars, tool bars, banners, footers are discussed with examples. You will see how to create forms using the Ext GWT library widgets and handle different types of events. Then you will move on to see how to design a database for sales processing systems and learn to create the database in MySQL with the help of easy–to-follow recipes. One of the interesting topics of this book is using JPA in GWT. Using the JPA object in GWT is a challenge. To use them perfectly, a mechanism to convert the JPA object into plain object and vice versa is required. You will see recipes to use entity classes, entity managers, and controller classes in GWT application. You will efficiently create reports with parameters, variables and subreports, and get the report output in both HTML and PDF format using real-world recipes. You will then learn to configure the GlassFish server to deploy a GWT application with database. Finally, learn how to trace speed and improve perfomance in web applications using tracing techniques.
Table of Contents (16 chapters)
Google Web Toolkit 2 Application Development Cookbook
Credits
About the Author
About the Reviewers
Preface
Index

Installing GlassFish


GlassFish is an open source Java EE-compatible application server. At the time of writing this book, the latest release of the server is version 3, which provides the fully-featured Java EE 6 and JPA reference implementation. GlassFish is based on the source code released by Sun and Oracle Corporation's TopLink persistence system. It is a fast, easy, and reliable application server.

The Java EE 6 platform significantly improves developer productivity, introduces the lightweight Web Profile for web-centric applications, and includes the latest versions of technologies, such as JavaServer Faces (JSF), Enterprise JavaBeans (EJB), Java Persistence API (JPA), Context and Dependency Injection (CDI), and many more.

Note

Please note that the other lightweight application servers, such as Tomcat or Jetty are also sufficient to run on it.

Getting ready

Download the GlassFish server installer from http://developers.sun.com/appserver/downloads/index.jsp.

How to do it...

  1. Execute the GlassFish server installer sges-v3-windows.exe (Sun GlassFish Enterprise Server for Windows). It will extract the installation files, and then display the welcome screen:

  2. Click on Next.

  3. Accept the terms, and then click on Next.

  4. Specify the installation directory as C:\Program Files\glassfishv3, and then click on Next.

  5. Configure the Administration Settings for Admin Port, Http Port, Username, and Password. The default values are 4848, 8080, and admin, respectively. Specify a password for the server.

  6. Click on Next.

  7. Uncheck Install Update Tool and Enable Update Tool to set the Update Configuration.

  8. Click on Next.

  9. Select a Java(TM) SDK from the list. As we have already installed it, the list will automatically include JDK 1.6.0_18.

  10. Click on Next.

  11. Click on Install and wait for the installation to complete. Skip Product Registration, which you can complete later.

  12. Click on Next. It will show the installation summary, as shown in the following screenshot:

  13. Click on Exit.

There's more...

We have seen here how to set up the GlassFish server from the standalone GlassFish installer. The GlassFish server is also bundled with the NetBeans installer. In that case, it is also possible to install the server during the installation of NetBeans IDE; a separate GlassFish installer will not be required.

See also

  • Refer to the Installing NetBeans IDE recipe, later in the chapter