Docstoc

CIS

Document Sample
CIS Powered By Docstoc
					World Wide Web Development


     The World Wide Web




                             CIS
                                 Various Views


• In which we consider the evolution of the web in various ways:
   •   what pages are
   •   what they contain
   •   how they are presented
   •   how they are styled
   •   how they are syndicated
   •   how they react
   •   how they are delivered




                                                                   2
                               History


• First, a bit of history.
• The World Wide Web was invented in approximately 1989 by Tim
  Berners-Lee.
• In 1990 he released the first web browser, called, appropriately
  enough, WorldWideWeb. Later it was renamed Nexus, and
  originally ran on a NeXT computer.
• The main aim, at the time, was to use it to share information at
  CERN, the European Laboratory for Particle Physics.




                                                                     3
       History




The first web browser

                        4
                              History


• ―In 1989 one of the main objectives of the WWW was to be a
  space for sharing information. It seemed evident that it should be
  a space in which anyone could be creative, to which anyone could
  contribute. The first browser was actually a browser/editor, which
  allowed one to edit any page, and save it back to the web if one
  had access rights.‖ (Berners-Lee, 2005)




                                                                   5
                               History


• The key feature of the first web browser was hypertext - it allowed
  text in one document to link to another document.
• While it had existed before, (most notably in Apple’s Hypercard
  system), it was well implemented in early browsers, and is still the
  key feature today.




                                                                        6
                          History: Compatibility


•   One of the major issues facing Berners-Lee was making
    browsers work on as many different operating systems as
    possible.
•   This isn’t surprising - at the time there were a variety of operating
    systems to cater for, and physicists tend to use the operating
    system that they are most comfortable with.
•   Three factors made this possible:
    1. Other browsers were rapidly developed.
    2. HTTP (HyperText Transfer Protocol) proved to be fast and platform
       independent.
    3. HTML (HyperText Mark-up Language) only provided minimal instructions
       on how to display pages, leaving most decisions to the browser.

                                                                              7
                               HTML


• It was that last point that matters here: HTML was designed to
  provide only minimal instructions as to how a page should be
  presented.
• Thus different browsers could make their own decisions on how to
  implement these instructions depending on what the computer
  was capable of.
• It is much harder (as we’ll see) to make more complex and
  specific instructions work exactly the same way on every browser
  and every operating system.




                                                                     8
                                    HTML


• The basic theory behind HTML is simple. If you take an existing
  string of text:
   This is a series of words. They should be laid out neatly, in two paragraphs,
     with bold and italics.
• The browser needs to be informed how to lay it out. When is the
  paragraph supposed to start? What is in bold? What is in italics?
• That’s where instructions come in.
• But there’s a problem: the only information that can be transmitted
  is text. How can the browser tell the difference between an
  instruction and text to display?


                                                                                   9
                               HTML


• The answer is to use tags.
• Tags are instructions contained within < >. Every time the browser
  sees those two symbols, it assumes that whatever lies between is
  an instruction.
• And anything not within those symbols is therefore assumed to be
  normal text that should be displayed.
• Note that if you want to display those symbols you’re in trouble,
  but there are ways around it.




                                                                      10
                               HTML


• The problems aren’t over. Not only do you need to say ―start
  doing this‖, but sometimes you also need to say ―stop doing this‖.
• For example, you want an instruction that says ―make this bold‖,
  but you’ll also need a second one to say ―stop making this bold‖.
• The solution was to use a forward slash:
   <>        is a start tag
   </ >      is a stop (end) tag
• For example:
   <b>       says ―start making the text bold‖
   </b>      says ―stop making the text bold‖

                                                                       11
                             SGML


• Both concepts come from another ―markup language‖ - the
  Standard Generalised Markup Language (SGML) which Berners-
  Lee had previously been exposed to.
• SGML was developed in the 1960’s, and used tags to provide
  instructions.
• HTML was very similar to SGML: however, it wasn’t quite as
  rigorous, and therefore early versions weren’t compatible.




                                                               12
                          HTML: Basic Tags


• Some of the most basic HTML tags are:
   <html></html>     Encompasses all text containing other HTML tags.
   <head></head>     Information about the page, such as author, title and date
                     it was created.
   <body></body>     The content to be displayed.
   <p></p>           Start and end of a paragraph.
   <b></b>           Bold text
   <i></i>           Italics
   <a href=―‖></a>   An anchor tag. The ―href‖ is used to specify what page to
                     link to.




                                                                              13
                             HTML: Basic Tags


• Putting it together, we get:
   <html><body><p>This is a series of words.</p><p>They should be laid out
     neatly, in two paragraphs, with <b>bold</b> and
     <i>italics</i>.</p></body></html>
• Which would appear in a browser as:
   This is a series of words.
   They should be laid out neatly, in two paragraphs, with bold and italics.




                                                                               14
                               HTML: Layout


• To make things easier, HTML doesn’t care about extra
  whitespace. Thus the same information can be presented as:
   <html>
   <body>
   <p>This is a series of words.</p>

   <p>They should be laid out neatly, in two paragraphs, with <b>bold</b> and
     <i>italics</i>.</p>
   </body>
   </html>




                                                                                15
                          HTML Grows Up


• As mentioned, HTML was intended simply to provide basic layout
  instructions.
• There wasn’t intended to be much control on the part of the
  designer over how the page looked.
• This makes sense: do you really need that much control over
  design to present a physics paper?
• But as the Web became popular, it started being used in different
  environments.
• As a result, people started to want additional control over layout.


                                                                        16
                        HTML Grows Up


• The result was an expansion of what HTML could do, both
  officially from the World Wide Web Consortium (W3C) and
  unofficially from the browser manufacturers.
• Thus a number of different versions of HTML were released,
  culminating (at least for now) with version 4.01.
• However, this pushed HTML well beyond what it was originally
  designed for, made browser development extremely difficult,
  HTML became very complex, and cross-platform issues became
  more serious.




                                                                 17
                              XHTML & CSS


• The result was XHTML and CSS.
• XHTML is, in effect, as stricter form of HTML.
• It has tighter rules, such as:
   • All tags must be in lower case.
   • All tags must have an associated ―end‖ tag.
   • Many ―browser specific‖ tags no longer work.
• More to the point, XHTML focused on describing what content
  was - ―this is a heading‖ and ―this is a menu‖ - rather than on how
  to display it.
• Presentation moved to CSS.

                                                                    18
                          XHTML & CSS


• CSS (Cascading Style Sheets) tells the browser how to display
  the information contained in an XHTML file.
• Thus while XHTML says ―this is a major heading‖, CSS states
  ―make major headings bold, using Arial as the font, 30 pixels high
  and centered on the page‖.
• The advantage comes from it being separate: if you develop a site
  using XHTML and CSS, you can update the look-and-feel simply
  by modifying the CSS file, without touching the XHTML.




                                                                   19
     XHTML & CSS




UniSA’s website: XHTML and CSS

                                 20
       XHTML & CSS




UniSA’s website with CSS turned off

                                      21
                                XML


• Finally, a bit about XML. XML stands for eXtensible Markup
  Language.
• It is an attempt to go even further than XHTML (and, in fact,
  predates it).
• XML can be used to markup almost any information in a way that
  makes sense to both machines and (to an extent) people.
• Mostly it is used in databases and to share information with RSS.




                                                                      22
                          What’s in a Page?


• As discussed, pages can contain a number of different elements:
  text, images, audio, programs, and the like.
• They can also use files in a number of different formats: text, html,
  xhtml, css, xml, and so on.
• MIME Types are used to tell the browser what sort of file is going
  to arrive.




                                                                       23
                            MIME Types: Text


• Text MIME Types include:
   •   text/css: Cascading Style Sheets; Defined in RFC 2318
   •   text/html: HTML; Defined in RFC 2854
   •   text/plain: Textual data; Defined in RFC 2046 and RFC 3676
   •   text/xml: Extensible Markup Language; Defined in RFC 302




                                                                    24
                         MIME Types: Images


• Type image
   •   image/gif: GIF image; Defined in RFC 2045 and RFC 2046
   •   image/jpeg: JPEG JFIF image; Defined in RFC 2045 and RFC 2046
   •   image/png: Portable Network Graphics; Registered[4]
   •   image/tiff: Tag Image File Format; Defined in RFC 3302
   •   image/vnd.microsoft.icon: ICO image; Registered[5]




                                                                       25
                         MIME Types: Audio


• Type audio
   • audio/mpeg: MP3 or other MPEG audio; Defined in RFC 3003
   • audio/x-ms-wma: Windows Media Audio; Documented in Microsoft KB
     288102
   • audio/vnd.rn-realaudio: RealAudio; Documented in RealPlayer Customer
     Support Answer 2559
   • audio/x-wav: WAV audio




                                                                        26
                       MIME Types: Application


• Type application: Multipurpose files
   • application/msword: Microsoft Word .doc files
   • application/pdf: Adobe’s portable document format (Acrobat files)
   • application/javascript: JavaScript; Defined in RFC 4329
   • application/xhtml+xml: XHTML; Defined by RFC 3236
   • application/x-shockwave-flash: Adobe Flash files; Documented in Adobe
     TechNote tn_4151 and Adobe TechNote tn_16509
   • application/octet-stream: Arbitrary byte stream. This is thought of as the
     ―default‖ media type used by several operating systems




                                                                              27
                        What's in a Page?


• Headings, links, paragraphs & lists from the beginning
  (WorldWideWeb browser 1990)
• images added by NCSA Mosaic (Andreessen, 1993)
• scripts, Java and plug-ins appear in Netscape 2 (1995) – the
  RealAudio plugin bundled with navigator
• stylesheets and ActiveX arrive with Internet Explorer 3
• forms add controls like:

        buttons
        radio buttons and
        checkboxes

                                                                 28
                          What's in a Page?


• The first image on the web was
  also the first rock band on the
  web.
• By the time the NCSA released
  Mosaic, pages included images
  embedded in the html.*




                                              29
                        What's in a Page?


• tables are introduced in HTML 3 (1995/6)
• The applet tag (HTML 3.2) allows the inclusion of Java programs
  within a web page
• divs provide arbitrary divisions of the HTML document (useful to
  define different areas of the page)
• The embed tag allows us to include video and audio via plugins
• Generic objects allow use to add arbitrary items




                                                                     30
                     How is the page arranged?


• Early pages were just a single column, items appearing from top
  to bottom;
• tables were used to arrange elements in a grid;
• floats allowed pictures to appear to the left or right of the
  matching text;
• divs could be positioned relative to each other;
                                                Top layer with an
• z-position allowed layers to overlap          absolutely horrendous
                           Bottom text in one colour scheme to
                           layer with no        highlight the overlap
                           guarantee of filling it
                           all up easily
                                                                        31
                Frames: several pages at a time


• Netscape 3 introduced the idea of showing several pages at a
  time: frames divided the window into several regions, each of
  which was attached to a web page.
   <frameset cols='20%, 75%'>
     <frame src='left.html'>
     <frame src='right.html'>
   </frameset>




                                                                  32
                         Pages with Style


• Early pages with <font…> tags to define font family and size
• Transparent gifs used as spacers
• CSS1 (1996) styles provide font, padding and margins
• CSS (1998) positioning allows exact placement on page —
  partly implemented by level 4 browsers
• CSS width and float allows side-by-side divs
• CSS2 defines styles for separate media types, child and adjacent
  selectors
• CSS3 adds multiple columns, shadows and opacity settings

                                                                 33
                            Interactivity


• forms plus CGI (Common gateway interface):

      http://fred.com/cgi/feed.pl?type=full&no=14
  generates a new page based on arguments
• forms plus client-side javascript allows changes in the existing
  form.
• Styles with hover, active classes on links
• Javascript triggers on mouseover, mouseout and keypress
• Adobe’s Flash plugin allow video/audio and interactive controls


                                                                     34
                            Interactivity


• Javascript expanded to alter styles of document elements click!
• IE5 introduces inner html to allow javascript to write elements
• Standard Document Object Model (w3c DOM Level 1, 1998)
  allows dynamic changes to elements of web page




                                                                    35
                     Interactivity and AJAX


• Internet Explorer 5 introduced the XMLHTTP function to
  javascript, allowing background requests to the webserver.
• XMLHttpRequest is now a standard javascript function in level 6
  browsers.
• AJAX refers to the use of XMLHttpRequest to query databases
  and update parts of a web page in the background.
• Javascript extension libraries such as Prototype and
  script.aculo.us provide standard ways to do animation, effects
  and drag & drop of html page elements.



                                                                    36
                         Web Page Delivery


1. The user specifies a file using a URL.
2. The server locates the file (or the program) on its hard drive, and
   transmits a copy (or the output) to the client.
3. The connection is then effectively "broken".
4. The browser now interprets the file and displays it on the screen
   (or saves it, or whatever else it is asked to do with it).
5. Thus a web page exists first on a server, then as a copy on a
   client's machine.
6. This process can be referred to as "call and response" - the
   server receives a call from a client, and responds to that call.
                                                                       37
                          Call and Response




            Client                Server                  File




Step 1: The client (your computer) requests a file (URL) from the server.

                                                                            38
                  Call and Response




    Client                Server                  File




Step 2: The server finds the requested file (or program).

                                                            39
                 Call and Response




    Client                Server                  File




Step 3: The server reads the information to be delivered.

                                                            40
             Call and Response




Client               Server                   File




Step 4: The server sends the data to the client.

                                                     41
                        Call and Response




           Client               Server                  File




Step 5: The connection is ―broken‖, and the browser displays the data.

                                                                         42
                      Why Does This Matter?


• Files must be downloaded to the client.
   • Therefore, it is difficult to protect those files.
   • So HTML/XHTML code, images, some JavaScript and the like
     are difficult, or even impossible, to protect.
• HTTP is a stateless protocol - it has no memory.
   • It is difficult (or impossible) to write software using HTTP that
     employ synchronous communication. Mostly we fake it - by
     making many small requests to the server.
   • Each individual file - including every single image - requires a
     separate request.


                                                                         43
                  Some Historical Drivers of the Web


• 1990-1993: Predominately for scientific research
   • "Presentation" was less significant than cross-platform compatibility and
     hyperlinks.
• 1993: Multiple browsers, and the web opens up for commercial
  use
   • Some incompatibility between browsers emerges.
   • Commercial interests start push towards presentation as well as content.
• 1994: AOL and Compuserve allow access to the web
   • Massive increase in number of users.
   • Users have (on average) less computer experience than previously,
     pushing "ease of use".


                                                                                 44
                  Some Historical Drivers of the Web


• 1995: eBay founded, Amazon launched
   • Big online-only businesses emerge, although profits are slight (and often
     non-existent)
• 1995-1996: Browser wars begin - Netscape 3 vs MSIE 3
   • Forces rapid development of browser technology.
   • Deliberate incompatibilities emerge between browsers.
• 1995-1997: Introduction of W3C standards




                                                                                 45
                  Some Historical Drivers of the Web


• Late 1990's: Mobile Commerce emerges
• 1998: Google becomes privately owned company
   • Dramatically improves practicality of web searches.
• 1999: LiveJournal and Blogger.com
   • Help popularise "blogging".
• 2000: Dot-com crash
• 2004: Long tail
   • Acknowledges that there are business models that can best be realised
     online.



                                                                             46
                  Some Historical Drivers of the Web


• 2004: Podcasting
   • Podcasting, along with video sharing (such as YouTube), image sharing
     (Flickr), online music sales, Massive Multiplayer Online Games and peer-
     to-peer downloading strongly push uptake of broadband.
• 2005: AJAX
   • Shows the viability of web-based applications, such as Writely (now Goodle
     Docs), Google Calendar, and others.
   • Underlying technologies predate 2005




                                                                                47
The End




          48

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:4
posted:9/1/2011
language:English
pages:48