ali kamandi spring 2007 kamandi sharif edu sharif
play

Ali Kamandi Spring 2007 kamandi@sharif.edu Sharif University of - PowerPoint PPT Presentation

Ali Kamandi Spring 2007 kamandi@sharif.edu Sharif University of Technology HyperText Transfer Protocol Web Server Client Request Response Open a connection Make a request Server responds Listening via a port (80) Close


  1. Ali Kamandi Spring 2007 kamandi@sharif.edu Sharif University of Technology

  2. � HyperText Transfer Protocol Web Server Client Request Response � Open a connection � Make a request � Server responds Listening via a port (80) � Close connection 2 Internet Engineering-Sharif University of Technology

  3. � Stateless ◦ If you view 10 web page, your browser makes 10 independent HTTP request ◦ Restart web server? � Anonymous 3 Internet Engineering-Sharif University of Technology

  4. � User types www.yahoo.com into browser � Browser translates www.yahoo.com into an IP address and tries to open a TCP connection with port 80 of that address � Browser sends the following byte stream: ◦ Get / HTTP/1.0 � Yahoo responds with a set of headers indicating ◦ Which protocol is actually being used ◦ Whether or not the file requested was found ◦ How many bytes are contained in that file ◦ Kind of information (MIME: Multipurpose Internet Mail Extensions) 4 Internet Engineering-Sharif University of Technology

  5. � Yahoo’s server sends a blank line to indicate the end of the headers � Yahoo sends the contents of its index root � The TCP connection is closed 5 Internet Engineering-Sharif University of Technology

  6. 6 Internet Engineering-Sharif University of Technology

  7. � When the connection is over, it is over � Shopping at an e-commerce site (Amazon) ? � Engineering Challenge: Creating a stateful application on top of a fundamentally stateless protocol 7 Internet Engineering-Sharif University of Technology

  8. � Log file on the web server? ◦ HTTP is anonymous ◦ The server only knows IP address of client ◦ Proxy? � Rewriting hyperlinks ◦ Sending extra information back to the server ◦ http://www.amazon.com/exec/obidos/ASIN/1588750019 ◦ http://www.amazon.com/exec/obidos/ASIN/1588750019/103-9609966-7089404 ◦ All the hyperlinks contain, at the end, this same session ID. ◦ HTTP does not place a priori limit on the length of a URI � 255 byte limit, error 414: request-URI Too Long 8 Internet Engineering-Sharif University of Technology

  9. � Write some information out to an individual user that will be returned on that user’s next request � Server side connections can use it to both store and retrieve information on the client side. � Distributed database management system 9 Internet Engineering-Sharif University of Technology

  10. � Limit: 20 cookies, max 4 kb � Cookie information will be passed back up to server on every page load. ◦ Overhead: suppose 80 kb for 20 cookies + dialup connection � They aren’t portable for the user � Security (privacy problem): some users have disabled them ◦ Using unique identifier for the data rather than the data 10 Internet Engineering-Sharif University of Technology

  11. 11 Internet Engineering-Sharif University of Technology

  12. � DBMS � ACID test: ◦ Atomicity: all committed or all rolled back ◦ Consistency: DB is transformed from one valid state to another valid state. ◦ Isolation: the result of a transaction are invisible to other transactions until the transaction is complete. ◦ Durability: once committed, the result are permanent. 12 Internet Engineering-Sharif University of Technology

  13. � Declarative query language (SQL) � Isolation of important data from programmers mistakes � Good performance with many thousands of simultaneous users ◦ IBM DB2 ◦ Oracle ◦ Microsoft SQL server ◦ Open-source PostgreSQL 13 Internet Engineering-Sharif University of Technology

  14. � Develop a data model � Develop a collection of legal transactions: insert, update � Design the page flow ◦ How user interact with the system? � Implement the individual pages ◦ HTML ◦ ASP (Active Server Page) ◦ Java Server Page ◦ Servlet ◦ … 14 Internet Engineering-Sharif University of Technology

  15. � Hyper Text Markup Language � An HTML document is just a text document with some special directives, called tags, that a web browser understands. � Tags are those things in “angle-brackets”, like <HTML>, <HEAD>, etc. � HTML has no variables or commands. � HTML is merely a way of formatting a document. � Intended to be platform- and device-independent 15 Internet Engineering-Sharif University of Technology

  16. � Text with links to other documents � What’s the big deal? ◦ Links didn’t exist until the 1960’s and were novel well into the 1980’s ◦ Hypertext only existed on single computers or local area networks until about 1990 16 Internet Engineering-Sharif University of Technology

  17. � Markup languages have special elements that mark formatting or semantics � HTML An <emph>important</emph> concept � LaTeX An {\em important}concept 17 Internet Engineering-Sharif University of Technology

  18. � Nothing Special � Text Editors � FrontPage 18 Internet Engineering-Sharif University of Technology

  19. � Formatting is accomplished through the use of ‘tags’. <tag> � Many tags have a ‘begin’ tag and an ‘end’ tag. <TAG> Object the tag effects </TAG> � Examples: ◦ <html> … </html> <b> … </b> <p> <br> <a> … </a> <table> … </table> <font> … </font> 19 Internet Engineering-Sharif University of Technology

  20. � Some tags have key=value pairs known as attributes. These describe or modify what the tag is doing. � Examples: ◦ <a href=http://www.rpi.edu> … </a> ◦ <font color= “ blue ” > … </font> ◦ <tr align= “ center ” > … </tr> 20 Internet Engineering-Sharif University of Technology

  21. � Every page will contain the following: <HTML> <HEAD> <TITLE>My web page</TITLE> </HEAD> <BODY> Welcome to my web page! </BODY> </HTML> 21 Internet Engineering-Sharif University of Technology

  22. � Contains info about the document. Most common/important: title <head> <title>My HTML Document</title> </head> � “My HTML Document” will appear in title bar of Netscape, IE, Opera, etc… 22 Internet Engineering-Sharif University of Technology

  23. � Contains all text displayed in the web browser window. � <br> - line break � <p> - paragraph break (equivalent to 2 <br>s) � Appearance <B> makes text bold � <center>…</center> Center-align all contained text 23 Internet Engineering-Sharif University of Technology

  24. � <b> text to be rendered bold </b> � <B> text to be rendered bold </B> � <b> This would be displayed in the same way as the other two </b> � <i> text to be rendered in italics </i>

  25. <FONT SIZE=24 COLOR="CC3300" FACE=“Zar"> 25 Internet Engineering-Sharif University of Technology

  26. <html> <head> <title>HTML Basics</title> </head> <body> <p> </p> </body> </html> 26 Internet Engineering-Sharif University of Technology

  27. Heading 1 -- <H1> Heading 1 </H1> Heading 2 -- <H2> Heading 2 </H2> Heading 3 -- <H3> Heading 3 </H3> Heading 4 -- <H4> Heading 4 </H4> Heading 5 -- <H5> Heading 5 </H5> Heading 6 -- <h6> Heading 6 </H6> 27 Internet Engineering-Sharif University of Technology

  28. � <!-- your comment --> � Comments can be many lines long. 28 Internet Engineering-Sharif University of Technology

  29. <img src=“ name_of_image.gif ” / > <img src=“ images/image_name.gif ” / > Example: <IMG SRC="image.gif" BORDER=0> BORDER=0 BORDER=2 BORDER=5 29 Internet Engineering-Sharif University of Technology

  30. You should create a graphic link for users with slow modems or text-only web access by using the <ALT> option. Example: <img src=“pencil.gif" ALT=pencil graphic> pencil graphic 30 Internet Engineering-Sharif University of Technology

  31. � <a href=“URL”>Text to be used for the link</a> � Example: <A HREF="http://www.google.com">Google Search</A> | | | | Opening File to load when User can click on Closing Tag link is selected this text to pull Tag up the file

  32. <p>Relative File Path Link <a href=“.. /page2.html ”>Web Week</a> </p> 32 Internet Engineering-Sharif University of Technology

  33. <a href=“URL”> <img src=“image.gif” /> </a> 33 Internet Engineering-Sharif University of Technology

  34. � <table> … </table> ◦ contains entire table � <tr> … </tr> ◦ contains one row of a table � <td> … </td> ◦ contains one cell of a table � <th> … </th> ◦ contains a table column heading (this tag is optional in the sense that columns do not require column headings) 34 Internet Engineering-Sharif University of Technology

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend