WATERLOO CHERITON SCHOOL OF COMPUTER SCIENCE Google Web Toolkit (GWT) Google Web Toolkit (GWT) “ “ Architectural Impact Architectural Impact on on Web Applications” Web Applications” CS 446/646 ECE452 Jun 8 th , 2011 IMPORTANT NOTICE TO STUDENTS These slides are NOT to be used as a replacement for student notes. These slides are sometimes vague and incomplete on purpose to spark class discussions
22
Embed
Google Web Toolkit (GWT)a78khan/cs446/lectures/2011_06-jun_08_G… · RPC Remote Procedure Call replaces HTTP – for communication after app boot asynchronous – why? – breaks
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
Google Web Toolkit (GWT)Google Web Toolkit (GWT)““Architectural Impact Architectural Impact
on on Web Applications”Web Applications”
CS 446/646 ECE452Jun 8th, 2011
IMPORTANT NOTICE TO STUDENTS
These slides are NOT to be used as a replacement for student notes.These slides are sometimes vague and incomplete on purpose to spark class discussions
2WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
First Generation
Client Tier Server Tier
W
W
Web
W
CGI-Scripts DataSource
Data Tier
HTTP request(URL or Form posting)
HTTP response(HTML Document)
3WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
First GenerationShortcomings● lack of a coherent architectural model
– development = adhoc composition of scripts – limited 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
4WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
First GenerationShortcomings● 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
5WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
Second Generation
Client Tier Server Tier
Presentation JEE Container
W
W
J
J
Web
W
JEE Server
Servlet
Services
JDBC
DataSource
Data Tier
HTTP request(URL or Form posting)
HTTP response(HTML Document)
6WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
Second GenerationShortcomings● server focused
– almost all improvements are on the server side● client tier
– still based on primitives● HTML, javascript, CSS etc.
– not dynamic● request-response cycle
– worse than first generation ???
7WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
GWT
SG + AJAX = GWT
Not Exactly
AJAX: Asynchronous JavaScript and XML
8WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
GWTGWT is a lot more than that● a paradigm shift away from
– traditional (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
9WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
GWT Components
JREEmulator
Java-JSCompiler
JSNI
Async RPC
GWTServlet Ext
RPC manager
widgets
XML/JSON
i18N
Browser Integration
Core
Browser Runtime Environment
10WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE
JavaJS CompilerConverts Java to Javascript● src-to-src compiler● high level typed language to a script language