Client-Side Web Programming (Part 2) Robert M. Dondero, Ph.D. Princeton University



Similar documents
Chapter 12: Advanced topic Web 2.0

Performance Testing for Ajax Applications

Table of contents. HTML5 Data Bindings SEO DMXzone

Web Programming. Robert M. Dondero, Ph.D. Princeton University

Credits: Some of the slides are based on material adapted from

Web Programming Step by Step

A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server

Some Issues on Ajax Invocation

AJAX: Highly Interactive Web Applications. Jason Giglio.

DreamFactory & Modus Create Case Study

Term Paper. P r o f. D r. E d u a r d H e i n d l. H o c h s c h u l e F u r t w a n g e n U n i v e r s i t y. P r e s e n t e d T o :

Web application Architecture

Scalable and Efficient Web Application Architectures. Thin-clients and SQL vs. Thick-clients and NoSQL

From Desktop to Browser Platform: Office Application Suite with Ajax

MASTERTAG DEVELOPER GUIDE

FormAPI, AJAX and Node.js

Rich Internet Applications

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Ajax Design and Usability

Web Cloud Architecture

Art of Code Front-end Web Development Training Program

Monitoring the Real End User Experience

A Tool for Evaluation and Optimization of Web Application Performance

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc.

It is highly recommended that you are familiar with HTML and JavaScript before attempting this tutorial.

CA APM Cloud Monitor. Scripting Guide. Release 8.2

Are AJAX Applications Vulnerable to Hack Attacks?

Web Applications Come of Age

Why AJAX? Keywords - Web applications, Java Script, Web INTRODUCTION. Why Not AJAX? 111 P a g e

Performance Testing Web 2.0. Stuart Moncrieff (Load Testing Guru) /

Distance Examination using Ajax to Reduce Web Server Load and Student s Data Transfer

AJAX. Gregorio López López Juan Francisco López Panea

Getting Started Guide with WIZ550web

Programming IoT Gateways With macchina.io

ITP 342 Mobile App Dev

Example. Represent this as XML

Design Requirements for an AJAX and Web-Service Based Generic Internet GIS Client

Performance Testing Web 2.0

Advantage of Jquery: T his file is downloaded from

Experimenting in the domain of RIA's and Web 2.0

How to Use Google Cloud Print

Position Paper: Toward a Mobile Rich Web Application Mobile AJAX and Mobile Web 2.0

AJAX and jmaki for Web 2.0 Development using Java. Inyoung Cho Java Technology Evangelist Sun Microsystems, Inc.

How to use Google Cloud Print

Security Issues in Web Programming. Robert M. Dondero, Ph.D. Princeton University

Adding Panoramas to Google Maps Using Ajax

GUI and Web Programming

HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

How To Build A Web App

ios Cloud Development FOR Neal Goldstein WILEY John Wiley & Sons, Inc.

IP Phone Services Configuration

ICE Trade Vault. Public User & Technology Guide June 6, 2014

Design Approaches of Web Application with Efficient Performance in JAVA

Introduction to the. Barracuda Embedded Web-Server

Client-side Web Engineering From HTML to AJAX

Smartphone Application Development using HTML5-based Cross- Platform Framework

Net2 Anywhere - Installation

CMSC434 TUTORIAL #3 HTML CSS JavaScript Jquery Ajax + Google AppEngine Mobile WebApp HTML5

Google Web Toolkit (GWT) Architectural Impact on Enterprise Web Application

10 Java API, Exceptions, and Collections

Lucy Zhang UI Developer Contact:

Google Web Toolkit. Introduction to GWT Development. Ilkka Rinne & Sampo Savolainen / Spatineo Oy

Who? Wolfgang Ziegler (fago) Klaus Purer (klausi) Sebastian Gilits (sepgil) epiqo Austrian based Drupal company Drupal Austria user group

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1

Web Testing. Main Concepts of Web Testing. Software Quality Assurance Telerik Software Academy

Modern Web Development From Angle Brackets to Web Sockets

WebIOPi. Installation Walk-through Macros

Abstract. Description

Real-time Device Monitoring Using AWS

How To Write A Web Server In Javascript

Server-Side Scripting and Web Development. By Susan L. Miertschin

Enabling AJAX in ASP.NET with No Code

IBM Script Portlet for WebSphere Portal Release 1.1

Web-JISIS Reference Manual

Core Ideas CHAPTER 1 PART. CHAPTER 2 Pre-Ajax JavaScript Communications Techniques CHAPTER 3 XMLHttpRequest Object CHAPTER 4 Data Formats

GMass Getting Started Guide

Progressive Enhancement With GQuery and GWT. Ray Cromwell

Smartphone Enterprise Application Integration

Getting Started Guide for Developing tibbr Apps

DISCOVERY OF WEB-APPLICATION VULNERABILITIES USING FUZZING TECHNIQUES

XML Processing and Web Services. Chapter 17

Preface. Motivation for this Book

Implementing a Web-based Transportation Data Management System

PROJECT MANAGEMENT SYSTEM

XML Programming with PHP and Ajax

Web Application Frameworks. Robert M. Dondero, Ph.D. Princeton University

Google Docs Forms. Step by Step Tutorial

SkyFoundry News Update New Reporting Features and SkySpark Mobile

Client vs. Server Implementations of Mitigating XSS Security Threats on Web Applications

Load Testing Ajax Apps using head-less browser tools. NoVaTAIG April 13, 2011 Gopal Addada and Frank Hurley Cigital Inc.

Implementing Mobile Thin client Architecture For Enterprise Application

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

Transcription:

Client-Side Web Programming (Part 2) Robert M. Dondero, Ph.D. Princeton University 1

Objectives You will learn about: Client-side web programming, via... Multithreaded Java Applets AJAX 2

Part 1: Preliminary Note 3

Preliminary Note Each Pennypack application can be expressed as a single page... 4

PennypackPythonSingle App See PennypackPythonSingle application book.py, database.py, common.py index.html search.cgi Merges searchform.cgi, searchform.py, searchresults.cgi, searchresults.py 5

Other PennypackXXXSingle Apps See PennypackJavaSingle application See PennypackPhpSingle application See PennypackJspSingle application Similar (Handouts not provided) (Code is available via Web pages) 6

"Single Page" App Assessment Cons: Pro: In the context of this course... Maybe less understandable to programmer Doesn't illustrate state handling Doesn't illustrate A&A as well In the broader context... User might prefer 7

A More Dynamic Pennypack Wouldn't it be nice... If Pennypack application could refresh book list with each user keystroke User need not click "Submit" button (Recall new versions of Google search page) Approaches: (Multithreaded) Java Applet AJAX 8

Part 2: Multithreaded Java Applets 9

PennypackApplet Application See PennypackApplet application book.py, database.py search.html SearchApplet.java searchresults.cgi Uses URL object to contact web server Written in Python (arbitrary choice) Generates plain text reply But the server shouldn't be concerned with presentation!... 10

PennypackAppletXml Application See PennypackAppletXml application book.py, database.py search.html searchresults.cgi Generates XML reply Could create DOM, then XML (overkill) SearchApplet.java Formats XML received from server Use of XML separates content and presentation But what if the server is slow?... 11

PennypackAppletXmlMult App See PennypackAppletXmlMult application book.py, database.py search.html SearchApplet.java searchresults.cgi Some notes... 12

PennypackAppletMult Application SearchApplet.java Multithreaded One thread handles event loop Other threads handle page fetching Still not perfect Completion order of threads is unpredictable 13

Part 3: AJAX 14

AJAX AJAX: Asynchronous JavaScript and XML Let's consider each part of the title... 15

AJAX "JavaScript" AJAX is accomplished via function calls embedded in JavaScript code "Asynchronous" Multithreaded JavaScript code registers callback function Browser sends request to server Browser can do other work Callback from server interrupts browser 16

AJAX "XML" Data communicated from server to callback function can be (but need not be) an XML doc (AJA"X" is a misnomer) AJAX parses XML doc to generate DOM JavaScript code accesses DOM 17

PennypackAjax App See PennypackAjax application book.py, database.py index.html search.html searchresults.cgi Some notes... 18

PennypackAjax App search.html Contains AJAX code Note code to handle differences among browsers Does not use XML searchresults.cgi Generates plain text reply Completion order of threads is unpredictable Use messageid to display results of last query only Imperfect: How to protect critical section? 19

PennypackAjax App But the server shouldn't be concerned with presentation!...

PennypackAjaxXml App See PennypackAjaxXml application book.py, database.py index.html search.html searchresults.cgi Some notes... 21

PennypackAjaxXml App searchresults.cgi Generates XML reply Could create DOM, then XML (overkill) search.html AJAX parses XML JavaScript accesses DOM Use of XML separates content and presentation Imperfect 22

PennypackAjaxXml App But XML isn't the only choice...

PennypackAjaxJson App See PennypackAjaxJson application book.py, database.py index.html search.html searchresults.cgi Some notes... 24

PennypackAjaxJson App searchresults.cgi Generates JSON reply search.html JavaScript parses JSON to produce JavaScript data structure JavaScript traverses data structure Use of JSON separates content and presentation Imperfect 25

AJAX Success Stories Google Suggest Built into www.google.com Google Maps maps.google.com Google Docs docs.google.com Google gmail mail.google.com 26

Summary We have covered: Client-side web programming, via... Multithreaded Java Applets AJAX 27