CSE 190: Internet E-Commerce Lecture 5. Exam: 3-Tier Architecture What are the three tiers? –Presentation, application, and data tier Presentation: responsible.

Slides:



Advertisements
Similar presentations
CSE 190: Internet E-Commerce Lecture 2. HTML Basics: HTML, URL, Frames, Forms References: L/intro.html
Advertisements

TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
PHP for Forms HTML Forms are used to select different kinds of user input. Make your form using your favourite tool Set the form action attribute to –
CSE 190: Internet E-Commerce Exam 2 Sample Questions.
IST 535 Week 1 Class Orientation / Review of Web Basics.
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
CSE 190: Internet Commerce Lecture 4: Web Servers.
CSE 190: Internet E-Commerce Lecture 8. Application Tier Architecture Model View Controller pattern Model 2 architecture Statelessness of application.
Definitions, Definitions, Definitions Lead to Understanding.
Introduction to Web Interface Technology (CSE2030)
CP476 Internet Computing Browser and Web Server 1 Web Browsers A client software program that allows you to access and view Web pages on the Internet –Examples.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
Hypertext Transport Protocol CS Dick Steflik.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Introduction to Web Programming Fall 2014/2015 Some slides are based upon Web Technologies course slides, HUJI, 2009 Extended System Programming Laboratory.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
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.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
FTP (File Transfer Protocol) & Telnet
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
ASP.NET Web Development 1 Web Technology Basics. Browser and server roles Static (stateless) web pages Web Technology Basics #2.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
CSE 190: Internet E-Commerce Lecture 5. Exam Material Lectures 1-4 (Presentation Tier) –3-tier architecture –HTML –Style sheets –Javascript –DOM –HTTP.
Form Tag How to use Form Tag Something NEW ? PARAMETER Attribute NAME Specifies the name for a form To specify which form to submit with JavaScript, this.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
IS1825: Developing Multimedia Applications for Business Lecture 1: Introduction to CSS Rob Gleasure
1 Welcome to CSC 301 Web Programming Charles Frank.
HTML Basics BCIS 3680 Enterprise Programming. Web Client/Server Architecture 2  Your browser (the client) requests a Web page from a remote computer.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
Web Development 101 Presented by John Valance
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
WEB SERVER Mark Kimmet Shana Blair. The Project Web Server Application  Receives request for web pages or images from a client browser via the internet.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Cascading Style Sheets
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Overview of Servlets and JSP
How to… Cascading Style Sheets. How to Insert a Style Sheet When a browser reads a style sheet, it will format the document according to it. There are.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
MIIS1 MIIS - 17 Introduction to the WWW & http * * http information from World Wide Web Programming with HTML & CGI by Ed Tittel, Mark Gaither, S. Hassinger,
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Web Systems & Technologies
Tiny http client and server
WWW and HTTP King Fahd University of Petroleum & Minerals
HTTP – An overview.
Web Development Web Servers.
How does it work ?.
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Presentation transcript:

CSE 190: Internet E-Commerce Lecture 5

Exam: 3-Tier Architecture What are the three tiers? –Presentation, application, and data tier Presentation: responsible for generating HTML for the user interface Application: Executing the logic of the site (ordering a book, bidding on an auction, logging in a user) Data tier: Storing all of the persistent data for a user Presentation: purpose of –Firewall Forbids all TCP/IP traffic from entering or exiting the site’s network, unless it is an allowed service. E.g. allow only incoming HTTP requests, no FTP, telnet, SMTP. –Cache Stores commonly access pages (e.g. home page) in faster memory to improve performance –Load balancing server Distributes requests in round-robin fashion (or based upon machine load) to an array of servers –Web server –How to recover from failure? Application Tier –How to recover from failure? The load balancer recognizes that the machine is down and routes requests to a valid application server. Because all state is stored in the data tier, no data is lost when an app server crashes. Data Tier –Why can’t this be combined with application tier?

Exam: HTML Purpose; difference with other doc formats Structure of an HTML document General tag syntax – … Familiar with tags: html, head, body, H#, A, UL, OL, form, input, table, tr, td, br, img, center, frame, script – Components of URL URL encoding ( url?arg1=ab+cd&arg2=ef%20 ) Difference between relative and absolute URL –Relative URLs specify a document relative to the document that contains the URL. E.g. /home/index.html. –Absolute URLs specify a document without any need for context. They specify the complete protocol, domain, and filename. E.g.

Exam: Stylesheets Purpose What is meant by cascading? –More than one stylesheet may be applied at the same time to render a document. The more specific a style takes precedence over less specific styles. For example, inline styles precede internal styles which precede external styles which precede browser stylesheets. General CSS syntax –selector { property: value; } –Example: h1, h2, h3 { text-align: center; } Applying style to: –All tags of type X H1 example: H1 { color: red; margin-left: 20px; } –All elements of class X All elements of class X:.x { font-size: 18pt; } Specify an external stylesheet, internal stylesheet, and inline style –External: –Internal: ….. …. …. –Inline:

Exam: Javascript Purpose How to include in a page Writing text to HTML page Declaring variables –var greeting = “Welcome !” Declaring functions –function foo() { alert( “Foo Fighter” ); } Returning a value –function isEven(x) { return( x % 2 == 0 ); } Displaying an alert When the script executes

Exam: HTTP Status codes, classes of Purpose of: GET, POST, HEAD –HEAD does the same as GET, but without sending the response body. –GET is used for idempotent transactions, i.e. operations which leave the server state unchanged. POST is used for those which alter server state, such as logging in or buying an item. Idempotent: In arithmetic, multiplication by one is idempotent. For a server, GET applied to server-state yields the same server-state. But POST applied to server-state yields new-server- state. Syntax of: GET, POST –POST /cgi-bin/login.pl HTTP/1.0 Content-Length: 10 user=harry Request fields: Host, Content-Length –GET /home.asp HTTP/1.0 Host: –The host field allows multiple domains to be served by the same web server. It is a required field for all HTTP/1.1 clients to send. –Content-Length: Used by POST to indicate how many bytes are in the body of a POST request Response fields: Content-Type –Content-Type indicates the MIME type of a document, so the browser knows how to handle the response body. Examples include: text/html, text/plain, image/gif, image/jpeg, video/asf.

Exam: Web Servers Purpose of Apache multi-client model Apache configuration: Purpose of –Port Indicates what TCP/IP port the server is listening to. The default for HTTP is 80. –DocumentRoot Where to find the root document for a web site and its subdirectories and files. Usually: apache_install_directory/htdocs/ –ServerName Name of the machine where the web server is running –User HTTP authentication SSL Virtual Hosts CGI

Example Exam Questions (2 pts) Draw & explain the relationship between a load balancer and a cluster of web servers. (3 pts) Show the URL that represents a GET request for domain ucsd.edu and document /student/ski/home.asp with two arguments, task with value open and the second shibboleth with “ali baba” (no quotes). – (3 pts) Explain two advantages of stylesheets over plain HTML. Write an HTML file that applies an internal style to all DIV tags such that the attribute font-size is 18. – DIV { font-size: 18pt; } Look below This will be in 18pt

Example Exam (cot’d) (3 pts) Write an HTML page that contains a form taking username and password and submits it to ucsd.edu/form.cgi using HTTPS. Onlookers may not view the password. –… Enter your username: Enter your password: (3 pts) Write HTML code that uses Javascript to write “Hello World!” to the browser window. –… document.write( “Hello World!” ); (2 pts) Write a Javascript function that takes two numbers and returns their sum. (2 pts) Using Javascript to access the DOM, access the second form on the page and assign it to a variable. Username: var myform = document.forms[ 1 ]; // Show the HTML making up the form alert( "My form looks like this: " + myform.innerHTML );

Example Exam (cot’d) (3 pts) Show an HTTP/1.0 client send a request for a document hello.gif from an HTTP 1.1 server. Show both request and response headers. Indicate when the connection closes. –GET /hello.gif HTTP/1.0 HTTP/ OK Content-Type: image/gif Content-Length: 1018 GIF87aFDSU)(&#$)(&%(*$&)&#$%)…. Connection closed by server (2 pts) What is the purpose of DocumentRoot in Apache’s configuration file (httpd.conf)? (2 pts) What happens to your web server if a hostile user crashes a child process? How does the parent recover? Are pages still served? –Pages are still served. The other children process may still respond to user requests. The parent notices that the child has terminated by polling periodically. When the number of children falls below a threshold, it creates a new child process to handle requests. Since the parent never handles requests itself, delegating that task to its children, the parent rarely crashes. This leads to a more robust web server.