Presentation is loading. Please wait.

Presentation is loading. Please wait.

Google Web Toolkit Dudeanu Ermoghen Ib ă nescu Diana Melinte Laurenţiu-Ionuţ Petrişor Ionuţ C ă t ă lin.

Similar presentations


Presentation on theme: "Google Web Toolkit Dudeanu Ermoghen Ib ă nescu Diana Melinte Laurenţiu-Ionuţ Petrişor Ionuţ C ă t ă lin."— Presentation transcript:

1 Google Web Toolkit Dudeanu Ermoghen Ib ă nescu Diana Melinte Laurenţiu-Ionuţ Petrişor Ionuţ C ă t ă lin

2 Evolution of applications 1960 – Mainframes, punch cards, monochrome text terminals; ◦ Same application, different code, one for every operating system - big development cost; Client/Server Applications ◦ WIMP(Windows, Icon, Menu, Pointer); ◦ Applications running on a desktop machine, with centralized data on a server ◦ Bigger cost, because the client has to run on every operating system; an upgrade to the system required an update to the application

3 Web Applications Internet, documents sharing; HTML; Browsers ◦ Back-Forward Navigation; ◦ Bookmarks; Documents accessed by URL; HTTP Protocol; All documents in one place; Many standards: CSS, DOM, SVG, PNG; no proprietary extensions => popularity, success; Web application: application that resides on a central server and can be accessed through web browsers; HTML content is dynamically generated.

4 Small cost; One application for all browsers; clients have already all necessary software installed; Easy to upgrade; No rich user experience, no visual feedback, slow; Every action results in a call to the server to generate whole application; Great improvement on cost effectiveness => most popular type of software application No spreadsheets, messengers, etc; Application with rich user interaction still was developed as Client/Server Applications

5 Rich Internet Applications Ajax Jesse James Garrett, “Ajax: A New Approach to Web Applications” JavaScript, XMLHttpRequest object; Only parts of the page are updated; AJAX = Asynchronous JavaScript and XML.

6 Asynchronous Synchronous interaction model = user waits for data to be send an page to load. In asynchronous model – the Ajax engine running on a separate thread delegates requests to server and handles the results, while the user can interact with the application ◦ No page refresh;

7 JavaScript Interpreted, weakly typed programming language; Created Brendan Eich at Netscape; Originally named Mocha, then LiveScript;renamed in 1995 to JavaScript. No relation with Java; Microsoft dialect: JScript; 1996 – JavaScript submitted to standardization, resulted ECMAScript specification with JavaScript as one of its implementations;

8 Ajax is only a name, not an acronym Ajax can be implemented in ActionScript(Flex) Other technologies different from XML are preferred ◦ A proprietary protocol ◦ JavaScript Object Notation(JSON) – lightweight data interchange format based on name/value pairs ◦ Plain JavaScript – most powerful; JavaScript code hard to generate

9 RIA advantages No instalation required – software run in a browser; Updates are automatic – when page is revisited; Platform independent – on every platform with a browser; More secure – little access to the local system; less likely to be harmful More responsive – compared to classic applications More scalable – more computations done on client More network efficient – only necessary data is send at the server.

10 RIA disadvantages Requires JavaScript or specific plug- in – users can turn off javascript No access to system resources – cannot read local files; Hard for search engines to index fully Depends on an Internet connection Accessibility issues – screen readers have problems with partial updated pages;

11 GWT Writing JavaScript is difficult and error- prone; JavaScript behaves a little different on different browsers; GWT (Google Web Toolkit) ◦ real abstraction layer that hides the detail of JavaScript; ◦ Java to JavaScript compiler; easy to code and debug in Java; ◦ Unit Testing; best coding practices;

12 Features Open-source No plugin required (VML, Flash, Silverlight) Dynamic and reusable UI components Browser history management Support for full-featured Java debugging GWT handles all cross-browser issues for the developer JUnit integration Easy internationalization

13 The developers can mix handwritten JavaScript in the Java source code using the JavaScript Native Interface Support for using Google APIs in GWT applications (Google Gears) The developers can design and develop their application in a pure object-oriented fashion A number of libraries are available for GWT, by Google and third parties(exGWT)

14 GWT limitations Not indexable by search engines Javascript dependent No clear separation between code and styling/layout – structure created in code;

15 Components Java to JavaScript compiler – the heart of GWT, compiles java code for client part into JavaScript JRE Emulation library – classes from Java have to have an equivalent in javascript to be used with GWT UI building library – the biggest part; UI components; RPC support; history management; GWT Hosted Web Browser – develop in hosted mode; code compiled in Java; used for debugging

16 Java to JavaScript Compiler A program that can be started by running the class com.google.gwt.dev.GWTCompiler; Unreferenced code is not compiled; Doesn’t allow runtime loading of classes; Is a little slow; A different JavaScript code version for every browser category is generated;

17 JRE Emulation library Mapping of JRE into JavaScript; Differences from JRE: ◦ No long support; ◦ Exception handling – no NullPointerException, OutOfMemory; no getS t ackTrace(); ◦ Single threaded – JavaScript interpreters are single threaded; thread related functions and keywords have no effect ◦ No reflection- related to the fact GWT needs to know each class and methods used in order to optimize code;

18 JRE emulated classes No SQL, file support(because of JavaScript security restrictions) Only a subset of classes are emulated; Differences in classes: ◦ Regular expressions – different behavior; ◦ Different serialization support from java; Some common used classes are different ◦ java.util.DateTimeFormat -> com.google.gwt.i18n.client.DateTimeFormat Namespaces: java.lang; java.util; java.io;

19 UI library

20 Concepts Application organized in modules; -------------------------------------------------------- --------------------------Host page – the page that has the application loader; Running modes: ◦ Hosted mode – code compiled in java bite code; full debugging support; running in an emulated browser; ◦ Web mode – code compiled in JavaScript; running on real browser;

21 Who is using GWT ? http://www.curriki.org http://traceurl.com http://beta.contactoffice.com

22 GWT 2.0 Improvements Different terminology : “Development mode” instead of “hosted mode” In-browser development mode – debugging in real browsers; Based on plug-ins for every browser Code chunks – on demand loading of needed code; Declarative user interface – UI can be declared in a XML file; Bundling of resources – XML, CSS and text files can be combined into one file for fewer server requests;


Download ppt "Google Web Toolkit Dudeanu Ermoghen Ib ă nescu Diana Melinte Laurenţiu-Ionuţ Petrişor Ionuţ C ă t ă lin."

Similar presentations


Ads by Google