DNS – HTTP – DHTML - CSS by ntz11397

VIEWS: 0 PAGES: 22

									DNS – HTTP – DHTML - CSS

       ICW Lecture 5
       Hasan Qunoo
    DNS - Domain Name System




School of Computer Science     .uk
The University of Birmingham   .ac
Edgbaston                      .bham
Birmingham                     .cs
B15 2TT                        www
United Kingdom
     DNS - Domain Name System
• Everyone has used a DNS.
• The DNS system forms one of the largest and most
  active distributed databases on the planet.
• a hierarchical, domain-based naming scheme and a
  distributed database system for implementing this
  naming scheme.
• Every machine on the Internet has its own IP address.
  Some static and some dynamic.
• An IP address is all that you need to talk to a server.
• Domain names are strictly a human convenience.
   DNS - Domain Name System
• The DNS system is a database
• It translates symbolic hostnames into the numerical
  IP addresses.
Example:
www.cs.bham.ac.uk  147.188.192.42
www.bham.ac.uk          147.188.125.57
www.google.com          74.125.43.105
• A single URL can be resolved into more than one
  IP. (Why?)
         DNS- How does it work?
When a request comes in:
• DNS can answer the request with an IP address because it already knows
  the IP address for the domain.
• DNS can contact another name server and try to find the IP address for
  the name requested. It may have to do this multiple times.
• DNS can say, "I don't know the IP address for the domain you
  requested, but here's the IP address for a name server that knows more
  than I do."
• DNS can return an error message because the requested domain name is
  invalid or does not exist.
         DNS- Applet
Applet
    Game Time - Some Tools
• nslookup

• dig

• host
 HTTP- Hypertext Transfer Protocol

• HTTP is an application-level protocol
• HTTP is used to transfer data on the
  Web.
• HTTP led to the establishment of
  the World Wide Web in 1990 by English
  physicist Tim Berners-Lee.
How does HTTP work?
         Request methods
• GET
 • Requests a file from the server.
• POST
 • Submits data to be processed (e.g., from
   an HTML form) to the identified resource.
• HEAD
 • Same as GET without the body.
     Request methods (Cont.)

•   TRACE
•   DELETE
•   PUT
•   OPTIONS
•   CONNECT
         Tools


• wget
  HTML - Hyper Text Markup Language




How can you help the Editor edit the newspaper?
                 HTML
- Practical Example:
  - Start an editor.
  - Simple HTML (Header, Body).
  - Start adding components (Image,
    Headings, Form)
  - Design a form response page.
              XHTML/HTML
• XHTML is a stricter and cleaner version of HTML:
   • XHTML Elements Must Be Properly Nested.
     <b><i>This text is bold and italic</i></b>
   • XHTML Elements Must Always Be Closed.
     <p>This is a paragraph</p>
     <p>This is another paragraph</p>
   • Empty Elements Must Also Be Closed
      A break: <br />
   • XHTML Elements Must Be In Lower Case:
      <body><p>This is a paragraph</p></body>
   • XHTML Documents Must Have One Root Element
     All XHTML elements must be nested within the
     <html> root element.
                                     The List Goes On...
                 CSS
• HTML was never intended to contain
  tags for formatting a document.
• Imagin you have to edit every HTML
  page every time you want to change the
  style. NIGHTMARE!
• Do not worry CSS to the rescue.
                       CSS
The CSS syntax:
  selector {property:value}
Example:
  p {font-family:"sans serif"}
You can also group selectors:
  h1,h2,h3,h4,h5,h6 { color:green}
You can select by Class:
h1.center{text-align:center}
<h1 class="center">
This heading will be center-aligned
</h1>
Comments: /*This is a comment*/
                Example
- Practical Example:
  - Start an editor.
  - Create a css file.
  - Add simple modifications to the style.
  - Modify the HTML file.
  - Style the HTML form from previous
    example.
  - Display the file on the browser.
                Resources
• HTML, XHTML and CSS tutorials:
  • http://www.w3schools.com
• Web Standards
  • http://www.w3.org/
• Validations
  • http://validator.w3.org/
• Free CSS Templates:
  • http://www.csszengarden.com/
                    Resources
• List of all the css properties:
   • http://htmlhelp.com/reference/css/all-properties.html
• Domain Name Service DNS
   • Computer Networks, Fourth Edition By
     Andrew S. Tanenbaum Chapter 7
• HTTP Protocol RFCs
   • http://www.w3.org/Protocols/
• Free CSS Templates:
   • http://www.csszengarden.com/
                   Exercise
• Using    nslookup,       host       and      dig
  Commands, find the IP addresses for the following
  URLs:
   • www.bham.ac.uk
   • www.google.co.uk
   • www.cs.bham.ac.uk
   • www.w3school.com
• The first 5 students to send me the correct
  commands and their output will get a prize
  each.
              Conclusion
• There are many types of technologies which
  are used to support the world wide web and
  more are being developed all the time.


• There are many resources to learn
  more about each of these Technologies.

• Designing web pages is fun.

								
To top