Creating Web Documents: How the Web works

Download Report

Transcript Creating Web Documents: How the Web works

Creating Web Documents: How
the Web works
Client / Server
Protocols
Access methods
Homework: Complete experiment & report
on Discussion Forum
How the web works
• Client/server: server, holding information receives
requests from client (you/your browser). Typical
request is for a file
• Protocols = rules to be followed by different
computer programs. Many protocols are involved.
– Transmission Control Protocol/Internet Protocol
controls transmission of packets (files divided into
smaller pieces) and routing to the address. Uniform
Resource Locator indicates which protocol (e.g.,
http://, ftp, mailto) and which server address (domain
name possibly followed by directories & file names
– Route of packets can vary, so transmission needs to be
reassembled at each end.
tracert
• Route from one point to another can be many
steps and can vary.
• This redundancy is basic characteristic of the Web
• On Windows machine, click on Start/Run/ to get
command prompt: type in command if not present
• After > type in tracert URL
>tracert www.nytimes.com
How the web works, cont.
• Hypertext Transfer Protocol
–
–
–
–
Client opens the connection, at URL and at port
Client makes a request
Server sends response
Connection closed
• An HTML file with 2 images requires 3
connections. No information kept between
connections = stateless system
cache
• More complex
• Files are stored in what is called the cache.
– Maybe local cache and network cache.
• Browser 'looks around' to see if there is already a
copy of the file requested.
• May send a message to check on time to see if this
file has been updated.
• Generally works BUT sometimes, you may need
to exit and re-invoke browser or even clear out
cache to get latest version.
Server side programming
• Programs (scripts) run on server to handle databases, files,
other computations.
• Use common gateway interface (cgi).
– You may read about cgi/perl programs
• New[er] middleware systems: asp, php, cold fusion
– Topic of Creating Databases for Web Applications course.
• When server gets request for a file of type pl, php, asp, cf,
it executes the file instead of returning it as is to the
browser.
• These programs create HTML file dynamically, possibly
using information stored on server.
Connections
• Dial-up phone service. A modem changes the computer
(digital signal) to electronic and a modem at other end
changes electronic back to digital.
Faster connections are referred to as broadband
• DSL (digital subscriber line) a technology that exploits
unused frequencies on copper telephone lines to transmit
traffic typically at multi-megabit speeds. DSL can allow
voice and high-speed data to be sent simultaneously over
the same line. Because the service is 'always available,'
end-users don't need to dial in or wait for call set-up.
• Cable modem: uses the cable line.
Browser
•
•
•
•
Interprets the HTML document
Displays the text
Tags set up action for what is between the tags
Image files and other media are displayed by
browser itself or by call to a helper/plugin
program
• The a tag (and tags for forms) set up new requests
to servers.
Other browsers
• Personal Digital Assistants (PDAs) and cell phones have
special and distinct browsers.
• Wireless Application Protocol (WAP) enabled phones are
an example. These browsers work with slower
connections, less storage space.
• Also refer to WAP enabled sites: sites specialized for use
by WAP phones. Use Wireless Markup Language and
Wmlscript.
– One of several topics in Creating User Interfaces.
• IF YOU HAVE such a phone, use it for the experiment!
Uploading projects to our web
site
• File management
– Multiple files for ‘web page’
– For now, keep each project in one directory
– Make name of main HTML file (probably only
have one) index.html
– Keep names simple: lower case, no spaces
• Critical if server operating system not the one you
are using for development
• Ws-ftp (file transfer protocol)
The <a href….>
• Link to (external) web site
href=http://.....
• Link to html file on same server, same folder
href="filename.html"
• Link to html file on same server, in parent folder
href="../filename.html"
• Link to place in same file
href="#place"
<a name="place">
Assignment
• Pick 2-3 Web sites and view them in different
ways (PC vs Mac vs cell phone vs WebTV, IE vs
Netscape vs Opera vs AOL, Campus network
(Ethernet to shared T1) vs business network
(network to T1/T3) vs phone modem vs DSL vs
cable modem, ???)
• Report on experience to appropriate Forum on
CourseInfo. Comment on layout, colors, speed,
anything else.