SlideShare a Scribd company logo
1 of 34
Download to read offline
Unit 2: Web Technologies (1/2)‫‏‬
 Core
       Web browsers and web servers
       URIs
       HTTP

 Client-Side
       Basic: HTML, CSS
       Advanced: JavaScript, DOM, AJAX, HTML 5, RIA

 Server-Side technologies for Web Applications
       CGI
       PHP
       Java Servlets
       JavaServer Pages (JSPs)‫‏‬

dsbw 2011/2012 q1                                      1
World Wide Web
 “The World Wide Web (known as "WWW', "Web" or "W3") is
    the universe of network-accessible information, the
    embodiment of human knowledge” (W3C)‫‏‬
 The Web was created in 1989 by Tim Berners-Lee and Robert
    Cailliau working at the European Organization for Nuclear
    Research (CERN) in Geneva.
 The three basic components of the initial WWW proposal:
         HTML: Markup language for formatting hypertext documents
         URI: Uniform notation scheme for addressing accessible
          resources over the network
         HTTP: Protocol for transporting messages over the network


dsbw 2011/2012 q1                                                     2
World Wide Web: Typical Interaction

     http://www.essi.upc.edu


       Departament d’ESSI

                               1



                                                                      4
                                                                           index.html
               BROWSER                                WEB SERVER
                                        3
           2                       GET /index.html
       FTP     DNS … HTTP                            HTTP         …
                    TCP                                     TCP            port 80
                                             5
                     IP                                     IP            147.83.20.44


                                   Physical Net


dsbw 2011/2012 q1                                                                        3
The Universal Client: The Web Browser
 Web Browsers provide an –usually graphical- interface to
    obtain, interpret, format and render HTML documents.
   HTML documents usually have links, hyperlinks, to other
    documents
   Each link is encoded through an URI (Uniform Resource
    Identifier)‫‏‬
   HTML documents may contain images, audio files, etc that
    are also referred through URIs and that are rendered jointly
    by the browser.
   Other features:
         Cache, bookmarks, printing, off-line operation, …
         Client-side scripting support: JavaScript/ VBscript
         RIA support
         Helper Applications
         Plug-ins
dsbw 2011/2012 q1                                                  4
The Web Server
 Web Servers “listen to” a TCP port -usually 80- waiting for a
    client (web browser) to initiate a connection.
   Once the connection is established, the web browser sends a
    request and the web server returns a response. Then the
    connection is released
   HTTP is the protocol that defines such a request/response
    communication
   Initially, requests were about “static” resources -HTML
    documents, binary pictures, etc- stored in files reachable by
    the web server.
   Other features:
       Logging
       Server-side scripting: CGI, FastCGI, SSI, ASP.NET, Java Web
        Containers, PHP, etc.
dsbw 2011/2012 q1                                                     5
Uniform Resource Identifier (URI)‫‏‬
 “The Web is an information space. Human beings have a lot
    of mental machinery for manipulating, imagining, and finding
    their way in spaces. URIs are the points in that space” (W3C)‫‏‬
 A URI is a compact sequence of characters that identifies an
    abstract or physical resource. Its generic syntax defines four
    parts:
  <scheme name> : <hierarchical part> [ ? <query> ] [ # <fragment> ]
 Example:
      http://user:pass@example.com:992/animal/bird?species=seagull#wings

                    login          host     port

                            authority              path

      scheme                  hierarchical part           query fragment

dsbw 2011/2012 q1                                                          6
URLs, URNs and IRIs
 A "Uniform Resource Locator" (URL) is a URI that provides
    also a mean for locating the resource by describing its
    primary access mechanism. Examples:
            ftp://ftp.is.co.za/rfc/rfc1808.txt
            ldap://[2001:db8::7]/c=GB?objectClass?one
            mailto:John.Doe@example.com
            ed2k://|file|Jim%20Conallen%20-%20Building%20Web%20Applications%20
               with%20UML%202nd%20Ed.chm|6685541|74112A8EDD20B521B4BCB0
               52D0416FE7|/
 A "Uniform Resource Name" (URN) refers to a URI under the
  "urn" scheme (e.g urn:isbn:1892295490) or to any other URI
  with the properties of a name
 The Internationalized Resource Identifier (IRI) is a URI that
  may contain characters from the Universal Character Set
  (Unicode/ISO 10646)‫‏‬
dsbw 2011/2012 q1                                                            7
HyperText Transfer Protocol (HTTP)‫‏‬
 HTTP is the transfer protocol used throughout the Web: It
    specifies what messages web browsers may send to servers
    and what responses they get back in return.
 Typical interaction (HTTP/1.0 or lower):
         Web browser establishes a TCP/IP connection with the target Web
          server
         Web browser sends a HTTP ASCII request over the TCP/IP connection.
         Web server returns a HTTP MIME-like response and releases the
          TCP/IP connection
 HTTP/1.1 improvements:
         Persistent connections: several request/response interactions in a
          single connection.
         Request pipelining: multiple HTTP requests are sent without waiting
          for the corresponding responses.
dsbw 2011/2012 q1                                                               8
The HTTP Request
<METHOD> <Resource_Path> <HTTP_Version> <CR>   // Request
( <Attribute>: <Value> <CR> )*          // Parameters
<CR>                                    // Blank line
[Body]                                 // If needed

 METHOD := GET | POST | HEAD | …

 Example:
      GET /index.html HTTP/1.1
      Host: www.essi.upc.edu   // Compulsory if HTTP/1.1




dsbw 2011/2012 q1                                           9
The HTTP Response
      <HTTP_Version> <Result_Code> [explanation] <CR>
      ( <Attribute>: <Value> <CR> )*
      <CR>
      [Body]
 Result_Code := 200 [OK] | 400 [Bad Request] | 404 [Not
  found] | …
 Example:
      HTTP/1.1 200 OK
      Date: Fri, 19 Feb 2010 16:48:36 GMT
      Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14
        OpenSSL/0.9.8l PHP/4.4.9 mod_perl/2.0.4 Perl/v5.8.9
      Last-Modified: Tue, 02 Feb 2010 14:36:59 GMT
      ETag: "22a7f-4270-47e9f08d3ad1f"
      Accept-Ranges: bytes
      Content-Length: 17008
      Content-Type: text/html
      <HTML>… </HTML>
dsbw 2011/2012 q1                                             10
HTTP: Two Important Remarks
 HTTP is stateless:
       The Web Server handles each HTTP request independently and
        there is no easy way to keep track of each client request and to
        associate it with a previous one.
       However, managing state is important for many applications: a
        single use case scenario often involves navigating through a
        number of Web pages. Without a state management
        mechanism, you would have to continually supply all previous
        information entered for each new Web page.
 HTTP is one-way:
         Clearly separated roles: Clients -Web browsers- make requests
          to -Web- Servers, no vice versa.



dsbw 2011/2012 q1                                                         11
HyperText Markup Language (HTML)‫‏‬
 HTML is the main publishing language of the Web.
 HTML is based on SGML (Standard Generalized Markup
    Language, ISO 8879)‫‏‬
 HTML Document = Content (mostly text) + Markup
 HTML Markup allows to define
       How content must be structured
       How to render each piece of structured content
       Links to other HTML documents
       Embedded objects: images, audio, video, forms, scripts,
        applets, …
 Markup is performed using tags:
      <TAG (ATRIBUTE=VALUE)*> Content </TAG>

dsbw 2011/2012 q1                                                 12
HTMLs
 Despite an strong effort for standardization …
         Hypertext Markup Language (First Version), published as an Internet
          Engineering Task Force (IETF) working draft (June 1993).
         HTML 2.0, IETF RFC 1866 November (1995)‫‏‬
         HTML 3.2, W3C Recommendation (January 1997)‫‏‬
         HTML 4.0, W3C Recommendation (December 1997)‫‏‬
         HTML 4.01, W3C Recommendation (December 1999)‫‏‬
         ISO/IEC 15445:2000, based on HTML 4.01 Strict (May 2000)‫‏‬
         XHTML 1.0, W3C Recommendation (Published January 2000, revised
          August 2002)‫‏‬
         XHTML 1.1, W3C Recommendation (May 2001)‫‏‬
         XHTML 2.0, W3C Working Draft (July 2006)‫‏‬Abandoned in 2009
         (X)HTML 5.0 W3C Working Draft
 … HTML programmers are constantly faced with the problem of
    using HTML features that are not supported consistently, if at all,
    across all the target browser platforms.

dsbw 2011/2012 q1                                                               13
HTML Forms




dsbw 2011/2012 q1   14
HTML Forms: Processing




dsbw 2011/2012 q1        15
Cascading Style Sheets (CSS)‫‏‬
 Some HTML markup already defines how to render the
    affected content …
 … however, CSS is preferable because:
       provide more flexibility and control in the specification of
        presentational characteristics.
       enable a clean separation of document content from document
        presentation.
       allow the reuse of a same style sheet in different HTML
        documents: shared look and feel.
 Cascading here refers to a priority scheme to determine
    which style rules apply if more than one rule matches against
    a particular element. (≈ polymorphism rules in OO
    generalization hierarchies).

dsbw 2011/2012 q1                                                  16
CSS: Ways of Use (1/2)‫‏‬
 Inline
    <h1 style="color: red;">CSS test</h1>
    <p style="font-size: 12pt; font-family: Verdana, sans-
    serif">This a test to show the different ways of using
    <em style="color: green;">Cascading Style
    Sheets</em>.</p>

 Embedded
    <html>
    <head>
    <STYLE TYPE="text/css">
    H1 { color: red}
    P { font-size: 12pt; font-family: Verdana, sans-serif;}
    EM { color: green}
    </STYLE>
    </head>
    <body>
    </body>
    </html>

dsbw 2011/2012 q1                                            17
CSS: Ways of Use(2/2)‫‏‬
 Linked
      <html>
      <head>
      <LINK REL="STYLESHEET" HREF="prova.css"
        TYPE="text/css">
      </head>
 Imported
      <html>
      <head>
      <STYLE>
      @import url(http://localhost/prova.css);
      @import url(prova2.css);
      </STYLE>
      </head>

dsbw 2011/2012 q1                                18
JavaScript
 JavaScript is an interpreted programming language that
  allows to embed executable code -scripts- into a HTML
  document.
 Such scripts are executed by the web browser when
  rendering the HTML document.
 JavaScript is a “light” version of Java:
         Type control is not strong.
         There are “objects”, but programmers cannot define their own
          classes.
 ECMAScript: JavaScript “Standard” (ECMA-262 specification
    and ISO/IEC 16262). Main dialects:
       JavaScript (it’s a trademark of Sun Microsystems, used under
        license by Netscape and Mozilla)
       Microsoft’s JScript
       Adobe’s ActionScript
dsbw 2011/2012 q1                                                        19
JavaScript: What Can It Do?
 Put dynamic text into an HTML page
 Interact with the web browser: open new windows, show
    alerts, redirect to another URI, etc.
 Read and write HTML elements (e.g. form fields)‫‏‬
 Validate form data
 Handle events : onClick, onLoad, onMouseOver, onMouseOut,
    onSubmit, etc.
 Create/read/write cookies
         Cookie: information sent by a server to a web browser and then
          sent back unchanged by the browser each time it accesses that
          server. Cookies are used for authenticating, tracking, and
          keeping data about users.
 Interact with applets
dsbw 2011/2012 q1                                                      20
JavaScript: Example
<html><head><title>La Data d’avui</title>
  <script language="JavaScript">
    function print_todays_date()‫‏‬
    {   today = new Date();
        days_ca = new Array("Diumenge", "Dilluns", "Dimarts",
               "Dimecres", "Dijous", "Divendres", "Dissabte");
        months_ca = new Array("gener", "febrer", "març", "abril",
               "maig", "juny", "juliol", "agost", "setembre",
               "octubre", "novembre", "desembre");
        document.write(days_ca[today.getDay()]+", ");
        document.write(today.getDate()+" de ");
        document.write(months_ca[today.getMonth()]+" de ");
        document.write(today.getFullYear());}
    </script></head>
<body>
<hr>La data d’avui &eacute;s:<br><b>
<script language="JavaScript"> print_todays_date(); </script>
</b><hr></body></html>

dsbw 2011/2012 q1                                               21
Document Object Model / DHTML
 DOM “is a platform- and language-neutral interface that will
    allow programs and scripts to dynamically access and update
    the content, structure and style of documents. The document
    can be further processed and the results of that processing
    can be incorporated back into the presented page”. (W3C)‫‏‬
 HTML/XML documents and their inner elements are handled
    as objects with data and behavior (operations). The whole
    structure is represented -and accessed- as a object tree.
 Dynamic HTML (DHTML): “is a term used by some vendors to
    describe the combination of HTML, style sheets and scripts
    that allows documents to be animated” (W3C).
         Examples: www.w3schools.com/dhtml/


dsbw 2011/2012 q1                                                22
DOM: Object tree




dsbw 2011/2012 q1   23
AJAX
 Asynchronous JavaScript And XML

 It is indeed a “mix” of – previous – technologies:
         standards-based presentation using (X)HTML and CSS;
         dynamic display and interaction using DOM;
         data interchange and manipulation using XML and XSLT;
         asynchronous data retrieval using XMLHttpRequest;
         and JavaScript binding everything together.




dsbw 2011/2012 q1                                                 24
AJAX: before and after

                    before                              after
 The browser sends a request to          User interaction with the current
    the server whenever the user             page displayed by the browser
    selects a link or fills a form.          triggers presentation events
                                            Event handlers may perform
 The web browser remains idle
                                             asynchronous calls to the server
    while the server is processing the
                                             to request new/updated data.
    request and building the
    response.                               Such calls are sent to and
                                             processed by the server without
 The response – a whole HTML                end users noticing it. The web
    page – is completely build on the        browser is not idle
    server side.
                                            Server response is minimal (not a
                                             whole HTML page)‫‏‬
                                            The new data is incorporated
                                             dynamically on the current page
                                             with JavaScript + DOM (DHTML)‫‏‬
dsbw 2011/2012 q1                                                            25
AJAX: Example


                                                                      Server Script: /validate
                                          _ajax.send()
                                                                            Get parameters…do some work
     XMLHttpRequest                                                         Return something…
                                                                                a text message
                                                                                an XML document
     function doResp() {                                                        an HTML snippet
       if _ajax.readyState == 4 and                                             a javascript method
         _ajax.status != 200 {                                                  whatever you want…
       div=document.getElementById(‘status’)
       div.innerHTML = _ajax.responseText;

                                                         Message
           onChange event:                         status=999
           _ajax = new XMLHTTPRequest();       msg=Not a valid name
           _ajax.onreadystatechange = doResp;
           url = ‘./validate?field=’
              +this.name+‘&value=’+this.value;
           _ajax.open(‘GET’, url, true )


                    Manolito                                                      Database
       Name:                      Not a valid name




                Web Browser                                                     Web Server

dsbw 2011/2012 q1                                                                                    26
AJAX: uses
 Auto-complete
         Full words are suggested as the user types the first letters

 Progress bar
         To show the status of the “work in progress” in the server side

 “Real-time” validation of forms
         Without needing to fill all the form fields

 Updating the information displayed on the current page
         Without “refresh”

 Rich Internet Applications (RIA)‫‏‬



dsbw 2011/2012 q1                                                           27
AJAX: Some considerations
 The XMLHttpRequest object only can make requests to the
    same server that provided the web page
 AJAX Programming “from scratch” is not advised.

 Unexpected results when pressing the Back and Refresh
    buttons of the browser.
 Downloading time takes longer as AJAX-enabled pages
    require larger amounts of code.
 Debugging gets harder as code is executed in both browser
    and server sides
 AJAX code is visible, prone to be copied and hacked.
 Servers may get overloaded for abuse of asynchronous calls.


dsbw 2011/2012 q1                                               28
HTML 5
 History:
         Project started by the Web Hypertext Application Technology
          Working Group (WHATWG) in 2004:
               Web Applications 1.0
               Web Forms 2.0
         In conjunction with the W3C since 2007
 Main objective: Provide good support for modern documents and
    web applications (The browser as web application platform).
 Other objectives:
         Support legacy web content and provide backward compatibility
         Cover common modern browser functionality
         Make web content authoring more uniform
         Clarify processing model


dsbw 2011/2012 q1                                                         29
HTML 5 Features
 New markup
       Structure: section, article, header, footer, ...
       Multimedia: audio, video, embed, ...
       Graphics: canvas, figure, ...

 New API’s
       Timed media playback: embed interactive video and audio
        easily, without plugins
       Offline Web applications: ApplicationCache
       Client-side data storage: per-session (sessionStorage) and
        persistently across sessions (localStorage and client-side SQL
        database storage)
       Document editing, Drag-and-drop, etc.

 More flexibility in handling syntax errors
dsbw 2011/2012 q1                                                        30
HTML 5 Forms (formerly Web Forms 2.0)
 Features:
       New input types
       Basic client side validation
       Repetition blocks
       Access to remote data (for e.g. select elements)

 Examples:
      <input type="email” value="a@b">
      <input pattern="[1-9]{10}" value="1234567891">
      <input type="number" min="7" max="25” step="2">
      <input type="date” required>




dsbw 2011/2012 q1                                          31
Rich Internet Applications (RIA)‫‏‬
 RIA are Web applications that have the features and
    functionality of traditional desktop applications, by executing
    most of their - rich -user interfaces on the client side.
 Indeed, the RIA paradigm is a new version of the Remote
    User Interface pattern for Client/Server architectures
 RIAs typically:
       run in a Web browser with/without extra software installation
       run locally in a secure environment called a sandbox

 “First generation” RIA platforms:
         Java Applets, (Microsoft) ActiveX Controls, (Macromedia) Flash
 “Second generation” RIA platforms:
         AJAX (frameworks), Adobe Flex/AIR, JavaFX, (Microsoft)
          Silverlight, OpenLaszlo, …
dsbw 2011/2012 q1                                                          32
Java Applets: Example
 <html>
 <head>
 <title>TicTacToe v1.1</title>
 </head>
 <body>
 <center>
 <h1>TicTacToe v1.1</h1>
 <hr>
 <OBJECT
    codetype="application/java"
   classid="java:TicTacToe.class"
    width=120 height=120>
 </OBJECT>
 </center>
 </body>
 </html>


dsbw 2011/2012 q1                   33
References
 SHKLAR, Leon et al. Web Application Architecture: Principles,
    Protocols and Practices, Second Edition. John Wiley & Sons,
    2009.
 www.w3c.org

 www.w3schools.com

 http://www-128.ibm.com/developerworks/




dsbw 2011/2012 q1                                                 34

More Related Content

What's hot

Server Side Programming
Server Side ProgrammingServer Side Programming
Server Side ProgrammingMilan Thapa
 
World wide web An Introduction
World wide web An IntroductionWorld wide web An Introduction
World wide web An IntroductionSidrah Noor
 
introduction to web technology
introduction to web technologyintroduction to web technology
introduction to web technologyvikram singh
 
Web technologies lesson 1
Web technologies   lesson 1Web technologies   lesson 1
Web technologies lesson 1nhepner
 
Introduction to Web Programming - first course
Introduction to Web Programming - first courseIntroduction to Web Programming - first course
Introduction to Web Programming - first courseVlad Posea
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web developmentMohammed Safwat
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)AakankshaR
 
Html,javascript & css
Html,javascript & cssHtml,javascript & css
Html,javascript & cssPredhin Sapru
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Modelchomas kandar
 
HTML5 Topic 1
HTML5 Topic 1HTML5 Topic 1
HTML5 Topic 1Juvywen
 
Computer languages
Computer languagesComputer languages
Computer languagesAqdasNoor
 
Div tag presentation
Div tag presentationDiv tag presentation
Div tag presentationalyssa_lum11
 

What's hot (20)

Web development
Web developmentWeb development
Web development
 
Web technology
Web technologyWeb technology
Web technology
 
Server Side Programming
Server Side ProgrammingServer Side Programming
Server Side Programming
 
Web design - How the Web works?
Web design - How the Web works?Web design - How the Web works?
Web design - How the Web works?
 
Xml
XmlXml
Xml
 
World wide web An Introduction
World wide web An IntroductionWorld wide web An Introduction
World wide web An Introduction
 
introduction to web technology
introduction to web technologyintroduction to web technology
introduction to web technology
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
Web technologies lesson 1
Web technologies   lesson 1Web technologies   lesson 1
Web technologies lesson 1
 
Introduction to Web Programming - first course
Introduction to Web Programming - first courseIntroduction to Web Programming - first course
Introduction to Web Programming - first course
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
 
web server
web serverweb server
web server
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Html,javascript & css
Html,javascript & cssHtml,javascript & css
Html,javascript & css
 
Web application architecture
Web application architectureWeb application architecture
Web application architecture
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
HTML5 Topic 1
HTML5 Topic 1HTML5 Topic 1
HTML5 Topic 1
 
XML
XMLXML
XML
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Div tag presentation
Div tag presentationDiv tag presentation
Div tag presentation
 

Viewers also liked

What the Hell is the Internet Anyway? - A History of the Web
What the Hell is the Internet Anyway? - A History of the Web What the Hell is the Internet Anyway? - A History of the Web
What the Hell is the Internet Anyway? - A History of the Web Vimi.co Ltd - Bangkok Web Agency
 
Twitter and Blogging by @gallit_z and @hughtheteacher
Twitter and Blogging by @gallit_z and @hughtheteacherTwitter and Blogging by @gallit_z and @hughtheteacher
Twitter and Blogging by @gallit_z and @hughtheteacherGallit Zvi
 
Building Your PLN
Building Your PLNBuilding Your PLN
Building Your PLNGallit Zvi
 
ใบงานที่ 3 เรื่อง ขอบข่ายและประเภทของโครงงาน
ใบงานที่ 3 เรื่อง ขอบข่ายและประเภทของโครงงานใบงานที่ 3 เรื่อง ขอบข่ายและประเภทของโครงงาน
ใบงานที่ 3 เรื่อง ขอบข่ายและประเภทของโครงงานMoo Mild
 
21st century learning
21st century learning21st century learning
21st century learningGallit Zvi
 
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1Moo Mild
 
ใบงานที่ 4
ใบงานที่ 4ใบงานที่ 4
ใบงานที่ 4Moo Mild
 
Flipping the ela classroom cawp version
Flipping the ela classroom cawp versionFlipping the ela classroom cawp version
Flipping the ela classroom cawp versionMrsHardin78
 
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1Moo Mild
 
ใบงานที่ 11
ใบงานที่ 11ใบงานที่ 11
ใบงานที่ 11Moo Mild
 
ใบงานที่ 11
ใบงานที่ 11ใบงานที่ 11
ใบงานที่ 11Moo Mild
 
加速器と素粒子物理での超?低レイヤー
加速器と素粒子物理での超?低レイヤー加速器と素粒子物理での超?低レイヤー
加速器と素粒子物理での超?低レイヤーRyo Ichimiya
 
Tarun Kumar Thesis 2
Tarun Kumar Thesis 2Tarun Kumar Thesis 2
Tarun Kumar Thesis 2Tarun_Kumar85
 
Rscon4 presentation on Genius Hour
Rscon4 presentation on Genius HourRscon4 presentation on Genius Hour
Rscon4 presentation on Genius HourGallit Zvi
 
Interning in Silicon Valley
Interning in Silicon ValleyInterning in Silicon Valley
Interning in Silicon Valleytiffanywlim
 

Viewers also liked (20)

Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)
 
What the Hell is the Internet Anyway? - A History of the Web
What the Hell is the Internet Anyway? - A History of the Web What the Hell is the Internet Anyway? - A History of the Web
What the Hell is the Internet Anyway? - A History of the Web
 
Twitter and Blogging by @gallit_z and @hughtheteacher
Twitter and Blogging by @gallit_z and @hughtheteacherTwitter and Blogging by @gallit_z and @hughtheteacher
Twitter and Blogging by @gallit_z and @hughtheteacher
 
Building Your PLN
Building Your PLNBuilding Your PLN
Building Your PLN
 
Blog
BlogBlog
Blog
 
ใบงานที่ 3 เรื่อง ขอบข่ายและประเภทของโครงงาน
ใบงานที่ 3 เรื่อง ขอบข่ายและประเภทของโครงงานใบงานที่ 3 เรื่อง ขอบข่ายและประเภทของโครงงาน
ใบงานที่ 3 เรื่อง ขอบข่ายและประเภทของโครงงาน
 
Blog
BlogBlog
Blog
 
21st century learning
21st century learning21st century learning
21st century learning
 
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
 
ใบงานที่ 4
ใบงานที่ 4ใบงานที่ 4
ใบงานที่ 4
 
Ameratex energy
Ameratex energyAmeratex energy
Ameratex energy
 
Flipping the ela classroom cawp version
Flipping the ela classroom cawp versionFlipping the ela classroom cawp version
Flipping the ela classroom cawp version
 
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
แบบเสนอโครงร่างโครงงานคอมพิวเตอร1
 
ใบงานที่ 11
ใบงานที่ 11ใบงานที่ 11
ใบงานที่ 11
 
ใบงานที่ 11
ใบงานที่ 11ใบงานที่ 11
ใบงานที่ 11
 
加速器と素粒子物理での超?低レイヤー
加速器と素粒子物理での超?低レイヤー加速器と素粒子物理での超?低レイヤー
加速器と素粒子物理での超?低レイヤー
 
Tarun Kumar Thesis 2
Tarun Kumar Thesis 2Tarun Kumar Thesis 2
Tarun Kumar Thesis 2
 
Rscon4 presentation on Genius Hour
Rscon4 presentation on Genius HourRscon4 presentation on Genius Hour
Rscon4 presentation on Genius Hour
 
Interning in Silicon Valley
Interning in Silicon ValleyInterning in Silicon Valley
Interning in Silicon Valley
 
Unit 10: XML and Beyond (Sematic Web, Web Services, ...)
Unit 10: XML and Beyond (Sematic Web, Web Services, ...)Unit 10: XML and Beyond (Sematic Web, Web Services, ...)
Unit 10: XML and Beyond (Sematic Web, Web Services, ...)
 

Similar to Web Technologies Unit 2 Overview

[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)Carles Farré
 
Introduction to Basic Concepts in Web
Introduction to Basic Concepts in WebIntroduction to Basic Concepts in Web
Introduction to Basic Concepts in WebJussi Pohjolainen
 
Web programming by Najeeb ullahAzad(1)
Web programming by Najeeb ullahAzad(1)Web programming by Najeeb ullahAzad(1)
Web programming by Najeeb ullahAzad(1)azadmcs
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systemsReza Gh
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
shobhit training report (3) (4).pdf report
shobhit training report (3) (4).pdf reportshobhit training report (3) (4).pdf report
shobhit training report (3) (4).pdf reportpoojaranga2911
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web ArchitectureChamnap Chhorn
 
introduction_to_web_technology.pdf
introduction_to_web_technology.pdfintroduction_to_web_technology.pdf
introduction_to_web_technology.pdfVishwanathBurkpalli
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniquesguest8899ec02
 
Web Landscape - updated in Jan 2016
Web Landscape - updated in Jan 2016Web Landscape - updated in Jan 2016
Web Landscape - updated in Jan 2016Jack Zheng
 
HTTP and Website Architecture and Middleware
HTTP and Website Architecture and MiddlewareHTTP and Website Architecture and Middleware
HTTP and Website Architecture and MiddlewareAbdul Jalil Tamjid
 
internet principles of operation By ZAK
internet principles of operation By ZAKinternet principles of operation By ZAK
internet principles of operation By ZAKTabsheer Hasan
 

Similar to Web Technologies Unit 2 Overview (20)

[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
 
Introduction to Basic Concepts in Web
Introduction to Basic Concepts in WebIntroduction to Basic Concepts in Web
Introduction to Basic Concepts in Web
 
Web
WebWeb
Web
 
HTTP & HTML & Web
HTTP & HTML & WebHTTP & HTML & Web
HTTP & HTML & Web
 
Web programming by Najeeb ullahAzad(1)
Web programming by Najeeb ullahAzad(1)Web programming by Najeeb ullahAzad(1)
Web programming by Najeeb ullahAzad(1)
 
HTTP1.1/2 overview
HTTP1.1/2 overviewHTTP1.1/2 overview
HTTP1.1/2 overview
 
Www and http
Www and httpWww and http
Www and http
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systems
 
Spider Course Day 1
Spider Course Day 1Spider Course Day 1
Spider Course Day 1
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web engineering
Web engineeringWeb engineering
Web engineering
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
shobhit training report (3) (4).pdf report
shobhit training report (3) (4).pdf reportshobhit training report (3) (4).pdf report
shobhit training report (3) (4).pdf report
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 
introduction_to_web_technology.pdf
introduction_to_web_technology.pdfintroduction_to_web_technology.pdf
introduction_to_web_technology.pdf
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniques
 
Web Landscape - updated in Jan 2016
Web Landscape - updated in Jan 2016Web Landscape - updated in Jan 2016
Web Landscape - updated in Jan 2016
 
HTTP and Website Architecture and Middleware
HTTP and Website Architecture and MiddlewareHTTP and Website Architecture and Middleware
HTTP and Website Architecture and Middleware
 
internet principles of operation By ZAK
internet principles of operation By ZAKinternet principles of operation By ZAK
internet principles of operation By ZAK
 

More from DSBW 2011/2002 - Carles Farré - Barcelona Tech (10)

Unit 09: Web Application Testing
Unit 09: Web Application TestingUnit 09: Web Application Testing
Unit 09: Web Application Testing
 
Unit 08: Security for Web Applications
Unit 08: Security for Web ApplicationsUnit 08: Security for Web Applications
Unit 08: Security for Web Applications
 
Unit 07: Design Patterns and Frameworks (3/3)
Unit 07: Design Patterns and Frameworks (3/3)Unit 07: Design Patterns and Frameworks (3/3)
Unit 07: Design Patterns and Frameworks (3/3)
 
Unit 07: Design Patterns and Frameworks (2/3)
Unit 07: Design Patterns and Frameworks (2/3)Unit 07: Design Patterns and Frameworks (2/3)
Unit 07: Design Patterns and Frameworks (2/3)
 
Unit 07: Design Patterns and Frameworks (1/3)
Unit 07: Design Patterns and Frameworks (1/3)Unit 07: Design Patterns and Frameworks (1/3)
Unit 07: Design Patterns and Frameworks (1/3)
 
Unit 06: The Web Application Extension for UML
Unit 06: The Web Application Extension for UMLUnit 06: The Web Application Extension for UML
Unit 06: The Web Application Extension for UML
 
Unit 05: Physical Architecture Design
Unit 05: Physical Architecture DesignUnit 05: Physical Architecture Design
Unit 05: Physical Architecture Design
 
Unit 04: From Requirements to the UX Model
Unit 04: From Requirements to the UX ModelUnit 04: From Requirements to the UX Model
Unit 04: From Requirements to the UX Model
 
Unit03: Process and Business Models
Unit03: Process and Business ModelsUnit03: Process and Business Models
Unit03: Process and Business Models
 
Unit 01 - Introduction
Unit 01 - IntroductionUnit 01 - Introduction
Unit 01 - Introduction
 

Recently uploaded

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Web Technologies Unit 2 Overview

  • 1. Unit 2: Web Technologies (1/2)‫‏‬  Core  Web browsers and web servers  URIs  HTTP  Client-Side  Basic: HTML, CSS  Advanced: JavaScript, DOM, AJAX, HTML 5, RIA  Server-Side technologies for Web Applications  CGI  PHP  Java Servlets  JavaServer Pages (JSPs)‫‏‬ dsbw 2011/2012 q1 1
  • 2. World Wide Web  “The World Wide Web (known as "WWW', "Web" or "W3") is the universe of network-accessible information, the embodiment of human knowledge” (W3C)‫‏‬  The Web was created in 1989 by Tim Berners-Lee and Robert Cailliau working at the European Organization for Nuclear Research (CERN) in Geneva.  The three basic components of the initial WWW proposal:  HTML: Markup language for formatting hypertext documents  URI: Uniform notation scheme for addressing accessible resources over the network  HTTP: Protocol for transporting messages over the network dsbw 2011/2012 q1 2
  • 3. World Wide Web: Typical Interaction http://www.essi.upc.edu Departament d’ESSI 1 4 index.html BROWSER WEB SERVER 3 2 GET /index.html FTP DNS … HTTP HTTP … TCP TCP port 80 5 IP IP 147.83.20.44 Physical Net dsbw 2011/2012 q1 3
  • 4. The Universal Client: The Web Browser  Web Browsers provide an –usually graphical- interface to obtain, interpret, format and render HTML documents.  HTML documents usually have links, hyperlinks, to other documents  Each link is encoded through an URI (Uniform Resource Identifier)‫‏‬  HTML documents may contain images, audio files, etc that are also referred through URIs and that are rendered jointly by the browser.  Other features:  Cache, bookmarks, printing, off-line operation, …  Client-side scripting support: JavaScript/ VBscript  RIA support  Helper Applications  Plug-ins dsbw 2011/2012 q1 4
  • 5. The Web Server  Web Servers “listen to” a TCP port -usually 80- waiting for a client (web browser) to initiate a connection.  Once the connection is established, the web browser sends a request and the web server returns a response. Then the connection is released  HTTP is the protocol that defines such a request/response communication  Initially, requests were about “static” resources -HTML documents, binary pictures, etc- stored in files reachable by the web server.  Other features:  Logging  Server-side scripting: CGI, FastCGI, SSI, ASP.NET, Java Web Containers, PHP, etc. dsbw 2011/2012 q1 5
  • 6. Uniform Resource Identifier (URI)‫‏‬  “The Web is an information space. Human beings have a lot of mental machinery for manipulating, imagining, and finding their way in spaces. URIs are the points in that space” (W3C)‫‏‬  A URI is a compact sequence of characters that identifies an abstract or physical resource. Its generic syntax defines four parts: <scheme name> : <hierarchical part> [ ? <query> ] [ # <fragment> ]  Example: http://user:pass@example.com:992/animal/bird?species=seagull#wings login host port authority path scheme hierarchical part query fragment dsbw 2011/2012 q1 6
  • 7. URLs, URNs and IRIs  A "Uniform Resource Locator" (URL) is a URI that provides also a mean for locating the resource by describing its primary access mechanism. Examples: ftp://ftp.is.co.za/rfc/rfc1808.txt ldap://[2001:db8::7]/c=GB?objectClass?one mailto:John.Doe@example.com ed2k://|file|Jim%20Conallen%20-%20Building%20Web%20Applications%20 with%20UML%202nd%20Ed.chm|6685541|74112A8EDD20B521B4BCB0 52D0416FE7|/  A "Uniform Resource Name" (URN) refers to a URI under the "urn" scheme (e.g urn:isbn:1892295490) or to any other URI with the properties of a name  The Internationalized Resource Identifier (IRI) is a URI that may contain characters from the Universal Character Set (Unicode/ISO 10646)‫‏‬ dsbw 2011/2012 q1 7
  • 8. HyperText Transfer Protocol (HTTP)‫‏‬  HTTP is the transfer protocol used throughout the Web: It specifies what messages web browsers may send to servers and what responses they get back in return.  Typical interaction (HTTP/1.0 or lower):  Web browser establishes a TCP/IP connection with the target Web server  Web browser sends a HTTP ASCII request over the TCP/IP connection.  Web server returns a HTTP MIME-like response and releases the TCP/IP connection  HTTP/1.1 improvements:  Persistent connections: several request/response interactions in a single connection.  Request pipelining: multiple HTTP requests are sent without waiting for the corresponding responses. dsbw 2011/2012 q1 8
  • 9. The HTTP Request <METHOD> <Resource_Path> <HTTP_Version> <CR> // Request ( <Attribute>: <Value> <CR> )* // Parameters <CR> // Blank line [Body] // If needed  METHOD := GET | POST | HEAD | …  Example: GET /index.html HTTP/1.1 Host: www.essi.upc.edu // Compulsory if HTTP/1.1 dsbw 2011/2012 q1 9
  • 10. The HTTP Response <HTTP_Version> <Result_Code> [explanation] <CR> ( <Attribute>: <Value> <CR> )* <CR> [Body]  Result_Code := 200 [OK] | 400 [Bad Request] | 404 [Not found] | …  Example: HTTP/1.1 200 OK Date: Fri, 19 Feb 2010 16:48:36 GMT Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/4.4.9 mod_perl/2.0.4 Perl/v5.8.9 Last-Modified: Tue, 02 Feb 2010 14:36:59 GMT ETag: "22a7f-4270-47e9f08d3ad1f" Accept-Ranges: bytes Content-Length: 17008 Content-Type: text/html <HTML>… </HTML> dsbw 2011/2012 q1 10
  • 11. HTTP: Two Important Remarks  HTTP is stateless:  The Web Server handles each HTTP request independently and there is no easy way to keep track of each client request and to associate it with a previous one.  However, managing state is important for many applications: a single use case scenario often involves navigating through a number of Web pages. Without a state management mechanism, you would have to continually supply all previous information entered for each new Web page.  HTTP is one-way:  Clearly separated roles: Clients -Web browsers- make requests to -Web- Servers, no vice versa. dsbw 2011/2012 q1 11
  • 12. HyperText Markup Language (HTML)‫‏‬  HTML is the main publishing language of the Web.  HTML is based on SGML (Standard Generalized Markup Language, ISO 8879)‫‏‬  HTML Document = Content (mostly text) + Markup  HTML Markup allows to define  How content must be structured  How to render each piece of structured content  Links to other HTML documents  Embedded objects: images, audio, video, forms, scripts, applets, …  Markup is performed using tags: <TAG (ATRIBUTE=VALUE)*> Content </TAG> dsbw 2011/2012 q1 12
  • 13. HTMLs  Despite an strong effort for standardization …  Hypertext Markup Language (First Version), published as an Internet Engineering Task Force (IETF) working draft (June 1993).  HTML 2.0, IETF RFC 1866 November (1995)‫‏‬  HTML 3.2, W3C Recommendation (January 1997)‫‏‬  HTML 4.0, W3C Recommendation (December 1997)‫‏‬  HTML 4.01, W3C Recommendation (December 1999)‫‏‬  ISO/IEC 15445:2000, based on HTML 4.01 Strict (May 2000)‫‏‬  XHTML 1.0, W3C Recommendation (Published January 2000, revised August 2002)‫‏‬  XHTML 1.1, W3C Recommendation (May 2001)‫‏‬  XHTML 2.0, W3C Working Draft (July 2006)‫‏‬Abandoned in 2009  (X)HTML 5.0 W3C Working Draft  … HTML programmers are constantly faced with the problem of using HTML features that are not supported consistently, if at all, across all the target browser platforms. dsbw 2011/2012 q1 13
  • 15. HTML Forms: Processing dsbw 2011/2012 q1 15
  • 16. Cascading Style Sheets (CSS)‫‏‬  Some HTML markup already defines how to render the affected content …  … however, CSS is preferable because:  provide more flexibility and control in the specification of presentational characteristics.  enable a clean separation of document content from document presentation.  allow the reuse of a same style sheet in different HTML documents: shared look and feel.  Cascading here refers to a priority scheme to determine which style rules apply if more than one rule matches against a particular element. (≈ polymorphism rules in OO generalization hierarchies). dsbw 2011/2012 q1 16
  • 17. CSS: Ways of Use (1/2)‫‏‬  Inline <h1 style="color: red;">CSS test</h1> <p style="font-size: 12pt; font-family: Verdana, sans- serif">This a test to show the different ways of using <em style="color: green;">Cascading Style Sheets</em>.</p>  Embedded <html> <head> <STYLE TYPE="text/css"> H1 { color: red} P { font-size: 12pt; font-family: Verdana, sans-serif;} EM { color: green} </STYLE> </head> <body> </body> </html> dsbw 2011/2012 q1 17
  • 18. CSS: Ways of Use(2/2)‫‏‬  Linked <html> <head> <LINK REL="STYLESHEET" HREF="prova.css" TYPE="text/css"> </head>  Imported <html> <head> <STYLE> @import url(http://localhost/prova.css); @import url(prova2.css); </STYLE> </head> dsbw 2011/2012 q1 18
  • 19. JavaScript  JavaScript is an interpreted programming language that allows to embed executable code -scripts- into a HTML document.  Such scripts are executed by the web browser when rendering the HTML document.  JavaScript is a “light” version of Java:  Type control is not strong.  There are “objects”, but programmers cannot define their own classes.  ECMAScript: JavaScript “Standard” (ECMA-262 specification and ISO/IEC 16262). Main dialects:  JavaScript (it’s a trademark of Sun Microsystems, used under license by Netscape and Mozilla)  Microsoft’s JScript  Adobe’s ActionScript dsbw 2011/2012 q1 19
  • 20. JavaScript: What Can It Do?  Put dynamic text into an HTML page  Interact with the web browser: open new windows, show alerts, redirect to another URI, etc.  Read and write HTML elements (e.g. form fields)‫‏‬  Validate form data  Handle events : onClick, onLoad, onMouseOver, onMouseOut, onSubmit, etc.  Create/read/write cookies  Cookie: information sent by a server to a web browser and then sent back unchanged by the browser each time it accesses that server. Cookies are used for authenticating, tracking, and keeping data about users.  Interact with applets dsbw 2011/2012 q1 20
  • 21. JavaScript: Example <html><head><title>La Data d’avui</title> <script language="JavaScript"> function print_todays_date()‫‏‬ { today = new Date(); days_ca = new Array("Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"); months_ca = new Array("gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"); document.write(days_ca[today.getDay()]+", "); document.write(today.getDate()+" de "); document.write(months_ca[today.getMonth()]+" de "); document.write(today.getFullYear());} </script></head> <body> <hr>La data d’avui &eacute;s:<br><b> <script language="JavaScript"> print_todays_date(); </script> </b><hr></body></html> dsbw 2011/2012 q1 21
  • 22. Document Object Model / DHTML  DOM “is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents. The document can be further processed and the results of that processing can be incorporated back into the presented page”. (W3C)‫‏‬  HTML/XML documents and their inner elements are handled as objects with data and behavior (operations). The whole structure is represented -and accessed- as a object tree.  Dynamic HTML (DHTML): “is a term used by some vendors to describe the combination of HTML, style sheets and scripts that allows documents to be animated” (W3C).  Examples: www.w3schools.com/dhtml/ dsbw 2011/2012 q1 22
  • 23. DOM: Object tree dsbw 2011/2012 q1 23
  • 24. AJAX  Asynchronous JavaScript And XML  It is indeed a “mix” of – previous – technologies:  standards-based presentation using (X)HTML and CSS;  dynamic display and interaction using DOM;  data interchange and manipulation using XML and XSLT;  asynchronous data retrieval using XMLHttpRequest;  and JavaScript binding everything together. dsbw 2011/2012 q1 24
  • 25. AJAX: before and after before after  The browser sends a request to  User interaction with the current the server whenever the user page displayed by the browser selects a link or fills a form. triggers presentation events  Event handlers may perform  The web browser remains idle asynchronous calls to the server while the server is processing the to request new/updated data. request and building the response.  Such calls are sent to and processed by the server without  The response – a whole HTML end users noticing it. The web page – is completely build on the browser is not idle server side.  Server response is minimal (not a whole HTML page)‫‏‬  The new data is incorporated dynamically on the current page with JavaScript + DOM (DHTML)‫‏‬ dsbw 2011/2012 q1 25
  • 26. AJAX: Example Server Script: /validate _ajax.send() Get parameters…do some work XMLHttpRequest Return something… a text message an XML document function doResp() { an HTML snippet if _ajax.readyState == 4 and a javascript method _ajax.status != 200 { whatever you want… div=document.getElementById(‘status’) div.innerHTML = _ajax.responseText; Message onChange event: status=999 _ajax = new XMLHTTPRequest(); msg=Not a valid name _ajax.onreadystatechange = doResp; url = ‘./validate?field=’ +this.name+‘&value=’+this.value; _ajax.open(‘GET’, url, true ) Manolito Database Name: Not a valid name Web Browser Web Server dsbw 2011/2012 q1 26
  • 27. AJAX: uses  Auto-complete  Full words are suggested as the user types the first letters  Progress bar  To show the status of the “work in progress” in the server side  “Real-time” validation of forms  Without needing to fill all the form fields  Updating the information displayed on the current page  Without “refresh”  Rich Internet Applications (RIA)‫‏‬ dsbw 2011/2012 q1 27
  • 28. AJAX: Some considerations  The XMLHttpRequest object only can make requests to the same server that provided the web page  AJAX Programming “from scratch” is not advised.  Unexpected results when pressing the Back and Refresh buttons of the browser.  Downloading time takes longer as AJAX-enabled pages require larger amounts of code.  Debugging gets harder as code is executed in both browser and server sides  AJAX code is visible, prone to be copied and hacked.  Servers may get overloaded for abuse of asynchronous calls. dsbw 2011/2012 q1 28
  • 29. HTML 5  History:  Project started by the Web Hypertext Application Technology Working Group (WHATWG) in 2004:  Web Applications 1.0  Web Forms 2.0  In conjunction with the W3C since 2007  Main objective: Provide good support for modern documents and web applications (The browser as web application platform).  Other objectives:  Support legacy web content and provide backward compatibility  Cover common modern browser functionality  Make web content authoring more uniform  Clarify processing model dsbw 2011/2012 q1 29
  • 30. HTML 5 Features  New markup  Structure: section, article, header, footer, ...  Multimedia: audio, video, embed, ...  Graphics: canvas, figure, ...  New API’s  Timed media playback: embed interactive video and audio easily, without plugins  Offline Web applications: ApplicationCache  Client-side data storage: per-session (sessionStorage) and persistently across sessions (localStorage and client-side SQL database storage)  Document editing, Drag-and-drop, etc.  More flexibility in handling syntax errors dsbw 2011/2012 q1 30
  • 31. HTML 5 Forms (formerly Web Forms 2.0)  Features:  New input types  Basic client side validation  Repetition blocks  Access to remote data (for e.g. select elements)  Examples: <input type="email” value="a@b"> <input pattern="[1-9]{10}" value="1234567891"> <input type="number" min="7" max="25” step="2"> <input type="date” required> dsbw 2011/2012 q1 31
  • 32. Rich Internet Applications (RIA)‫‏‬  RIA are Web applications that have the features and functionality of traditional desktop applications, by executing most of their - rich -user interfaces on the client side.  Indeed, the RIA paradigm is a new version of the Remote User Interface pattern for Client/Server architectures  RIAs typically:  run in a Web browser with/without extra software installation  run locally in a secure environment called a sandbox  “First generation” RIA platforms:  Java Applets, (Microsoft) ActiveX Controls, (Macromedia) Flash  “Second generation” RIA platforms:  AJAX (frameworks), Adobe Flex/AIR, JavaFX, (Microsoft) Silverlight, OpenLaszlo, … dsbw 2011/2012 q1 32
  • 33. Java Applets: Example <html> <head> <title>TicTacToe v1.1</title> </head> <body> <center> <h1>TicTacToe v1.1</h1> <hr> <OBJECT codetype="application/java" classid="java:TicTacToe.class" width=120 height=120> </OBJECT> </center> </body> </html> dsbw 2011/2012 q1 33
  • 34. References  SHKLAR, Leon et al. Web Application Architecture: Principles, Protocols and Practices, Second Edition. John Wiley & Sons, 2009.  www.w3c.org  www.w3schools.com  http://www-128.ibm.com/developerworks/ dsbw 2011/2012 q1 34