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

Similar documents
Developing Ajax Web Apps with GWT. Session I

Module7: AJAX. Click, wait, and refresh user interaction. Synchronous request/response communication model. Page-driven: Workflow is based on pages

AJAX Programming Overview. Introduction. Overview

Fall Semester (081) Module7: AJAX

Lesson 12: JavaScript and AJAX

AJAX: Rich Internet Applications

AJAX Workshop. Karen A. Coombs University of Houston Libraries Jason A. Clark Montana State University Libraries

Web 2.0 Käyttöliittymätekniikat

REST AND AJAX. Introduction. Module 13

dotnettips.com 2009 David McCarter 1

Create-A-Page Design Documentation

Outline. AJAX for Libraries. Jason A. Clark Head of Digital Access and Web Services Montana State University Libraries

AJAX in Apache MyFaces A New Approach To Web Applications

AJAX and PHP AJAX. Christian Wenz,

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) Helper Applications & Plug-Ins

Case Study: Dodging the Pitfalls of Enterprise Ajax Applications

Part of this connection identifies how the response can / should be provided to the client code via the use of a callback routine.

Tools to Develop New Linux Applications

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript

We aren t getting enough orders on our Web site, storms the CEO.

Chapter 10 Web-based Information Systems

Abstract. 1. Introduction. 2. AJAX overview

eclipse rich ajax platform (rap)

Web Application with AJAX. Kateb, Faris; Ahmed, Mohammed; Alzahrani, Omar. University of Colorado, Colorado Springs

Programming the World Wide Web by Robert W. Sebesta

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

Chapter 9. Web Applications The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

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 :

AJAX Programming Chris Seddon

Web Programming Paper Solution (Chapter wise)

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript

Web Architecture and Technologies

Web Application Security

2310C VB - Developing Web Applications Using Microsoft Visual Studio 2008 Course Number: 2310C Course Length: 5 Days

This document is for informational purposes only. PowerMapper Software makes no warranties, express or implied in this document.

Embracing HTML5 CSS </> JS javascript AJAX. A Piece of the Document Viewing Puzzle


Using Development Tools to Examine Webpages

CITS1231 Web Technologies. Ajax and Web 2.0 Turning clunky website into interactive mashups

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

DESIGN AND IMPLEMENTATION OF SAGE DISPLAY CONTROLLER PROJECT

Ajax Enabled Web Application Model with Comet Programming

Say goodbye to the pains of Ajax. Yibo

IGME-330. Rich Media Web Application Development I Week 1

Introduction to AJAX Bringing Interactivity & Intuitiveness Into Web Applications. By : Bhanwar Gupta SD-Team-Member Jsoft Solutions

BEAWebLogic. Portal. Overview

,

Introduction to Ajax

RIA Security - Broken By Design. Joonas Lehtinen IT Mill - CEO

Etanova Enterprise Solutions

An Introduction to AJAX. By : I. Moamin Abughazaleh

Introduction to Ajax. Sang Shin Java Technology Architect Sun Microsystems, Inc.

Using Adobe Flex in JSR-286 Portlets

Web Engineering (CC 552)

Web Engineering. Introduction. Husni

GRITS AJAX & GWT. Trey Roby. GRITS 5/14/09 Roby - 1

Web Systems & Technologies: An Introduction

Web 2.0, AJAX and RIAs

Working with Javascript Building Responsive Library apps

Checklist for Testing of Web Application

Customizing the Blackboard Learn UI & Tag Libraries. George Kroner, Developer Relations Engineer

Google Web Toolkit (GWT)

Building Rich Applications with Appcelerator

2/6/2012. Rich Internet Applications. What is Ajax? Defining AJAX. Asynchronous JavaScript and XML Term coined in 2005 by Jesse James Garrett

A Closer Look at XPages in IBM Lotus Domino Designer 8.5 Ray Chan Advisory I/T Specialist Lotus, IBM Software Group

THE EFFECTS OF THE AJAX TECHNOLOGY ON WEB APPLICATION USABILITY

Rich Internet Application with TIBCO General Interface By Nitin Goswami

Web Browser as an Application Platform Antero Taivalsaari

Time: 3 hours. Full Marks: 70. The figures in the margin indicate full marks. Answer from all the Groups as directed. Group A.

Web 2.0 and AJAX Security. OWASP Montgomery. August 21 st, 2007

Review. Fundamentals of Website Development. Web Extensions Server side & Where is your JOB? The Department of Computer Science 11/30/2015

Development of web applications using Google Technology

Module 5: Javascript, Cookies COM 420

Web Development for Dinosaurs An Introduction to Modern Web Development

(p t y) lt d. 1995/04149/07. Course List 2018

AJAX ASYNCHRONOUS JAVASCRIPT AND XML. Laura Farinetti - DAUIN

IBM JZOS Meets Web 2.0

WebApp development. Outline. Web app structure. HTML basics. 1. Fundamentals of a web app / website. Tiberiu Vilcu

Group 1. SAJAX: The Road to Secure and Efficient Applications. - Final Project Report -

ASP.NET Using C# (VS2013)

Welcome to the Ajax Bible! This is the home of all things Ajax.

Web Design. Basic Concepts

Scripting. Web Architecture and Information Management [./] Spring 2009 INFO (CCN 42509) Contents

PGT T3CHNOLOGY SCOUTING. Google Webtoolkit. JSF done right?

of making things look better with CSS, and you have a much better platform for interface development.

PHP & My SQL Duration-4-6 Months

SSC - Web applications and development Introduction and Java Servlet (I)

COPYRIGHTED MATERIAL. Part I: Getting Started. Chapter 1: Introducing Flex 2.0. Chapter 2: Introducing Flex Builder 2.0. Chapter 3: Flex 2.

Programming the Web 06CS73 INTRODUCTION AND OVERVIEW. Dr. Kavi Mahesh, PESIT, Bangalore. Textbook: Programming the World Wide Web

Programming for Digital Media. Lecture 7 JavaScript By: A. Mousavi and P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Enterprise Software Architecture & Design

Instructor s Notes Web Data Management Web Client/Server Concepts. Web Data Management Web Client/Server Concepts

Distributed Multitiered Application

Homework 8: Ajax, JSON and Responsive Design Travel and Entertainment Search (Bootstrap/Angular/AJAX/JSON/jQuery /Cloud Exercise)

Web Systems & Technologies: An Introduction

Internet: An international network of connected computers. The purpose of connecting computers together, of course, is to share information.

Web Programming Step by Step

F10 "CHALLENGES IN PERFORMANCE TESTING OF AJAX APPLICATIONS" Rajendra Gokhale Aztecsoft BIO PRESENTATION PAPER 5/18/ :15:00 AM

Web Architecture AN OVERVIEW

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

Transcription:

1 The Web, revisited WEB 2.0 marco.ronchetti@unitn.it Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf

2 The old web: 1994 HTML pages (hyperlinks) + static graphics + cgi (active engines) + some separated dynamic graphics (Applets) HTTP is a stateless protocol: cookies

3 The original web architecture HTTP Get File System Browser Internet httpd Cgi-bin process Query SQL Data DB Client Server

4 Evolution of the web: 1 Better dynamic engines Servlets, ASP, JSP (+ Php, Perl, Python...) Better Server-side organization EJB, frameworks (Struts, Hybernate, Spring)

5 The Bottleneck! Browser HTTP Get SLOW! Internet httpd Cgi-bin process File System Query SQL Data DB Client Server

6 The solution: reduce net traffic by having HTTP Get a smarter client! File System Smart browser Internet httpd Cgi-bin process Query SQL Data DB Client How? Server Including code in HTML

7 Evolution of the web: 2 Better control of the browser Javascript + DOM Applet-Javascript interaction Better separation of content and presentation CSS (DHTML=HTML4+Javascript+DOM+CSS) XML+XSLT, Cocoon (XHTML)

8 Evolution of the web: 3 Better construction of interfaces (widgets).net Java Server Faces

9 Are we there? BUT ALL THIS IS NOT YET ENOUGH!

10 Key disadvantages of web apps Poor Interactivity users must wait for full page reloads after each interaction with the server. Unresponsiveness classic web applications transfer the complete form data to the server, which in turn renders and sends back the full HTML markup of the page to the browser. Lots of bandwidth is consumed and the performance is significantly hindered. Even worse, the user will often find the page has scrolled to a different position, causing disorientation. Simplistic Interfaces the requirement for full page postback whenever the user interface has to be changed imposes hefty limitations on the degree of sophistication of web user interfaces. Rich and smooth interfaces with on-demand update could only be implemented using host technologies (Flash Applets).

11 The form nightmare

12 Evolution of the web: 4 Embedding specialized, non web objects (plug ins) Applets Active-X Quicktime RealPlayer Flash

13 The rise of the new web The Web as we know it is changing probably more than it has since the first graphic showed up The idea of the webpage itself is nearing its useful end. With the way Ajax allows you to build nearly stateless applications that happen to be web accessible, everything changes. Jesse James Garrett, February 15, 2005 http://www.adaptivepath.com/publications/essays/archives/000385.php

14 The new web - Examples http://demo.script.aculo.us/ http://demos.openrico.org/

15 Ajax! new development technique will blur the line between web-based and desktop applications. rich, highly responsive and interactive interfaces Acronym stands for Asynchronous JavaScript + XML.

16 How does Ajax work? The core idea behind AJAX is to make the communication with the server asynchronous, so that data is transferred and processed in the background. As a result the user can continue working on the other parts of the page without interruption. In an AJAX-enabled application only the relevant page elements are updated, only when this is necessary.

17 The hart of Ajax not actually a brand new technology! First used after Microsoft implemented Microsoft XMLHTTP COM object that was part of The Microsoft XML Parser (IE 5.1) Similarly supported by a Mozilla Javascript object XMLHttpRequest (Mozilla 1.0, Firefox, Safari 1.2 etc.) Massively used by Google Other labels for the same technology were Load on Demand, Asynchronous Requests, Callbacks, Out-of-band Calls, etc.

18 Ajax code if (window.xmlhttprequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); } else if (window.activexobject) { // IE http_request = new ActiveXObject("Microsoft.XMLHTTP"); } A more complete example? See e.g. http://www.onlamp.com/pub/a/onlamp/2005/05/19/xmlhttprequest.html

19 Ajax is more than that * dynamic presentation based on XHTML + CSS; * dynamic display and interaction using Document Object Model; * data exchange and manipulation using XML e XSLT; * asynchrounous data fetching using XMLHttpRequest; * JavaScript as glue.

20 The paradigms 1.0 2.0 Pictures after Jesse James Garrett

21 The models 1.0 2.0 Pictures after Jesse James Garrett

22 The (impressive!) result - RIA

23 Ajax - advantages Rich applications in browsers No issues with installation Built on existing infrastructure (TCP/IP, SSL, HTTP, XML )

24 Ajax - advantages Better Performance and Efficiency small amount of data transferred from the server. Beneficial for data-intensive applications as well as for low-bandwidth networks. More Responsive Interfaces the improved performance give the feeling that updates are happening instantly. AJAX web applications appear to behave much like their desktop counterparts. Reduced or Eliminated "Waiting" Time only the relevant page elements are updates, with the rest of the page remaining unchanged. This decreases the idle waiting time. Increased Usability Users Can Work with the Rest of the Page while data is being transferred in the background.

25 Applicability Scenarios Highly interactive applications Google Spreadsheet Data visualization visualizing large datasets Google Maps Data input & validation it s possible to validate the data the user enters, while they are entering it. They can then receive feedback (using the server s intelligence) without the page being posted back. Active widgets

26 And make sure that you Preserve the Normal Page Lifecycle as much as possible! Reflect Control State on the Server in real-life scenarios there is no use of simply rendering controls on the page. Support Cross-Browser usage there are different implementation of the XmlHttpRequest object. You should make sure that all AJAX components you choose operate properly on various browsers and platforms. Ensure proper Operation when Cookies are Disabled support cookieless sessions.

27 And make sure that you Give visual feedback - When a user clicks on something in the AJAX user interface, they need immediate visual feedback Keep the Back button make sure that the Back button in your application functions on every page of the site. Use links for navigation avoid the temptation to use links as an interface on your AJAX application to change the state of your application. Users have been trained over ten years to expect a link to take them somewhere, so give them what they expect. Limit the scope of visual changes when an AJAX call results in one or more changes to what the user sees, keep the changes local to the place where the user would expect them to be. Use human-readable links people like to pass the addresses of useful web pages to each other. Make sure your application supports URLs that people can share easily, so not too long or complex. Adapted from: www.telerik.com/documents/telerik_and_ajax.pdf

28 And make sure that you Don t bloat the code make sure that your application uses as little client-side scripting as possible. This reduces download time for the page and also reduces the processor requirements on the client browser, so results in a faster browser experience. Follow UI conventions AJAX is a world of possibilities, but when it comes to user interface the best is invariably the familiar. If you re creating a user interface for a specific feature, the place to start is by replicating an existing successful interface and looking at what your clients expect. Also remember that although it may be cool to implement drag-and-drop, few people may realize the interface relies on it. Don t scroll users like to feel in control, so if they have moved the scrollbar to a specific place, don t move the page somewhere else. Reduce page loads do as much as you can to reduce the number of page loads the user has to do to achieve their goal. Adapted from: www.telerik.com/documents/telerik_and_ajax.pdf

29 Warning: Ajax has drawbacks! Accessibility the AJAX development technique fundamentally violates the requirements for accessibility. Since the page content is being updated dynamically, the changes may not be detected by accessibility tools like screen readers. Some accessibility standards prohibit the use of JavaScript altogether New UI Interactivity Requires Learning the UI richness of AJAX-enabled application presents users with new and unexpected functionality. this may require some learning!

30 But Ajax is hard! Extensive use of Javascript - requires substantial JavaScript skills - lack of good debugging tools for client-side script - it is like debugging multithreaded Javascript! Breaks normal page lifecycle AJAX requires a different way of thinking about a web-site, since the concept of a "Page" is no longer valid. In fact, AJAX applications may be considered as closer to the desktopapplications development approach. The fact that a Page no longer holds constant data leads to two important consequences the Back button and bookmarking will no longer work as expected. Every browser has its flavour!

31 How to solve the problem? There are many proposed libraries/frameworks Survey of AJAX/JavaScript Libraries http://chandlerproject.org/bin/view/projects/ajaxlibraries WARNING: Third Party Controls with Complex JavaScript (e.g. powerful datagrids, treeviews, WYSIWYG editors, etc.) may be damaged by universal AJAX wrappers/containers!

32 EXT-JS http://www.sencha.com/products/js/ Ext JS is a cross-browser JavaScript library for building rich internet applications. Build rich, sustainable web applications faster than ever. It includes: * High performance, customizable UI widgets * Well designed and extensible Component model * An intuitive, easy to use API

33 Google s Web Toolkit http://code.google.com/intl/it-it/webtoolkit/ List of the widgets: http://code.google.com/intl/it-it/docreader/#p=google- web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=devguidewidgetgallery Demo of the widgets: http://gwt.google.com/samples/showcase/showcase.html

34 Google s Web Toolkit The idea: write java and transform it into Javascript Debug in hosted mode If your GWT application compiles and runs in hosted mode as you expect And GWT compiles your application into JavaScript output without complaint, Then your application will work the same way in a web browser as it did in hosted mode.

35 GWT cross browser GWT shields you from worrying too much about cross-browser incompatibilities. If you stick to built-in widgets and composites, your applications will work similarly on the most recent versions of Internet Explorer, Firefox, and Safari. (Opera, too, most of the time.)

36 GWT tools

37 GWT service architecture

38 References About Ajax Papers and architectural description the first paper in the list is a must! http://www-128.ibm.com/developerworks/java/library/wa-ajaxintro1.html http://www-128.ibm.com/developerworks/java/library/j-ajax2/index.html http://www-128.ibm.com/developerworks/java/library/j-ajax3/index.html http://www-128.ibm.com/developerworks/java/library/j-ajax1/index.html About GWT http://code.google.com/intl/it- IT/webtoolkit/overview.html

39 More References Plenty of tutorials on Ajax http://www.maxkiesler.com/index.php/weblog/co mments/60_more_helpful_ajax_tutorials/

40 New development (may 07) Java FX Script Does JavaFX Spell The End Of AJAX?

41 and all the Web 2.0 See e.g. http://www.seomoz.org/web2.0

42 and human computing See e.g. http://video.google.co.uk/videoplay?docid=- 8246463980976635143