Internet and Web Applications
Internet and Web Applications
Introduction
Content
Internet applications
BitTorrent Git Subset of important
(File distribution system) (Version management) • applications,
• mechanisms,
… • protocols and
• languages
that are associated
Web applications with these two
categories will be
Web search engines Web feeds
discussed in the
lecture
Weblogs …
slide 2
Content
1. Introduction
2. Basic aspects of Web applications
3. Interaction models in the World Wide Web
4. Extensible Stylesheet Language / Cascading Style Sheets
5. Semantic Web
6. Web Application Frameworks
7. Subscription Services
8. Web Crawling and Web Search
9. Content and File Management, Wikis
10.File Sharing
11. Load Balancing and Content Distribution
12. Business Models
slide 3
Web
Application protocol
(Hypertext Transfer Protocol)
Web
slide 4
Web 2.0
• Web 2.0 is a buzzword for describing modern forms of
applications and services that are accessible by the web browser
such as wikis or weblogs
• These applications often have a high social component and
appealing user interfaces in common and are based on enhanced
interaction models and new document representations discussed
in this lecture
Protocol improvements
Ajax
Application protocol
Comet / HTTP Streaming
(Hypertext Transfer Protocol)
Increasing importance Web Sockets
of client-side logic Social
communities
New business Web 2.0
models Social software
...
Document description format
Document addressing mechanism
(Uniform Resource Identifiers)
(X)HTML RSS Atom RDF HTML5 …
slide 5
Web 3.0
“I have a dream for the Web [in which computers] become capable of
analyzing all the data on the Web – the content, links, and
transactions between people and computers. A ‘Semantic Web’, which
should make this possible, has yet to emerge, but when it does, the
day-to-day mechanisms of trade, bureaucracy and our daily lives will
be handled by machines talking to machines. The ‘intelligent agents’
people have touted for ages will finally materialize.”
(Tim Berners-Lee, inventor of the original World Wide Web in Weaving
the Web ISBN 0-7528-2090-7)
slide 6
Department of Computer Science Institute for System Architecture, Chair for Computer Networks
Basic knowledge
Outline
slide 8
XML
Extensible Hypertext
Markup Language
(XHTML) XML Serialization of the
Extensible Stylesheet Resource Description
language Framework (RDF)
(XSL)
Really Simple
Syndication …
(RSS)
Root element
bookstock Element content
Parent element of
“author”, “title”, “isbn” book book book
id=42 id=43 id=44
Child element of
author title isbn … node “bookstock”
Parameter “id”
text text text
Three siblings with value “44”
(sister elements) Simple content
slide 10
slide 12
XML namespaces
<datafile>
<author>Charlie Brown</author>
<title>Book list</title> If a computer program
<bookstock> should find all book
<book> titles and scans the
<title>TCP/IP Illustrated</title> XML file for “title”
<author>W.R. Stevens</author> elements it assumes
<isbn>0201633469</isbn>
the data file’s title to
<price>41,89</price>
</book> be a book title
</bookstock>
</datafile>
slide 13
XML namespaces Imports namespace and binds
it to prefix
<datafile xmlns:a="http://www.example.com/doc/"
xmlns:b="http://www.example.com/myNs/" >
<a:author>Charlie Brown</a:author>
<a:title>Book list</a:title>
<b:bookstock> No name conflicts
<b:book> occur because
<b:title>TCP/IP Illustrated</b:title> elements are bound
<b:author>W.R. Stevens</b:author> to different
<b:isbn>0201633469</b:isbn> namespaces
<b:price>41,89</b:price>
</b:book>
</b:bookstock>
</datafile>
slide 15
XML validity
2. XML Schema
• XML dialect that enables definition of various data
types
• Defines two categories of types:
– Simple types (such as string, integer etc.)
– Complex types (such as sequences of other types)
slide 16
XHTML
slide 17
XHTML example
slide 18
DOM
bookstock
slide 19
getElementsByTagName returns a list of elements that have the given element name
SAX
// Application (SAX handler excerpt) SAX Parser
public void startDocument (){
System.out.println("Start document");
} <?xml version="1.0">
R
public void startElement (…){
… <bookstock> E
} Text A
public void characters (…){ </bookstock> D
…
}
public void endElement (…){
…
}
public void endDocument (){
System.out.println("End document");}
• The Simple API for XML is a event-based mechanism for XML processing
• Principle:
1. A program that e.g. is intended to extract information from an XML file
registers event handlers at a SAX parser
2. The parser reads the XML document sequentially from the beginning to
the end
3. Every time the parser reads an element, attribute, special character etc.
it generates an event that is delegated to the associated event handler
slide 20
which then may extract wanted information
SAX example
Program Logic
(JavaScript) Interpret document
2 slide 23
Content type
…
Header part
of received Content-Type: application/xml Message received
message Content-Length: 136713 by a client
…
Content
slide 24
Content type
Server 1 Client
Request document (Web Browser)
slide 25
JavaScript
direct access
Web browser File system
Network resources
JavaScript engine
…
slide 27
CSS
slide 28
CSS
main.css index.html
input{ font-size: 110%; <head>…
color: red; <link rel="stylesheet" href="main.css">
background: #ffff00; } </head>
.top{ padding-top: 20px; } <body>
p{ font-size: 16pt; <div class="top">
font-family: "Garamond", serif; <img src="/banner.jpg"/>
font-weight: bold; } </div>
#fat { font-weight: bold; } <p class="top">
Welcome to the Samoa Webmailer Service!
</p>
<div id="fat">
20 Please enter mail address and password.</div>
pixel <form method="post" action="login">
<input type="text" name="id"/><br/>
<input type="password" name="password"/>
<br/><input type="submit" value="login"/>
</form>
</body>
20
pixel
bold; Garamond as font
bold
Further Links
YAML-Spezifikation http://www.yaml.org/spec/1.2/spec.html
SAX home http://www.saxproject.org/
JavaScript https://developer.mozilla.org/en/About_JavaScript
at mozilla.org