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.

Slides:



Advertisements
Similar presentations
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
Advertisements

Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
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 
Abstract Data Types Data abstraction, or abstract data types, is a programming methodology where one defines not only the data structure to be used, but.
1 GWT Google Web Toolkit Build AJAX apps in the Java language
Introducing Mapbuilder Michael Adair Natural Resources Canada.
Technical Architectures
Google Web Toolkit - Gufran Mohammed. Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications.
MC365 Application Servers: Servlets. Today We Will Cover: What a servlet is The HTTPServlet and some of its more important methods How to configure the.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
Lecture 27 Exam outline Boxing of primitive types in Java 1.5 Generic types in Java 1.5.
Computers: Tools for an Information Age
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Communication in Distributed Systems –Part 2
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
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.
UNIT-V The MVC architecture and Struts Framework.
Open source administration software for education next generation student system Using the Kuali Student Configurable User Interaction Model & Framework.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Guidelines for Homework 6. Getting Started Homework 6 requires that you complete Homework 5. –All of HW5 must run on the GridFarm. –HW6 may run elsewhere.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Google Web Toolkit An Overview By Shauvik Roy Choudhary.
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
MACIASZEK, L.A. (2001): Requirements Analysis and System Design. Developing Information Systems with UML, Addison Wesley Chapter 6 - Tutorial Guided Tutorial.
XML Registries Source: Java TM API for XML Registries Specification.
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
Are you getting the benefits from ASP.NET and AJAX? Introduction to the CTC ASP.NET Webforms Generator.
GWT Development with Activities and Places
Data Structures Using Java1 Chapter 2 Inheritance and Exception Handling.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Design Verification Code and Toggle Coverage Course 7.
Programming in Java CSCI-2220 Object Oriented Programming.
Creational Pattern: Factory Method At times, a framework is needed to standardize the behavior of objects that are used in a range of applications, while.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Preliminary Ocean Project Page 1 WGISS SG May 15, C. Caspar G. Tandurella P. Goncalves G. Fallourd I. Petiteville Preliminary Ocean Project Phase.
Copyright © 2015 Curt Hill Java for Minecraft Those things you should know.
the acronym for Asynchronous JavaScript and XML.
ASP.NET Web Services.  A unit of managed code installed under IIS that can be remotely invoked using HTTP.
CSI 3125, Preliminaries, page 1 Compiling the Program.
Package & Deploy. OBJECTIVES Package Deploy Way to package.
CPS Inheritance and the Yahtzee program l In version of Yahtzee given previously, scorecard.h held information about every score-card entry, e.g.,
Polymorphism, Virtual Methods and Interfaces Version 1.1.
Method Overriding Remember inheritance: when a child class inherits methods, variables, etc from a parent class. Example: public class Dictionary extends.
Unit-IV - Flash Player - Flex framework - MXML introduction - Action script introduction - Working with Action script - Flex data binding - Common UI components.
.NET Mobile Application Development XML Web Services.
Recap Introduction to Inheritance Inheritance in C++ IS-A Relationship Polymorphism in Inheritance Classes in Inheritance Visibility Rules Constructor.
1 Project 7: Looping. Project 7 For this project you will produce two Java programs. The requirements for each program will be described separately on.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
Inheritance - 3. Virtual Functions Functions defined as virtual are ones that the base expects its derived classes may redefine. Functions defined as.
Google Maps API v3: Built First for Mobile Susannah Raub Google June 24, 2010.
Google Web Toolkit Tutorial
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Writing simple Java Web Services using Eclipse
Working with Client-Side Scripting
Google Web Toolkit - Gufran Mohammed
Knowledge Byte In this section, you will learn about:
CIS16 Application Development – Programming with Visual Basic
More Object-Oriented Programming
Objectives In this lesson you will learn about: Need for servlets
9: POLYMORPHISM Programming Technique II (SCSJ1023) Jumail Bin Taliba
Static Binding Static binding chooses the function in the class of the base class pointer, ignoring any versions in the class of the object actually.
Presentation transcript:

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 version needs to be loaded by a particular client during bootstrapping at runtime. Each version is generated on a per browser basis, along with any other axis that your application defines or uses. For example, if you were to internationalize your application using GWT's Internationalization module,GWT's Internationalization module – the GWT compiler would generate various versions of your application per browser environment, such as "Firefox in English", "Firefox in French", "Internet Explorer in English", etc... – As a result, the deployed JavaScript code is compact and quicker to download than hand coded JavaScript, containing only the code and resources it needs for a particular browser environment.

Deferred Binding Benefits Reduces the size of the generated JavaScript code that a client will need to download by only including the code needed to run a particular browser/locale instance (used by the Internationalization module)Internationalization module Saves development time by automatically generating code to implement an interface or create a proxy class (used by the GWT RPC module)GWT RPC module Since the implementations are pre-bound at compile time, there is no run-time penalty to look up an implementation in a data structure as with dynamic binding or using virtual functions.

Defining Deferred Binding Rules There are two ways in which types can be replaced via deferred binding: – Replacement: A type is replaced with another depending on a set of configurable rules. We only cover this – Code generation: A type is substituted by the result of invoking a code generator at compile time.

Deferred Binding Using Replacement Replacement means overriding the implementation of one java class with another that is determined at compile time. For example, this technique is used to conditionalize the implementation of some widgets, such as the PopupPanel.PopupPanel The use of for the PopupPanel class is shown in the previous section describing the deferred binding rules.

Popup.gwt.xml The actual replacement rules are specified in Popup.gwt.xml, as shown below:

Popup.gwt.xml These directives tell the GWT compiler to swap out the PoupImpl class code with different class implementations according to the the user.agent property. ThePopup.gwt.xml file specifies a default implementation for the PopupImpl class, an overide for the Mozilla browser (PopupImplMozilla is substituted for PopupImpl), and an override for Internet Explorer version 6 (PopupImplIE6 is substituted for PopupImpl). Note that PopupImpl class or its derived classes cannot be instantiated directly. Instead, the PopupPanel class is used and the GWT.create(Class) technique is used under the hood to instruct the compiler to use deferred binding.GWT.create(Class)

Example Class Hierarchy using Replacement To see how this is used when designing a widget, we will examine the case of the PopupPanel widget further. The PopupPanel class implements the user visible API and contains logic that is common to all browsers. It also instantiates the proper implementation specific logic using the GWT.create(Class) as follows:GWT.create(Class)

After the GWT compiler runs It prunes out any unused code If your application references the PopupPanel class – the compiler will create a separate JavaScript output file for each browser, each containing only one of the implementations: PopupImpl, PopupImplIE6 or PopupImplM ozilla. – This means that each browser only downloads the implementation it needs, thus reducing the size of the output JavaScript code and minimizing the time needed to download your application from the server.