Networking & The Web. HCID 520 User Interface Software & Technology

Similar documents
Networking & The Web. HCID 520 User Interface Software & Technology

Controller/server communication

Web application Architecture

Controller/server communication

LEARN HOW TO USE CA PPM REST API in 2 Minutes!

Web Development. HCID 520 User Interface Software & Technology

AJAX ASYNCHRONOUS JAVASCRIPT AND XML. Laura Farinetti - DAUIN

CSC443: Web Programming 2

welcome to BOILERCAMP HOW TO WEB DEV

Kaazing Gateway. Open Source HTML 5 Web Socket Server

Corey Clark PhD Daniel Montgomery

Index. C CakePHP framework, 232 Cascading Style Sheets (CSS)

Qiufeng Zhu Advanced User Interface Spring 2017

Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios

Front End Programming

Standard 1 The student will author web pages using the HyperText Markup Language (HTML)


Table of Contents WWW. WWW history (2) WWW history (1) WWW history. Basic concepts. World Wide Web Aka The Internet. Client side.


Tooling for Ajax-Based Development. Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc.

World Wide Web Aka The Internet. Karst Koymans. Friday, October 7, 2016

Web Architecture AN OVERVIEW

AJAX and JSON. Day 8

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

quiz 1 details wed nov 17, 1pm see handout for locations covers weeks 0 through 10, emphasis on 7 onward closed book bring a , 2-sided cheat she

,

CS 5142 Scripting Languages

CS 498RK FALL RESTFUL APIs

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M

TIME SCHEDULE MODULE TOPICS PERIODS. HTML Document Object Model (DOM) and javascript Object Notation (JSON)

Development of Web Applications

10.1 Overview of Ajax

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

Working with Database. Client-server sides AJAX JSON Data formats Working with JSON data Request Response Bytes Database

The realtime web: HTTP/1.1 to WebSocket, SPDY and beyond. Guillermo QCon. November 2012.

Copyright Descriptor Systems, Course materials may not be reproduced in whole or in part without prior written consent of Joel Barnum

Creating an Online Catalogue Search for CD Collection with AJAX, XML, and PHP Using a Relational Database Server on WAMP/LAMP Server

ajax1.html 1/2 lectures/7/src/ ajax1.html 2/2 lectures/7/src/

Cleveland State University Department of Electrical and Computer Engineering. CIS 408: Internet Computing

WWW. World Wide Web aka The Internet. Karst Koymans. Informatics Institute University of Amsterdam. (version 18.8, 2018/10/16 12:20:12 UTC)

AJAX: Introduction CISC 282 November 27, 2018

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

JAVASCRIPT JQUERY AJAX FILE UPLOAD STACK OVERFLOW

When learning coding, be brave

Module 6 Node.js and Socket.IO

CORS. Константин Якушев MoscowJS 14,

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

IERG 4080 Building Scalable Internet-based Services


Web Development. Lab. Bases de Dados e Aplicações Web MIEIC, FEUP 10/11. Sérgio Nunes

REST AND AJAX. Introduction. Module 13

Session 11. Ajax. Reading & Reference

Ajax Application Design

Web Application Security

5/19/2015. Objectives. JavaScript, Sixth Edition. Introduction to the World Wide Web (cont d.) Introduction to the World Wide Web

s642 web security computer security adam everspaugh

Ajax- XMLHttpResponse. Returns a value such as ArrayBuffer, Blob, Document, JavaScript object, or a DOMString, based on the value of

CSC 309 The Big Picture

CSC 443: Web Programming

Kyle Rainville Littleton Coin Company

Contents. Demos folder: Demos\14-Ajax. 1. Overview of Ajax. 2. Using Ajax directly. 3. jquery and Ajax. 4. Consuming RESTful services

Basics of Web. First published on 3 July 2012 This is the 7 h Revised edition

Jquery Ajax Json Php Mysql Data Entry Example

EPHP a tool for learning the basics of PHP development. Nick Whitelegg School of Media Arts and Technology Southampton Solent University

AJAX. Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11. Sérgio Nunes

Table of Contents WWW. WWW history (2) WWW history (1) WWW history. Basic concepts. World Wide Web Aka The Internet. Client side.

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

Developer Internship Opportunity at I-CC

JavaServer Faces Technology, AJAX, and Portlets: It s Easy if You Know How!

JavaScript Programming

CS WEB TECHNOLOGY

Programming WebSockets. Sean Sullivan OSCON July 22, 2010

Full Stack boot camp

Modern Web Application Development. Sam Hogarth

This is CS50 CS164. Mobile Software Engineering

the web as it should be Martin Beeby

Actinium: A RESTful Runtime Container for Scriptable Internet of Things Applications

Human-Computer Interaction Design

CSC 615 FINAL EXAM SINGLE PAGE APPS. 1. Introduction

Developer s Manual Version 1

src1-malan/ajax/ajax1.html ajax1.html Gets stock quote from quote1.php via Ajax, displaying result with alert().

Developing a Web Server Platform with SAPI support for AJAX RPC using JSON

Security. CSC309 TA: Sukwon Oh

Programming the World Wide Web by Robert W. Sebesta

CSC 405 Computer Security. Web Security

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

Web Software Model CS 4640 Programming Languages for Web Applications

AJAX: Rich Internet Applications

User Interaction: jquery

CIS 408 Internet Computing (3-0-3)

Web UI. Survey of Front End Technologies. Web Challenges and Constraints. Desktop and mobile devices. Highly variable runtime environment

Now go to bash and type the command ls to list files. The unix command unzip <filename> unzips a file.

Web Architecture and Technologies

Financial. AngularJS. AngularJS.

Masters in Web Development

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

Session 11. Calling Servlets from Ajax. Lecture Objectives. Understand servlet response formats

webkitpony Documentation

Financial. AngularJS. AngularJS. Download Full Version :

JavaScript CS 4640 Programming Languages for Web Applications

Transcription:

Networking & The Web HCID 520 User Interface Software & Technology

Uniform Resource Locator (URL) http://info.cern.ch:80/ 1991 HTTP v0.9

Uniform Resource Locator (URL) http://info.cern.ch:80/ Scheme/Protocol 1991 HTTP v0.9

Uniform Resource Locator (URL) http://info.cern.ch:80/ Scheme/Protocol Host 1991 HTTP v0.9

Uniform Resource Locator (URL) Host http://info.cern.ch:80/ Scheme/Protocol Port 1991 HTTP v0.9

Uniform Resource Locator (URL) Host Path http://info.cern.ch:80/ Scheme/Protocol Port 1991 HTTP v0.9

1992 Line Mode Browser

http://home.cern/topics/birth-web 1993 WorldWideWeb, first graphical browser

https://en.wikipedia.org/wiki/mosaic_(web_browser) 1994 Mosaic, commercialized as Netscape

Server-Side Client-Side Route Request Process Data Build Response Send Response Web Server HTTP Request HTTP Response Web Browser Go to URL Get Response Render Page SQL Database

Request Response Headers Content

Server-Side Web Server Server Technologies Apache (basic server) Java Servlets PHP Ruby on Rails (Ruby) Django (Python) Web Node.js / JavaScript Browser and many others HTTP Request HTTP Response Client-Side SQL Database Databases MySQL Postgres SQLite MongoDB and many others

Server-Side Client-Side Web Server HTTP Request HTTP Response Web Browser SQL What about interactivity? Database

Server-Side Client-Side Web Server HTTP Request HTTP Response Web Browser SQL Database What about interactivity? In the early days, users could submit forms. The server would process the results and return a new page.

https://en.wikipedia.org/wiki/mosaic_(web_browser) 1994 Mosaic, commercialized as Netscape

Netscape Navigator Internet Explorer 1995 JavaScript created... in 10 days

Netscape Navigator Internet Explorer 1997 DHTML & Proprietary DOMs

Netscape Navigator Internet Explorer 2000 XMLHttpRequest

Netscape Navigator Internet Explorer 2001 Internet Explorer 6

Firefox Internet Explorer XMLHttpRequest standardized ("AJAX") Firefox released 2004

Firefox Chrome New Browser built on Webkit, V8, node Chrome released 2008

Server-Side Client-Side Route Request Process Data Build Response Send Response Web Server HTTP Request HTTP Response Web Browser Go to URL Get Response Render Page SQL (HTML, CSS, etc.) Database

Server-Side Client-Side Route Request Process Data Build Response Send Response Web Server HTTP Request HTTP Response Web Browser Go to URL Get Response Render Page SQL (HTML, CSS, etc.) Database

Server-Side Client-Side (XML/JSON) Route Request Process Data Build Response Send Response Web Server HTTP Request HTTP Response JavaScript Call Update UI (HTML) SQL (XML/JSON) Database

Server-Side Client-Side (XML/JSON) Route Request Process Data Build Response Send Response Web Server HTTP Request HTTP Response JavaScript Call Update UI (HTML) SQL (XML/JSON) Database

XMLHttpRequest (XHR) Server-Side Web Server Client-Side JavaScript Call UI (HTML) var xhr = new XMLHttpRequest(); Database

XMLHttpRequest (XHR) Server-Side Web Server HTTP Request Client-Side JavaScript Call UI (HTML) var xhr = new XMLHttpRequest(); Database // Make the request xhr.open("get", "//api.github.com/users/vega/repos", true); xhr.send(); HTTP Post Content "?sort=updated" URL HTTP Method "GET", "POST", "PUT", "DELETE", etc. Asynchronous? i.e., should execution wait for xhr.send().

XMLHttpRequest (XHR) var xhr = new XMLHttpRequest(); Server-Side Route Request Process Data Build Response Send Response Web Server SQL Database HTTP Request HTTP Response Client-Side JavaScript Call UI (HTML) // Handle the response xhr.onreadystatechange = function() { }; // Make the request xhr.open("get", "//api.github.com/users/vega/repos", true); xhr.send();

XMLHttpRequest (XHR) var xhr = new XMLHttpRequest(); Server-Side Route Request Process Data Build Response Send Response Web Server SQL Database HTTP Request HTTP Response Client-Side JavaScript Call UI (HTML) // Handle the response xhr.onreadystatechange = function() { if (xhr.readystate == 4 && xhr.status == 200) { } }; // Make the request xhr.open("get", "//api.github.com/users/vega/repos", true); xhr.send(); XHR operation complete. HTTP Status Code. 200 (OK)

XMLHttpRequest (XHR) var xhr = new XMLHttpRequest(); Server-Side Route Request Process Data Build Response Send Response Web Server SQL Database HTTP Request HTTP Response Client-Side JavaScript Call UI (HTML) // Handle the response xhr.onreadystatechange = function() { if (xhr.readystate == 4 && xhr.status == 200) { var response = JSON.parse(xhr.responseText); } }; // Make the request xhr.open("get", "//api.github.com/users/vega/repos", true); xhr.send();

XMLHttpRequest (XHR) Libraries to the rescue! E.g., jquery: $.get("url", function(text) { }); $.getjson("url", function(json) { }); $.post("url", data, function() { });

JavaScript Object Notation (JSON) Basic Types (Primitives) Boolean true false Number 0 1 5.6 0.3 String "hello" No Value null Advanced Types Object {"key": value} Array [value, value,...]

JavaScript Object Notation (JSON) [true, false, true, true, false] Array of booleans. [5, 0.491, 80, 29.41, 3.14159] Array of numbers. ["whiskey", "tango", "foxtrot"] Array of string.

JavaScript Object Notation (JSON) {"fruit": "apples", "amount": 2} Object with two keys and a string and number value. {"fruits": ["apples", "bananas"], "amount": 2} Object with an array and number value. [{"fruit": "apples"}, 4, true, null] Array of values.

What about interaction initiated by the server?

https://brigetteheffernan.wordpress.com/category/illustrations/

WebSockets var socket = new WebSocket("wss://echo.websocket.org"); New URL scheme for WebSockets. ws : http :: wss : https

WebSockets var socket = new WebSocket("wss://echo.websocket.org"); // Send a message to the server socket.onopen = function() { socket.send("hello"); }; Can be any JSON data types, including binary data (e.g., images).

WebSockets var socket = new WebSocket("wss://echo.websocket.org"); // Send a message to the server socket.onopen = function() { socket.send("hello"); }; // Receive messages from the server socket.onmessage = function(msg) { console.log(msg.data); };

WebSockets Libraries to the rescue (again!). E.g., socket.io: var socket = io(wss://echo.websocket.org"); socket.send("ant", mousex, mousey); socket.on("ant", function(mousex, mousey) { });