1 / 31

Chapter 16

Chapter 16. The World Wide Web. Chapter Goals. Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several specific HTML tags and their purposes Write basic HTML documents. Chapter Goals.

Download Presentation

Chapter 16

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 16 The World Wide Web

  2. Chapter Goals • Compare and contrast the Internet and the World Wide Web • Describe general Web processing • Describe several specific HTML tags and their purposes • Write basic HTML documents

  3. Chapter Goals • Describe the processing of Java applets and Java server pages • Compare and contrast HTML and XML

  4. The World Wide Web • The Web The network of computers supporting HTML protocol • Client machines running browser SW • Server machines running web server SW • Web page A multimedia document stored on a web server and distributed to a client • Link A connection between one web page and another that can be used to “move around” as desired

  5. The World Wide Web • Website A collection of related web pages • The Internet makes communication possible • The Web makes communication easy

  6. Web Machines • Client/server model Figure 15.1 Client/Server interaction

  7. The Web is Stateless • After a page is served to a client, the server forgets who you are • A mechanism is needed to remember “state” information • One mechanism is a “Cookie” • There are other mechanisms also

  8. Cookies • Cookie A small text file that a web server stores on your local computer’s hard disk • A cookie contains information about your visit to the site • Cookies can be used • to determine number of unique visitors to the site • to customize the site for your future visits • to implement shopping carts that can be maintained from visit to visit

  9. Web Browser • Browser A software tool that issues the request for the web page we want and displays it when it arrives • User requests an HTML webpage from another computer (the web server) • The web server responds by sending an HTML document back to the user’s computer

  10. Web Server • Web serverThe computer that is set up to respond to web requests • Web address The core part of a Uniform Resource Locator, or URL, which uniquely identifies the page you want. Example: http://www.flc.losrios.edu/~ross/CISC310InPersonBasicInfo.htm

  11. Web Browser Figure 16.2 A browser retrieving a Web page

  12. HTML • Web pages are created (or built) using a language called the Hypertext Markup Language, or HTML • The term Markup Language comes from printing industry, where it is used to define the format of a document using tags • Hypertext refers to the links

  13. Mark-Up Figure 16.2A marked-up document

  14. Cooked HTML Figure 16.3The Student Dynamics Web page as displayed in Netscape Navigator

  15. Raw HTML Figure 16.4The HTML document defining the Student Dynamics Web page

  16. HTML Tags • Tags are enclosed in angle brackets (<. . . >) • Tags are often used in pairs, with a start tag such as <BODY> and a corresponding end tag with a / before the element name, such as </BODY>

  17. Basic HTML Formatting • The paragraph tags (<P> . . . </P>) • The center tags (<CENTER> . . . </CENTER>)

  18. Basic HTML Formatting • The B, I, and U elements for bold, italic, or underlined • The <HR> tag inserts a horizontal rule (a line) across the page

  19. Images and Links • Image Tags • Downloads and image file and displays it • <IMG SRC = "myPicture.gif">

  20. Images and Links (cont.) • A link or “anchor” • HREF tag specifies the URL of the destination document. For example <A HREF = "http://duke.csc.villanova.edu/docs/"> Documentation Central!</A>

  21. Static Web Pages • When HTML was first developed, there was no way to interact with the information and pictures presented in a web page • The page did not change, it was static

  22. Interactive Web Pages • Code must run somewhere to provide a dynamic webpage • There are three main ways to do this • Client side scripting (Javascript) • Client side applets (ActiveX, Java Applets) • Server side scripting

  23. Client Side JavaScript • Code can be embedded in the HTML, then, interpreted and executed by the browser • This allows the page to change as the user interacts with it. • Example: WebPages with menus

  24. Java Applets • Java applet A program that is designed to be embedded into an HTML document and transferred over the Web to someone who wants to run the program An applet is embedded into an HTML document using the APPLET tag <APPLET code="MyApplet.class" width=250 height=150 ></APPLET>

  25. Java Applets • Java applet programs are compiled into Bytecode, a low-level representation of a program that is not the machine code for any particular type of CPU • Java applets have more powerful processing than scripts • Example: Animations • http://www.cs.jhu.edu/~goodrich/dsa/trees/avltree.html

  26. Server Side Scripts • Code can be embedded in the HTML, but processed on the server, then removed before the final HTML page is sent. • This allows customized pages to be created. • Example: a Google search result page

  27. Server Side Scripts • A JSP scriptlet is encased in special tags beginning with <% and ending with %> Page 488

  28. Server Side Scripts • Note that JSPs are executed on the server side where the web page resides • By the time it arrives at your computer, all active processing has taken place, producing a static (though dynamically created) web page • JSPs are particularly good for coordinating the interaction between a web page and an underlying database

  29. XML • HTML has predefined tags and each tag has its own meaning • Most of HTML tags are concerned with formatting. • There is nothing about HTML tags that describes the true content of a document

  30. XML • The Extensible Markup Language, or XML, allows the creator of a document to describe its contents by defining his or her own set of tags • XML allows new data types to be defined from existing data types

  31. XML • Like HTML, an XML document is made up of tagged data Figure 16.5 An XLML document containing data about books

More Related