WWW World Wide Web Aka The Internet dr. C. P. J. Koymans Informatics Institute Universiteit van Amsterdam November 30, 2007 dr. C. P. J. Koymans (UvA) WWW November 30, 2007 1 / 36
WWW history (1) 1968 Doug Engelbart Earlier than ARPANET or UNIX Inventor of the mouse... and of hypermedia... and of videoconferencing dr. C. P. J. Koymans (UvA) WWW November 30, 2007 2 / 36
WWW history (2) 1989 Tim Berners Lee 20 years after Engelbart First Information management proposal at CERN 1990 WorldWideWeb browser (later Nexus) Developed by Berners Lee on NEXTSTEP World Wide Web (with spaces) is the abstract information space dr. C. P. J. Koymans (UvA) WWW November 30, 2007 3 / 36
WWW history (3) More browsers 1992 Line mode browser 1.1 ViolaWWW browser for X Windows 1993 Mosaic for X Windows (Marc Andreessen, founder of Netscape) dr. C. P. J. Koymans (UvA) WWW November 30, 2007 4 / 36
WWW history (4) 1994 Mozilla (Netscape) W3C founded (MIT, INRIA, Keio) 1995 Microsoft Internet Explorer dr. C. P. J. Koymans (UvA) WWW November 30, 2007 5 / 36
WWW history (5) Standards based browsers Mozilla, Firefox (Gecko engine) Safari, Konquerer (KHTML engine) Opera (commercial; proprietary engine) dr. C. P. J. Koymans (UvA) WWW November 30, 2007 6 / 36
Forms of communication Direct push Indirect push Pull 1 1, 1 N, N 1, N N dr. C. P. J. Koymans (UvA) WWW November 30, 2007 7 / 36
Examples of communication Direct push Indirect push Pull 1 1 IM Email DNS/LDAP 1 N wall Mailing list WWW N 1 IDS Voting/Poll Search engine N N Videoconf Chat Usenet dr. C. P. J. Koymans (UvA) WWW November 30, 2007 8 / 36
WWW concepts Browser and Webserver 3-tier model Dynamic web pages URLs and HTTP HTML and other markup dr. C. P. J. Koymans (UvA) WWW November 30, 2007 9 / 36
Browser Client making requests for web pages Interface for the user Graphical User Interface IE, Mozilla, Safari, Firefox... Terminal based lynx, links, w3m dr. C. P. J. Koymans (UvA) WWW November 30, 2007 10 / 36
Web server Server responding to requests Apache, IIS, SunONE (iplanet), NCSA See <http://www.netcraft.com/> Looks up information in or via files, databases, scripts locally or remote dr. C. P. J. Koymans (UvA) WWW November 30, 2007 11 / 36
Netcraft survey october 2006 dr. C. P. J. Koymans (UvA) WWW November 30, 2007 12 / 36
Netcraft survey november 2007 dr. C. P. J. Koymans (UvA) WWW November 30, 2007 13 / 36
3-tier model Presentation layer (user tier) Communicates with (client) browser Business Logic layer (business tier) Applies business rules Data layer (data tier) Interacts with data store (database) dr. C. P. J. Koymans (UvA) WWW November 30, 2007 14 / 36
LAMP model (L)inux as underlying OS (A)pache as presentation layer (M)ySQL as data layer (P)HP as business logic layer dr. C. P. J. Koymans (UvA) WWW November 30, 2007 15 / 36
Dynamic pages (1) Client side: DHTML (Dynamic HTML) Works with Document Object Model (DOM) Executes ECMAscript (standard) programs JavaScript (Netscape), JScript (Microsoft) Ajax (Asynchronous Javascript and XML) May execute Applets (JVM) or ActiveX dr. C. P. J. Koymans (UvA) WWW November 30, 2007 16 / 36
Dynamic pages (2) Server side dynamic web pages CGI (Common Gateway Interface) server-side scripting PHP, JSP, ASP servlets: server-side java applications ASP.NET dr. C. P. J. Koymans (UvA) WWW November 30, 2007 17 / 36
Document Object Model An ongoing W3C activity for standardizing Dynamic HTML Level 0: proprietary API for HTML (XML) documents Level 1: standardized API for HTML (XML) documents Level 2: modularized with support for events and styles Level 3: support for loading and saving and for keyboard events dr. C. P. J. Koymans (UvA) WWW November 30, 2007 18 / 36
Uniform Resource Identifiers URI has two forms URL (Uniform Resource Locator) URN (Uniform Resource Name) urn:<nid>:<nid-specific> urn:ietf:rfc:2648 urn:isbn:0-97-606188-0 dr. C. P. J. Koymans (UvA) WWW November 30, 2007 19 / 36
Uniform Resource Locators <scheme>:<scheme-specific> <scheme> is often some Internet protocol http, ftp, telnet, rtsp <scheme-specific> often starts with // to indicate Internet addresses follow Other forms: mailto, news dr. C. P. J. Koymans (UvA) WWW November 30, 2007 20 / 36
HTTP URLs http:// <authority> <host> : <port> /<path>?<query> #<fragment> (in URI-reference) dr. C. P. J. Koymans (UvA) WWW November 30, 2007 21 / 36
HTTP Uses <CR><LF> end of line convention HTTP request (response) request (response) line request (response) headers empty line optional body dr. C. P. J. Koymans (UvA) WWW November 30, 2007 22 / 36
HTTP request <method> <path> <HTTP-version> GET (get web page), HEAD (get headers only) PUT (store web page) POST (input to server side scripts) DELETE (delete web page) OPTIONS (query web server options) dr. C. P. J. Koymans (UvA) WWW November 30, 2007 23 / 36
HTTP response <HTTP-version> <status-code> <comment> HTTP/1.1 200 OK HTTP/1.1 301 Moved Permanently HTTP/1.1 400 Bad Request HTTP/1.1 404 Not Found HTTP/1.1 501 Method Not Implemented dr. C. P. J. Koymans (UvA) WWW November 30, 2007 24 / 36
Request headers User-Agent: <client identification> Host: <(virtual) server name> Cookie: <stored user tracking information> Date: <date/time message sent> Authorization: <credentials>... many more... dr. C. P. J. Koymans (UvA) WWW November 30, 2007 25 / 36
Response headers Content-Type: <MIME type> Content-Length: <page length in bytes> Last-Modified: <date of last page change> Set-Cookie: <string to keep state> Location: <redirection information>... many more... dr. C. P. J. Koymans (UvA) WWW November 30, 2007 26 / 36
Markup SGML HTML XML XHTML dr. C. P. J. Koymans (UvA) WWW November 30, 2007 27 / 36
SGML Standard Generalized Markup Language <!DOCTYPE... > <!ELEMENT... > <!ATTLIST... > <!ENTITY... > DTD: Document Type Definition dr. C. P. J. Koymans (UvA) WWW November 30, 2007 28 / 36
HTML Instantiation of SGML <!DOCTYPE HTML PUBLIC -/W3C/DTD HTML 4.01//EN http://www.w3.org/tr/html4/strict.dtd > All else is bogus: <BLINK>,... dr. C. P. J. Koymans (UvA) WWW November 30, 2007 29 / 36
XML Simpler reformulation of SGML Some differences Every start tag must have a close tag Attribute values must always be quoted <?xml... > processing instructions reserved dr. C. P. J. Koymans (UvA) WWW November 30, 2007 30 / 36
XHTML XML specification of HTML Still needs a DTD http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd Will be replaced by some XML Schema dr. C. P. J. Koymans (UvA) WWW November 30, 2007 31 / 36
W3C activities See <http://www.w3.org/> CSS, XSL RDF, Semantic Web XML Schema SOAP, Web Services Accessibility, Internationalization (I18N) dr. C. P. J. Koymans (UvA) WWW November 30, 2007 32 / 36
CSS, XSL Cascading Style Sheets (CSS1, CSS2) Extensible Stylesheet Language (XSL) XSL Transformations (XSLT) XSL Formatting Objects (XSL-FO) XML Path Language (XPath) dr. C. P. J. Koymans (UvA) WWW November 30, 2007 33 / 36
RDF (1) Resource Description Framework Metadata Semantic Web Knowledge Machine readable information dr. C. P. J. Koymans (UvA) WWW November 30, 2007 34 / 36
RDF (2) Example from UvA/SNE research NDL (Network Description Language) <http://www.science.uva.nl/research/sne/ndl/> dr. C. P. J. Koymans (UvA) WWW November 30, 2007 35 / 36
XML Schema Transforming an SGML DTD into an XML Schema Is written itself in XML syntax Has support for built-in datatypes dr. C. P. J. Koymans (UvA) WWW November 30, 2007 36 / 36