COMP2405 Review Pat Morin COMP2405. 2 Outline Web technologies and types of applications – Web sites (HTTP, HTML, CSS, CRAP) – Server-side scripted (CGI,

Slides:



Advertisements
Similar presentations
JavaScript and AJAX Jonathan Foss University of Warwick
Advertisements

Today CSS HTML A project.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
1 Chapter 12 Working With Access 2000 on the Internet.
Dynamic Web Pages Bert Wachsmuth. Review  Internet, IP addresses, ports, client-server, http, smtp  HTML, XHTML, XML  Style Sheets, external, internal,
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 25 – Perl and CGI (Common Gateway Interface) Outline 25.1 Introduction 25.2 Perl 25.3 String Processing.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Webpage design for researchers Dr Jim Briggs 1.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
Cascading Style Sheets by Pavlovic Nenad by. Presentation Contents  What is CSS?  Why CSS?  Types of Style Sheets  Style Sheets Syntax  Box Formatting.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
CSE 190: Internet E-Commerce Lecture 5. Exam Material Lectures 1-4 (Presentation Tier) –3-tier architecture –HTML –Style sheets –Javascript –DOM –HTTP.
Chapter 8 Cookies And Security JavaScript, Third Edition.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
Tutorial 3 Adding and Formatting Text with CSS Styles.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
AJAX. Ajax  $.get  $.post  $.getJSON  $.ajax  json and xml  Looping over data results, success and error callbacks.
Dave Salinas. What is XML? XML stands for eXtensible Markup Language Markup language, like HTML HTML was designed to display data, whereas XML was designed.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 6.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Web Design Principles 5 th Edition Chapter 3 Writing HTML for the Modern Web.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
National College of Science & Information Technology.
Extensible Markup Language (XML) Pat Morin COMP 2405.
The Common Gateway Interface (CGI) Pat Morin COMP2405.
Introduction to AJAX Pat Morin COMP Outline What is AJAX? – History – Uses – Pros and Cons An XML HTTP Transaction – Creating an XMLHTTPRequest.
Web Development. Agenda Web History Network Architecture Types of Server The languages of the web Protocols API 2.
Working with Cascading Style Sheets
DHTML.
Project 1 Introduction to HTML.
Unit 4 Representing Web Data: XML
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Project 1 Introduction to HTML.
Mid-Term Review Pat Morin COMP 2405.
4. Javascript Pemrograman Web I Program Studi Teknik Informatika
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Chapter 7 Representing Web Data: XML
Introduction to CGI and ajax
Styles and the Box Model
Chapter 27 WWW and HTTP.
DynamicHTML Cascading Style Sheet Internet Technology.
HTML5 Level I Session I Chapter 1 - Introduction to Web Development
PHP.
Static and Dynamic Web Pages
DynamicHTML Cascading Style Sheet Internet Technology.
HTML5 and Local Storage.
Lesson 2: HTML5 Coding.
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Web Programming and Design
Web Programming and Design
Presentation transcript:

COMP2405 Review Pat Morin COMP2405

2 Outline Web technologies and types of applications – Web sites (HTTP, HTML, CSS, CRAP) – Server-side scripted (CGI, Perl, and PHP) – Client-side scripted (JavaScript, HTML DOM) – Both-side scripted (AJAX, XML, XMLHTTPRequest) Other topics – History of the Internet – Cookies – HTTPS – JavaScript security

3 History of the Internet Internet timeline – 1970s until today – 1990s: The web The Internet != The Web Key players – Licklider, Roberts, Kleinrock, Fahlman, Morris, Berners-Lee

4 HTTP Basic HTTP transaction (4 steps) HTTP methods – GET, HEAD, PUT, POST HTTP response codes (200, 404, 405) HTTP Fields – Content-type – Content-length – Host clientserver open reply close request

5 HTML: The Hypertext Markup Language History – Tim Berner-Lee and Robert Caillau at CERN ( ) – Web launched in 1991 Structure of an HTML Document – DOCTYPE, HEAD, BODY Logical versus Physical (Visual) Markup – Use HTML to describe logical structure of document Tags – Paragraphs, headings, forms, lists, tables, hyperlinks, targets, forms, form elements

6 CRAP: The Principles of Graphic Design Contrast – When two elements are not exactly the same, they should be very different Repetition – Styles and visual elements should be repeated across a page and across a web site Alignment – Our minds like things to be lined-up and evenly spaced Proximity – Proximity (closeness and distance) can be used to group related items together and separate unrelated items Be able to identify and fix graphic design problems

7 CSS: Cascading Style Sheets Advantages and disadvantages of CSS – Separating formatting from writing CSS Properties – Font and text properties, list properties CSS naming rules – class, id, and hierarchical naming CSS pseudo-elements – a:link, a:visited, a:hover, :before, :after and the content property CSS Units – Color, length

8 Layout with CSS The display property – block – P, H1, H2, UL, PRE, DIV – inline – A, EM, CODE, SPAN The CSS box model – margin, border, padding, content Layout properties – position – static, relative, or absolute – width, left, top, right, bottom Be able to recognize a layout from a CSS snippet Formatting lists

9 CGI: The Common Gateway Interface Specifies the interface between a web server and an application that serves web pages Use of environment variables and stdin – QUERY_STRING – Differences between GET and POST Output format – Content-length\n\ndata CGI and security – Client data can not be trusted – Be able to identify insecure code in CGI scripts

10 Perl: Practical Extraction and Report Language Literals – Strings – single quoted, double-quoted, and heredocs – Numbers Scalar variables - $ Arrays Hashes - % Contexts – array to scalar conversion

11 Perl (Cont'd) Subroutines – Definining a subroutine (with prototypes) – Calling a subroutine References – Taking a reference \ – Dereferencing {} – Anonymous references {} (hash) and [] (array) Regular expressions – Operators * + ? {} [] () – Special characters. ^ $ – Return values – scalar or array – Substitutions s/pattern/replacement/

12 JavaScript Data types – Numbers, strings, arrays, and objects Undefined is very well-defined Variables and constants – The var keyword and const keyword

13 JavaScript Functions Defined using the function keyword Can be anonymous – var f = function () {... } Very flexible – Can have a variable number of arguments accessed by the arguments variable – Can be called with more or fewer than the declared number of arguments

14 JavaScript Objects Object properties (instance variables) are accessed using the. or the [] operator Object syntax is very loose – Can add properties at any time simply by assigning to them Objects are created by calling the new operator on a constructor function – Constructor function modifies the object by accessing the this variable

15 JavaScript Advanced Getters and setters – Functions that look like properties Operators – delete, typeof, in, void, instanceof Class prototypes Using JavaScript to emulate Java – objects – instance variables – methods – private variables – inheritance Exception handling

16 The HTML DOM The HTML Document Object Model specifies a mapping between parts of a document and objects

17 HTML DOM: The Document Object Model A document is represented by a document tree – This is the parse tree of the document Accessed by the global document object – getElementById, getElementsByName, getElementsByTagName A tree node n has children and can be modified – n.childNodes, n.appendChild(), n.removeChild(), n.insertBefore() Difference between text nodes and other nodes – n.nodeValue is either the text of the node or the tag name

18 HTML DOM Example

19 Basic XML Basic XML is just like HTML but you can create your own tag names All documents have a root element All tags must be closed Tove Jani Reminder Don't forget me this weekend!

20 Advanced XML XML is in a rapid state of development XML Document Type Definitions (DTD) specify the format of a valid XML document of a specific type XML can be formatted with CSS XHTML is an XML version of HTML In the future – XML Schemas will replace DTD – XSLT will replace formatting of XML with CSS

21 AJAX: Asynchronous JavaScript and XML AJAX combines server-side and client-side scripting Underpinned by the XMLHTTPRequest – Client sends asynchronous request to server CGI script – Server replies with XML AJAX can be used to implement applications that interact with (save, store, retrieve, query) data on the server AJAX transactions take place without a page reload

22 AJAX Template function sendRequest() { var xmlHttp = GetXmlHttpObject(); if (!xmlHttp) { return false; } xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4) { var xmlDoc = xmlHttp.responseXML.documentElement; } var requestURI = xmlURI; xmlHttp.open("GET", requestURI, true); xmlHttp.send(null); }

23 AJAX Summary AJAX combines everything – Part of an HTML page – Requires a CGI script on the server (can be written in Perl) – Requires JavaScript on the web page (client) – Sends an HTTP request and receives XML as the response text – The XML becomes a DOM document And it can be used to make very cool web applications

24 Other Topics Cookies – A small piece of data stored by the server on the client – Main application: keeping track of a user over several pages or visits (sessions) File upload – Done using an HTTP POST method HTTPS – An encapsulation of HTTP inside a cryptographically secure protocol – Uses public key encryption and symmetric encryption – Relies on the proper use of certificates – Prevents eavesdropping and man-in-the-middle attacks

25 JavaScript Security The same origin policy – JavaScript (should) only have access to information originating from the same origin as the current document JavaScript exploits – Popups – Chromeless windows – Cross-site scripting (also requires poorly-written CGI script) – Javascript port scanning

26 The Law Intellectual property – Trade secrets – Copyright – Trademarks – Patents – Industrial designs Privacy law – PIPEDA (federal) – FIPPA (provincial) – A web application may be under several privacy laws

27 Summary Exam Breakdown – 40% Pre mid-term material (HTML, CSS, CRAP, CGI, Perl) – 60% Post mid-term (Perl, JavaScript, AJAX, XML, DOM, Other) Same format as mid-term, but longer Study advice (beyond knowing the material) – Review these and all class notes just before the exam

28 What To Leave With What you should take out of this course – You now know how even the most sophisticated web applications work, from top to bottom – You now know something about security, vulnerabilities, and hacking – You will see regular expressions again