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.

Slides:



Advertisements
Similar presentations
Coding Basics - Deferred Binding. Deferred Binding is a feature of the GWT compiler works by generating many versions of code at compile time, only one.
Advertisements

Google Web Toolkit (GWT) Steve Wargolet. Introduction Desktop client-server applications and their drawbacks. Static-only Web pages Introduction of Web.
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 
1 CGICGI Common Gateway Interface Server-side Programming Lecture.
Spring, Hibernate and Web Services 13 th September 2014.
Building New SOA and AJAX- Based Business Applications Mark Barnard R&D Manager – Natural Business Services Software AG (Canada) Inc.
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.
Google Web Toolkit - Gufran Mohammed. Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
Hello Vaadin! CS 3130 Summer 2015.
{ Apache - Click By, By, Anupam Mundale. Anupam Mundale. Viraj Kulkarni. Viraj Kulkarni.
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.
© 2006 by IBM 1 How to use Eclipse to Build Rich Internet Applications With PHP and AJAX Phil Berkland IBM Software Group Emerging.
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
UNIT-V The MVC architecture and Struts Framework.
Client/Server Architectures
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
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.
AJAX Chat Analysis and Design Rui Zhao CS SPG UCCS.
JavaScript & jQuery the missing manual Chapter 11
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.
Application Composer Rich Internet User Interfaces for Enterprise Applications Björn Müller.
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?
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
Echo2 Java AJAX Web Framework Petar Milev. Contents 1.Introduction to Echo2 2.Echo2 Target – Business Web 3.Why Choosing Echo2? 4.Live Demo 5.How It Works?
Java Mobile Apps with GWT & PhoneGap Josh Marinacci, webOS Developer Advocate.
JDeveloper 10g and JavaServer Faces: High-Performance UIs on the Web Avrom Roy-Faderman Senior Programmer May, 2006.
Intro to Ajax Fred Stluka Jan 25, /25/2006Intro to AjaxFred Stluka2 What is Ajax? "Asynchronous JavaScript and XML" New name for an old technique:
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
06/10/2015AJAX 1. 2 Introduction All material from AJAX – what is it? Traditional web pages and operation Examples of AJAX use Creating.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
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 ….
Presentation. Recap A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate. Taken advantage of Spring’s multi layer.
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.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)
Service Side Ajax Richard Schmidt gmail. Com Metservice.
.  A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate.  Taken advantage of Spring’s multi layer injection.
A New Approach to Java Clients Robert Buffone Chief Architect Nexaweb Technologies By
First Venture into the Android World Chapter 1 Part 2.
Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM
Spring and DWR Frameworks for Rich Web Enterprise Application Thomas Wiradikusuma Presentation to the 20 th.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
Ajax and the GWT. Ajax  Asynchronous JavaScript And XML  Technology behind interactive web sites  Provide smoother experience than conventional web.
A PC Wakes Up A STORY BY VICTOR NORMAN. Once upon a time…  a PC (we’ll call him “H”) is connected to a network and turned on. Aside: The network looks.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
SDJ INFOSOFT PVT. LTD. 2 BROWSERBROWSER JSP JavaBean DB Req Res Application Layer Enterprise server/Data Sources.
Google Web Toolkit for Mobile Applications Development INGENUITY AT ITS BEST……………….
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Comparative Display Technologies.
Open Solutions for a Changing World™ Eddy Kleinjan Copyright 2005, Data Access WordwideNew Techniques for Building Web Applications June 6-9, 2005 Key.
Technologies For Creating Rich Internet Applications Presenter's name
Google Web Toolkit (GWT) St. Louis Java SIG April 12, 2007 Brad Busch Andrew Prunicki.
Java Web Services Orca Knowledge Center – Web Service key concepts.
Google Web Toolkit Tutorial
Google Web Toolkit - Gufran Mohammed
Sakai WebApp Structure
SharePoint-Hosted Apps and JavaScript
Java Web Application Framework
JavaServer Faces: The Fundamentals
Intro to Ajax Fred Stluka Jan 25, 2006.
Presentation transcript:

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 1 candy, House#2 gives 2 candies, etc up to House#100 which gives 100candies. Jack goes trick-or-treating to these houses and gets candy from each house except for one (House#X) because they gave him a “Trick” instead. Question: How do you calculate X in O(1) complexity?

What is GWT? Is it a JEE framework or is it a just a toolkit?!? The heart of GWT is its Java -> Javascript compiler GWT –RPC - Java->Javascript->Java … if you ever used DWR … this is way kewler UI Library (your vanilla HTML Widgets, Layout Managers – feels like Spring) Plugin/Development environment

Current Release Current stable release is However 2.0 milestone2 is out Best feature of 2.0 is OOPHM (Out of Process Hosted Mode)

Hello World A TextBox and a Send button (UI objects – aka widgets, components) Sends a message (GWT-RPC) to the server Sent with a onClick Event - handlers Written with an Eclipse Entry Point: public void onModuleLoad() { Config file ….gwt.xml Default output directory … “war”

No Javascript? A moment of truth … there’s theory and then there’s practice … Javascript can’t die Events are handled on the components, but every so often, you’ll still need Javascript for something whether it be integration or for some hackery reason. Welcome JSNI (Javascript Native Interface)

Embedding GWT or a whole page as a GWT Module… Basically RootPanel.get(stringID) or RootPanel.get() If you plan on mixing GWT with some HTML code, use RootPanel.get(stringID) otherwise your whole page will be a GWT App An good example of an embedded GWT Module could be Google Maps

Compiled code 6 permutations – 6 browsers Can specify generated code to be obfuscated or not Yeah – compilation can take a long time. Reduce the permutations via the.gwt.xml file Or run in development mode with the GWT Hosted Browser…

Running in Development Mode (previously known as hosted mode) Simple in concept … You don’t need to wait those 15-30s to wait for your code to compile (from Java to Javascript). You make a change (reload your browser in some cases) and can even put breakpoints Can work with Firefox, IE too – OOPHM (GWT version 2.0)

GWT RPC Like DWR, but you work with Java to Java on both ends. Done via an AJAX POST Send a Data Transfer Object (DTO) across to/from the client to server All DTOs must implement IsSerializable xxxService.java xxxServiceAsync.java xxxServiceImpl.java

Handling Exceptions Simple … Server throws an Exception Client catches it and acts accordingly

GWT Frameworks GWT-Ext / Gxt SmartGWT Vaadin

GWT-Ext / Gxt GWT-Ext is LGPL written by Sanjiv Jivan Unfortunately GWT-Ext will have no further major releases GWT-Ext (aka GXT) is GPL or Commerical licences are available Basically LGPL is better than GPL if you are using it to build a webapp for a customer who doesn’t want their Business Rules to be open source

Smart GWT The successor to GWT-Ext. Also written by Sanjiv Jivan Like GWT-Ext, it is also LGPL … except for the EE version of it which is of course commercial Commercial version comes with widget->data binding

DTO (Data Transfer Object) Loosely coupled design pattern How much power do u give the framework? JSF has managed bean/backing beans Wicket binds component on the server GWT... Is it a framework? Uses RPC to send the DTO. Biggest difference is that there’s no real binding of UI transfer objects to RemoteServiceImpl. Populating of the DTO is done on the front-end in GWT. Flexible or just more work and maintenance? Hmmm…

If u like DTOs… Check out Dozer Its like BeanUtils.copyProperties(destObj, origObj) except on steroids. Note GWT does not support BigDecimal Probably other ways to use hibernate with GWT (i.e. Gilead), but the question is: To DTO or not to DTO? When does the DTO look identical to the Domain Objects? Do we need DAOs if we are *only* talking to a RDMS (no filesystem, LDAP, Web Service, JMS involved)? To DTO or not to DTO?

Vaadin Finnish for “I insist” Released publically on May 2009 Feels like Swing (from front-end to DB) The only free GWT framework with widget databinding (HbnContainer)

Comparisions Biased … but at least a benchmark GWT vs JSF – well, its programming XML + Javascript vs programming in Java. In JSF, say when a “I will send a cheque” radio button is checked, you have to disable all Credit card fields using Javascript (or go to the server and run render) GWT vs Wicket. Wicket is a nice MVC model. Again Javascript integration with Wicket is messy. Also (not to bash Wicket), but their components aren’t that “Rich”. Its just vanilla HTML. GWT vs Struts2. Did I say compare? Struts2 dojo plugin has been deprecated. Yikes (that’s pretty major). Struts2 can work in parallel to GWT (RootPanel.get(id) vs RootPanel.get()). You can even use FreeMarker/Velocity with GWT Same can be said about SpringMVC Among all the Java frameworks, the Showcase for GWT frameworks are the most complete. Forget the friggin code snippets here and there. Their showcases run right off of your IDE. You can put break-points here, change some code and can also can view source from your IDE or from your Browser

Questions and Answers Answer The answer is 42

Answer to Brain Teaser There are 100 houses numbered 1 to 100. During Halloween, House#1 gives 1 candy, House#2 gives 2 candies, etc up to House#100 which gives 100candies. Jack goes trick-or-treating to these houses and gets candy from each house except for one (House#X) because they gave him a “Trick” instead. Question: How do you calculate X in O(1) complexity? Answer: To find the house that Jack missed out on, take the summation of 1 to 100 and subtract the number of candies Jack collected. i.e. if Jack collected 5008 candies across those 99 houses, the house number he missed was 42 (the summation of 1 to 100 is 5050 and subtracting 5008 would give 42)