Google Web Toolkit (GWT) St. Louis Java SIG April 12, 2007 Brad Busch Andrew Prunicki.

Slides:



Advertisements
Similar presentations
Google Web Toolkit (GWT) Steve Wargolet. Introduction Desktop client-server applications and their drawbacks. Static-only Web pages Introduction of Web.
Advertisements

Web Toolkit Julie George & Ronald Lopez 1. Requirements  Java SDK version 1.5 or later  Apache Ant is also necessary to run command line arguments 
Intro to GWT By Henry Chan Brain Teaser to start the evening… There are 100 houses numbered 1 to 100. During Halloween, House#1 gives.
The Developer Perspective Michelle Osmond. Design – Requirements Gathering Sales & Research projects –Prototypes/Demos User group meetings Usability workshops.
1 GWT Google Web Toolkit Build AJAX apps in the Java language
P&O3: Tools & methodologies Stefaan Ternier. Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA.
© 2007 IBM Corporation IBM Emerging Technologies Enabling an Accessible Web 2.0 Becky Gibson Web Accessibility Architect.
Google Web Toolkit - Gufran Mohammed. Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications.
Cloud Computing Lecture #7 Introduction to Ajax Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under a.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
Session-01. Layers Struts 2 Framework The struts 2 framework is used to develop MVC-based web application. Struts 1.0 was released in June The.
Apache Jakarta Tomcat Suh, Junho. Road Map Tomcat Overview Tomcat Overview History History What is Tomcat? What is Tomcat? Servlet Container.
Quick Tour of the Web Technologies: The BIG picture LECTURE A bird’s eye view of the different web technologies that we shall explore and study.
GWT-EXT 로 Web application 개발하기
UNIT-V The MVC architecture and Struts Framework.
Client/Server Architectures
RIA Introduce Comparison among several technology.
P&O3: Tools & methodologies Stefaan Ternier. Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA.
Pittsburgh Java User Group– Dec Java PureFaces: A JSF Framework Extension.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
1 Web GIS: from Javascript to GWT Pieter De Graef – Community Manager & Lead Developer Geomajas.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
AJAX in ASP.NET James Crowley Developer Fusion
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
AJAX Without the “J” George Lawniczak. What is Ajax?
Google Web Toolkit An Overview By Shauvik Roy Choudhary.
Contrasting styles of Web UI Development: GWT vs Native JavaScript Roland Schweitzer Weathertop Consulting, LLC Jeremy Malczyk JISAO.
Google Web Toolkit Paul Heiniz, Wolfgang Kluth, Jan Marten, Malte Behrendt Web Technologies – Prof. Dr. Ulrik Schroeder – WS 2010/111 The slides are licensed.
Fall CIS 764 Database Systems Design L8. Web ….
GWT In-depth Explained by Rohit Ghatol
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
Introduction to Web Dimitar Nenchev Ivan Nakov
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Copyright © by Shayne R Flint Simplified Web Application Development Shayne R Flint Department of Computer Science Australian National University.
Google Web Toolkit. What is GWT? GWT is a development toolkit for building and optimizing complex Ajax applications Goal is to enable productive development.
Markus Hjort Reaktor Innovations Java Web Development T WWW-palvelun HUT
Weekend MS CS Program Internet and Web Technologies COT 5930 Web Project Development - Ajax Dr. Roy Levow, Associate Chair & Professor
Ajax and the GWT. Ajax  Asynchronous JavaScript And XML  Technology behind interactive web sites  Provide smoother experience than conventional web.
Google Web Toolkit Dynamic web on Java (Script) Jordan Jordanov 6 March 2008.
Introduction to AJAX Sue Brandreth. What is Ajax?
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Google Web Toolkit for Mobile Applications Development INGENUITY AT ITS BEST……………….
JavaScript Invented 1995 Steve, Tony & Sharon. A Scripting Language (A scripting language is a lightweight programming language that supports the writing.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Comparative Display Technologies.
Technologies For Creating Rich Internet Applications Presenter's name
Project Dynamic Faces World Class AJAX for JavaServer™ Faces Technology Ed Burns Senior Staff Engineer Enterprise Java Platforms.
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
Building rich web applications with ASP.NET AJAX Mike Ormond Developer & Platform Evangelism Group, Microsoft Ltd Developer & Platform Evangelism Group,
Teaching slides Chapter 6. Chapter 6 Software user interface design & construction Contents Introduction Graphical user interface – Rich window based.
DecisionSoft Java in the real world DecisionSoft Stephen White 8 th February 2007.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Applications Active Web Documents Active Web Documents.
Introduction to Internet Programming (Web Based Application)
Google Web Toolkit Tutorial
Platform as a Service.
Google Web Toolkit - Gufran Mohammed
Haritha Dasari Josue Balandrano Coronel -
PHP / MySQL Introduction
CMPE419 Mobile Application Development
Web App vs Mobile App.
Java Web Application Framework
JavaServer Faces: The Fundamentals
CMPE419 Mobile Application Development
Web Application Development Using PHP
Plug-In Architecture Pattern
Presentation transcript:

Google Web Toolkit (GWT) St. Louis Java SIG April 12, 2007 Brad Busch Andrew Prunicki

What is GWT? ● GWT is a much different way to develop web applications from the past. ● GWT applications are: – Written in plain-old Java – Compiled into Javascript to be run on the browser – Developed using a standard JRE, the GWT workbench, and your IDE of choice

Why Java? ● Testing, debugging and profiling of browser code is easily accomplished using the same tools you are using today. ● Static type checking. ● Java-based OO designs are easier to communicate and understand. ● Java tools are very mature and feature rich.

Why GWT? ● Dynamic web development is painful with traditional tools. ● Too many disparate technologies and frameworks. HTML, XHTML, XML, CSS, JavaScript, Java, Java-EL, JSTL, AJAX, JSP, Taglibs, JSF, Struts, Tiles, Shale, Tapestry, RIFE, Seam, Spring MVC/Web Flow, Stripes, WebWork, Wicket ● Avoid browser incompatibilities. ● GWT 1.3 is now fully open source.

Key GWT Definitions ● Hosted Mode: Application runs as Java bytecode within JVM. (Debugging) ● Web Mode: Application runs as Javascript and HTML compiled using GWT's Java to Javascript compiler. ● Module: An XML configuration file with the extension.gwt.xml. Modules are used to specify entry point class(es), source and public path entries, other inherited modules and resource injection.

Quick Demo

Module Definition ● Look how easy it is to configure GWT:

Compilation Client-only Code Server Code Common / Serializable Code Javascript (.html &.xml files) Java byte code (.class files) GWT Compilejavac compile

Compilation Options ● Different compilation options are supported: – Obfuscated – Can't read / Small file size – Pretty – Easy to read / 2x obfuscated file size – Detailed – Info overload / 4x obfuscated file size ● Compiled code is Obfuscated by default.

Runtime Architecture Javascript (.html &.xml files) Java byte code (.class files) Server Browse r.html,.xml, images, css, etc. Initial Url Request (e.g.,

RPC Architecture RPC Servlets Server Request Response Browse r Javascript

Remember Struts?

Feel the Pain! <action path="/login" type="test.struts.LoginAction" >

Client-side Development ● Since you are now developing Java code for the browser, you can now develop OO on the client. True code sharing and re-use!! ● GWT is similar to other windowing toolkits (e.g., Swing, SWT) – Event-driven – Component-based

Laying out a page ● GWT Pages are layed out with containers rather than layout managers. ● A rich set of containers is included. One container for example, FlexLayout, approximates GridBagLayout. ● Tools are becoming available to do WYSIWYG layout (e.g., GWT Designer) under commercial licenses.

Container (Panel) Library

Widgets ● The basic set of widgets are included. For example: – Label – Button – Listbox – Textbox – Textarea ● Other (non-Google) widget libraries: – - the GWT Widget Library. A large collection of widgets including edittable labels, image buttons and Scriptaculous integration amongst others. – GWT Window manager. Very nice looking windows. – - not a widget library, but contains a list of widgets, tools, and resources available for GWT

Sample 3 rd Party Widgets

Standard Widget Library

Calling the server ● Client calls to the server are made using the GWT RPC mechanism. ● Can be confusing at times. ● Tools coming of age to hide the complexity (Googlipse, IntelliJ plugin)

RPC Services

Service Implementation public interface ChatService extends RemoteService { public int sendMessage(User user, Friend friend, String message); } public class ChatServiceImpl extends RemoteServiceServlet implements ChatService { public int sendMessage(User user, Friend friend, String message); //Some code... }

Service Call public interface ChatServiceAsync { void sendMessage(User user, Friend friend, String message, AsyncCallback callback); } ChatServiceAsync serviceProxy = (ChatServiceAsync) GWT.create(ChatService.class); ServiceDefTarget target = (ServiceDefTarget) serviceProxy; target.setServiceEntryPoint(GWT.getModuleBaseURL()+”/service/Chat”); AsyncCallback callback = new AsyncCallback() { public void onFailure(Throwable caught) { Window.alert("Problem sending message (" + caught.getMessage() + ")"); } public void onSuccess(Object result) { //Do something fabulous... } }; serviceProxy.sendMessage(_user, _friend, message, callback);

Module Definition

Demo RPC Debugging

Integration ● GWT integrates well with other frameworks. ● Client-side Integration: – Largely at the layer of embedded pages via IFrames, although custom Javascript integration is possible via JSNI. ● Server-side Integration – Anything is possible really, as RPC classes are just servlets with some method dispatching from GWT framework.

JSNI ● JSNI methods is a powerful technique, but: – less portable across browsers – more likely to leak memory – less amenable to Java tools – hard for the compiler to optimize. public static native void alert(String msg) /*-{ $wnd.alert(msg); }-*/;

Security ● Be careful not to put too much on the client side, as you are exposing some inner-workings of your application. ● User input must be validated on the server, just as with any framework. ● Due to the fine-grained nature of exposed services, there are more points of entry exposed to malicious use.

Security ● GWT == Javascript on the client. Consequently, Javascript vulnerabilities effect GWT. ● Cross-Site Scripting (XSS) ● Request Forging (XSRF)

Unit Testing ● Test cases extend GWTTestCase ● Two ways to create unit tests: – junitCreator shell script – through IDE ● Two ways to run unit tests: – gwt – generated unit test script – through IDE

Limitations ● Java 1.4 compatibility ● Only a subset of the base Java classes are supported. (May be less of an issue as Java goes open source). ● Server-side objects may not be re-useable on the client if they have references to any code that will not / should not be on the browser. --> Consider using DTO's.

Consequences of GWT Development ● Developer required skill-sets can be different depending on the role: – Greater usage of OO & patterns – Experience with event-driven programming (e.g., Swing, SWT, even VB) – Less HTML & Javascript. ● UI development may actually go faster ● Greater UI consistency

Stuff You might want to know ● GWT is completely open-source (Apache 2.0) ● GWT development tools are available for Windows, Linux and Mac OS X ● Compiled GWT code is cross-platform and supports the following browsers: – Firefox, IE 5/6/7, Safari, Opera ● GWT# for.Net is in development.

GWT Roadmap ● Things to come: – RPC simplification – Drag and Drop support – Java 5 language support – Vector graphics library support: canvas, SVG, VML ● See more at: –

Resources applications