Google Web Toolkit (GWT) Architectural Impact on Enterprise Web - - PowerPoint PPT Presentation

google web toolkit gwt
SMART_READER_LITE
LIVE PREVIEW

Google Web Toolkit (GWT) Architectural Impact on Enterprise Web - - PowerPoint PPT Presentation

Google Web Toolkit (GWT) Architectural Impact on Enterprise Web Application First Generation HTTP request (URL or Form posting) W W W HTTP response (HTML Document) Client Tier Server Tier Data Tier CGI-Scripts Data Source Web


slide-1
SLIDE 1

Google Web Toolkit (GWT)

“Architectural Impact on Enterprise Web Application”

slide-2
SLIDE 2

2

First Generation

Client Tier Server Tier

W W

Web

W

CGI-Scripts Data Source

Data Tier

HTTP request (URL or Form posting) HTTP response (HTML Document)

slide-3
SLIDE 3

3

First Generation

Shortcomings

  • lack of a coherent architectural model

– adhoc scripts development – no interaction between scripts

  • evolution

– how do you evolve scripts? – written in different languages

  • data/information sharing

– has to be via an external repository – difficult to control transactions

slide-4
SLIDE 4

4

First Generation

Shortcomings

  • security

– CGI based scripts still a nightmare for admins – scripts are executed in native environment

  • server execution environment is directly exposed
  • vulnerabilities in server code are also exposed
  • throughput

– a script launches a process – so what?

  • tight coupling

– each view is coupled to its corresponding script

slide-5
SLIDE 5

5

Second Generation

Client Tier Server Tier Presentation JEE Container

W W J J

Web

W

JEE Server Servlet Services JDBC Data Source

Data Tier

HTTP response (HTML Document)

slide-6
SLIDE 6

6

Second Generation

Shortcomings

  • server focused

– most improvements are realized on the server side

  • client tier

– still based on primitives

  • HTML, javascript, CSS etc.

– not dynamic

  • request-response cycle

– worse than first generation ???

slide-7
SLIDE 7

7

GWT

What is GWT

SG + AJAX = GWT

Not Exactly

slide-8
SLIDE 8

8

GWT

GWT is a lot more than that

  • a paradigm shift away from

– web application building blocks – synchronous communication

  • built on standards

– integrates well

  • with existing server applications, web services

– composite building blocks

  • HTML, javascript etc are low-level primitives
  • separation of concerns
slide-9
SLIDE 9

9

GWT Components

JRE Emulator Java-JS Compiler JSNI RPC GWT Servlet Ext RPC manager widgets XML/JSON i18N Browser Integration Core Browser Runtime Environment

slide-10
SLIDE 10

10

Java-JS Compiler

Converts Java to Javascript

  • src-to-src compiler
  • high level typed language to a script language

– does this make sense???

  • JS code optimization

– browser engines – size – security / obfuscation – localization

slide-11
SLIDE 11

11

JRE Emulator

Emulates

  • core Java classes in Javascript

Composite building blocks

  • allows for building composite building blocks
  • client tier built on

– composite building blocks

  • rather than low level primitives
slide-12
SLIDE 12

12

JSNI

Java Script Native Interface

  • wrapper

– for Javascript inside Java code

  • extension point

– for integration with non GWT client components

slide-13
SLIDE 13

13

RPC

Remote Procedure Call

  • replaces HTTP

– for communication after app boot

  • asynchronous – why?

– breaks the request-response cycle

  • supports various protocols

– Ajax, JSON, GWT RPC- getName() RPC- getId()

getId() getName()

Time t0 t1 t2 t3

slide-14
SLIDE 14

14

Servlet Extension

Extension of JEE Servlet

  • integration with older JEE application

– get all the JEE benefits for free

  • server component

– facade for business functionality

  • evolution

– highly flexible

slide-15
SLIDE 15

15

GWT Components

JRE Emulator Java-JS Compiler JSNI RPC GWT Servlet Ext RPC manager widgets XML/JSON i18N Browser Integration Core Browser Runtime Environment

slide-16
SLIDE 16

16

Impact

Scalability Reusability Interoperability Design by contract Evolution Java based development

slide-17
SLIDE 17

17

Scalability

Improvement in server performance

  • (near) stateless servers

– client tier components truly reside in client tier – previously

  • the state was maintained on the presentation tier
  • the view was rendered on the client tier
  • optimized communication strategy

– via aggregation of control/data exchange – decrease in server load – better bandwidth usage

slide-18
SLIDE 18

18

Reusability

Application

  • single code base to support

– multiple browser engines – internationalization

  • i18N versions of the applications
  • application broken over reusable modules

Design & development

  • OOD

– what benefits do we get from OOD?

slide-19
SLIDE 19

19

Interoperability

Integration / Extension points

  • Javascript native interface (JSNI)

– a layer of abstraction for integrating Javascript

  • third party & legacy Javascript libraries
  • server side integration

– servlet extension

  • plugs into the JEE platform
  • also possible for other platforms

– mashups

  • use of diverse web services
slide-20
SLIDE 20

20

Design by Contract

Client tier standardization

  • browser runtime environment (BRE)

– client code has to abide by the BRE interface – same enhancement that JEE brought to server tier – isn't that strong coupling between GWT and an application

client code?

  • preserves the architectural integrity
slide-21
SLIDE 21

21

Evolution

Organic growth

  • OOA & OOD

– what does this buy us? – OO Javascript

Rich Internet Applications (RIA)

  • HTML & HTTP as the basic building primitive
  • prevails where others failed

– Java applet, ActiveX, Adobe flex

slide-22
SLIDE 22

22

Java based Development

Testing & Tools

  • well established frameworks for

– testing & profiling

  • continuous integration
  • well supported tools

– IDEs, profilers etc.

  • skills-set standardization

– development teams