Title: BSc Computer Science QM3
1BSc Computer ScienceQM3
2Course Aim Learning Outcome
- The aim of this course is to provide a practical
overview of different elements in multimedia.
3Course Topics
- Semester 1
- Introduction to the Internet
- Introduction to Markup Languages
- Planning your website
- XHTML Authoring
4Semester 2 3
- Image processing
- color modes
- pixel point pixel group processing
- Sound for multimedia
- digital sound
- Sound synthesis
5Semester 3
- Putting it all together.
- An introduction to the Pure Data programming
language. - The use of sensors and microcontrollers in
interactive multimedia.
6Lectures
- From 7 to 10pm in room 20 in westland square
- Time will normally be split between lecture and a
computer LAB.
7Course website
- www.cs.tcd.ie/Nicholas.Ward/qm3/index.htm
8What is the Internet?
- The largest computer network in the world.
- Actually a network of networks a collection of
more than 200,000 individual computer networks
owned by governments, universities, non profit
groups, and companies.
9What is the Internet?
- These interconnected networks can communicate
because they all use the same, non proprietary
standards and protocols. - They are connected via high-speed long-distance
backbone networks.
10What is the Internet?
- The Internet has opened up exciting new
possibilities that challenge traditional ways or
interacting, communicating, and doing business. - Electronic networks form the key infrastructure
of the twenty-first century, as critical to
business success and national economic
development as the railroads were in Morses era
Alvin Toffler, Powershift
11Evolution of the Internet
- Began as one network ARPANET.
- A 1969 US govt. experiment in packet-switched
networking. - ARPA Department of Defence Advanced Research
Projects Agency.
12Evolution of the Internet
- Originally linked a largely technical audience
composed of the military, government agencies,
and academic researchers and scientists. - Aim to allow researchers to share computing
resources and exchange information regardless of
their locations, and to create a resilient
fault-tolerant, wide area network for military
communications.
13Evolution of the Internet
- ARPANET split into 2 networks in the early 1980s
ARPANET and Milnet (an unclassified military
network), but connections allowed communication
to continue. - Cooperative, decentralised networks such as UUCP
(a worldwide UNIX communications network) and
USENET (Users Network) originated in the late
70s.
14Evolution of the Internet
- These initially served the academic community but
later catered for commercial organisations. - In the early 80s more networks such as the
Computer Science Network (CSNET) began providing
networking to the academic and research
communities.
15Evolution of the Internet
- These networks were not part of the Internet, but
special connections were made to allow the
exchange of information between the networks. - The National Science Foundation Network (NSFNET)
originated in 1986 and linked researchers with
five supercomputer centres.
16Evolution of the Internet
- The seamless internetworking of all these
networks gave rise to the Internet we know today. - Where Wizards Stay Up Late The Origins of the
Internet by Katie Hafner, Matthew LyonTouchstone
Books ISBN 0684832674 Reprint edition (January
1998)
17The Infrastructure of the Internet
- Although the Internet began as a government
project commercial communications companies now
largely provide the physical network backbone of
the internet. - The Internet infrastructure is supplied by
network providers, such as UUNET, an MCI WorldCom
company, GTE Internetworking, Sprint and others.
18The Infrastructure of the Internet
- Businesses and individual subscribers connect to
the Internet through these and other, smaller
Internet service providers. - Both backbone and access providers are referred
to as Internet Service Providers (ISPs). - These charge customers for various combinations
of bandwidth, traffic, and access time.
19The Infrastructure of the Internet
- Backbone providers are connected to one another
and to access providers over backbone networks. - The various back bone networks that make up the
Internet transmit information to one another on a
reciprocal basis i.e. each carrier agrees to
transport traffic originating on another
carriers network.
20The Infrastructure of the Internet
- Historically this has been done without charge
although this is now changing due to growing
demands. - Example Suppose Fred in New York wants to send
an e-mail to Susan across the Internet. Fred is a
customer of ZIP a small ISP, and Susan is a
customer of another ISP.
21The Infrastructure of the Internet
- Step 1 To connect its customers to the Internet,
Zip contracts with a company that links Zip to
the rest of the Internet. Zip chooses one of the
smaller companies, Frontier. - Spep 2 Zip sends its traffic to Frontier, but
Frontiers network is not linked to Susans ISP,
so Frontier needs to contract with another
Internet carrier to route Freds e-mail. There
are two ways that Frontier can connect to another
carrier as a peer or as a customer.
22The Infrastructure of the Internet
- Step 3 If two Internet carriers decide that they
are peers they exchange traffic with each other
for free. They do this either by connecting their
networks directly or by linking at a public
peering point (where dozens of Internet carriers
set up their communications equipment side by
side and share traffic).
23The Infrastructure of the Internet
- Step 4 If one Internet backbone provider is not
accepted as a peer by another, the rejected
company has to become a customer in order to send
data across the other companys network.
24Zip
Frontier
Public peering
Peer
customer
Public peering point
Public peering
MCI
Frontier
Peer
Peer
Peer
ISP
WorldCom
Sprint
Peer
Susan
25The Operation of the Internet
- Packet Switching Breaks up blocks of text into
small, fixed bundles of data called packets. - Each packet travels independently through the
network - Packets of data originating at one source can be
routed through different paths in the network,
and then reassembled into the original message
when they reach their destination.
26The Operation of the Internet
- TCP/IP The set of rules used to send and receive
packets from one machine to another over the
Internet. - TCP (Transmission Control Protocol) Converts
messages to packets at source and reassembles
them at destination. - IP Internet Protocol Handles the addressing,
ensures packets can be switched across multiple
nodes.
27Addresses on the Internet
- Each computer on the Internet has an assigned
address know as an IP(Internet Protocol) Number -
a set of 4 numbers in the range 0 - 255
xxx.xxx.xxx.xxx - (e.g. 135.62.128.91)
- Most computers also have names (easier to
remember). These are derived from the domain name
system (DNS).
28Addresses on the Internet
- DNS is a collection of servers on a TCP/IP
network. - Resolves the text names used with the numberical
IP address that computers use. - Arranged as a hierarchical database, with
authority for naming handed from root servers
responsible for top level domains down to lower
sub-domains.
29Addresses on the Internet
- All Internet destinations that can be found by
name require an entry on a DNS server. - This process is the foundation for message
delivery and navigation on the Internet.
30Addresses on the Internet
- Stages
- Request for an Internet name is submitted to a
DNS server. - Server checks its info and attempts to respond
with appropriate IP Number. - If server cant respond, request directed to one
of the top level DNS servers. - Request sent down the Domain Name System
hierarchy - Response sent to request originator when an
authoritative DNS for the domain and the machine
are found.
31Addresses on the Internet
- Domain names consist of multiple parts.
- Eg. software.ibm.com com (the rightmost part
of the name) is the name of the top-level
specification/domain or the zone. - For a list of top level domains
http//www.iana.org/domain-names.htm
32Services Provided by the Internet
- Communications Services
- E-mail
- USENET Newgroups/forums A protocol that
delineates how groups of messages can be stored
on and sent between computers. International
discussion groups in which people share
information and ideas on a particular topic.
33Services Provided by the Internet
- LISTSERV When e-mail is addressed to a LISTSERV
mailing list, it is automatically broadcast to
everyone on the list. The result is similar to a
newsgroup or forum, except that the messages are
transmitted as e-mail and are therefore available
only to individuals on the list. - Chatting Allows two or more people who are
simultaneously connected to the Internet to hole
live (real-time) interactive written
conversations. Internet relay chat (IRC) is a
general chat program for the Internet
34Services Provided by the Internet
- Instant Messaging A type of communications
service that enables you to create a private chat
room with another individual. Typically, the
instant messaging system alerts you whenever
somebody on your private list is online. You can
then initiate a chat session with that particular
individual. - Telnet Allows users to be on one computer while
doing work on another. A protocol that
establishes an error-free link between the two
computers.
35Services Provided by the Internet
- Internet Telephony A category of hardware and
software that enables people to use the Internet
as the transmission medium for telephone calls.
Lets users talk across the Internet to any
personal computer equipped to receive the call
for the price of only the Internet connection.
Also called Voice over IP or VoIP) - Internet Fax The use of the Internet for
real-time fax transmissions. Useful because faxes
can be sent long distance at local telephone
rates delivery can be guaranteed through store
and forward mechanisms.
36Services Provided by the Internet
- Streaming Audio and Video Streaming allows
Internet users to see and hear data as it is
transmitted from the host server instead of
waiting until the entire file is downloaded. - Real-Time Audio and Video The transmission from
the source is live or only slightly delayed. E.g.
video conferencing, live broadcasts of news etc.
37Services Provided by the Internet
- Information Retrieval Services
- File Transfer Protocol (FTP) Enables users to
access a remote computer and retrieve files from
it. - Archie A tool that allows users to search the
files at FTP sites. It regularly monitors
hundreds of FTP sites and updates a database
(called an Archie server) on software, documents,
and data files available for downloading.
38Services Provided by the Internet
- Gophers A system that pre-dates the World Wide
Web for organizing and displaying files on
Internet servers. A Gopher server presents its
contents as a hierarchically structured list of
files. With the ascendance of the Web, most
Gopher databases are being converted to Web sites
which can be more easily accessed via Web search
engines. - Veronica (Provides the capability for searching
for text that appears in gopher menus
39The World Wide Web
- Not the same as the Internet. The Internet
functions as the transport mechanism, and the
World Wide Web (the Web, WWW, or W3) is an
application that uses those transport functions. - A system with universally accepted standards for
storing, retrieving, formatting, and displaying
information via a client/server architecture. - Handles all types of digital information text,
graphics, sound, etc. Uses a graphical user
interface v.easy to use.
40Introduction to the Web Model
- 4 essential concepts you need to understand
- Uniform Resource Locators, or URLs
- The Hypertext Transfer Protocol (HTTP)
- Hypertext Markup Language, or HTML/XHTML
- Cascading Stylesheets, or CSS
41Uniform Resource Locators / URLs
- To access a Web site, the user must specify a
uniform resources locator (URL), which points to
the address of a specific resource on the web. - URL the global address of documents and other
resources on the World Wide Web. - Refers to a naming scheme for specifying how and
where to find any Internet resource, such as
those available from HTTP, FTP, or news servers.
42Uniform Resource Locators / URLs
- Eg. The URL that references the important file
bunny_hop.html in the directory pub/web/browsers
on the HTTP server www.w3.org is simply
httpwww.w3.org/pub/web/browsers/bunny_hop.html. - The prefix http references the fact that the
resource is on a http server while the remaining
part defines the resource being requested (e.g
the file bunny_hop.html) and also often names the
location (including the name of the computer) of
the resource. - So A URL names where a resource is on the
Internet and how to get it.
43Hypertext Transfer Protocol (HTTP)
- Hypertext Transfer Protocol (HTTP) the
communications standard used to transfer pages
across the WWW portion of the Internet. It was
designed expressly for the rapid distribution of
hypertext documents. - It defines how messages are formatted and
transmitted and what actions web servers and
browsers should take in response to various
commands.
44Hypertext Transfer Protocol (HTTP)
- HTTP servers are designed specifically to
distribute hypertext documents to browsers and
also to let the browser send back information for
processing on the server. - Like most other Internet tools, HTTP is a
client-server protocol. In the client-server
model a client program (the web browser) running
on the users machine, sends a message requesting
service to the server program running on another
machine on the internet. The server responds to
the request by sending a message back to the
client.
45Hypertext Transfer Protocol (HTTP)
- In exchanging these messages the client and
server use a mutually-understood protocol. - FTP and News are other examples of Internet
client-server protocols all of which are
accessible to a WWW browser. However the HTTP
protocol was designed expressly for hypertext
document delivery.
46HyperText Markup Language (HTML)
- A standard hypertext language which formats
documents and incorporates hypertext links to
other documents stored on the same or different
computers. - This is the markup language with which the WWW
hypertext documents are written.
47HyperText Markup Language (HTML)
- HTML contains commands, called elements or tags
to mark text as headings, paragraphs, lists,
quotations, and so on. It also has tags for
including images within the documents, for
including fill-in forms that accept user input,
and, most importantly, for including hypertext
links connecting the document being read to other
documents or Internet resources. - Recently, the HTML language has been revised and
renamed XHTML. This is almost the same as HTML
but is designed to work with new software based
on another language called the eXtensible Markup
Language (XML).
48Cascading Stylesheets (CSS)
- These control page layout and formatting.
- The markup language (HTML or XHTML) doesnt
actually define how a document should look. - Browsers that display such documents generally
have built in rules for how things should look,
but these rules are very simple and hard to
modify. As a result it is hard to create web
pages that have elegant designs and layouts
without using all sorts of special tricks and
images to get things looking the way you want.
49Cascading Stylesheets (CSS)
- CSS works with HTML to define how things should
look. While HTML and XHTML are languages that
describe the structure of a document, CSS defines
how these parts should be styled and can control
things like borders, margins, font properties,
position and so on.
50(No Transcript)
51Designing and Developing Web Pages
- Designing and Developing good web pages involves
both technical issues (proper construction of the
document) and design issues (ensuring the
information content is clearly presented to the
user). - This entails a good understanding of both HTML
and CSS. -
52Introduction to Markup Languages
- Historically, the word markup has been used to
describe annotation or other marks within a text
intended to instruct a compositor or typist how a
particular passage should be printed or laid out.
- Eg. wavy underlining to indicate boldface,
special symbols for passages to be omitted or
printed in a particular font and so forth.
53Introduction to Markup Languages
- As the formatting and printing of texts was
automated, the term was extended to cover all
sorts of special markup codes inserted into
electronic texts to govern formatting, printing,
or other processing. - Generalizing from that sense, we define markup as
any means of making explicit an interpretation of
a text.
54Introduction to Markup Languages
- By markup language we mean a set of markup
conventions used together for encoding texts. - A markup language must
- Specify what markup is allowed.
- What markup is required
- How markup is to be distinguished from text
- What the markup means.
55SGML
- SGML is an international standard for the
description of marked-up electronic text. - More exactly, SGML is a metalanguage, that is, a
means of formally describing a language, in this
case, a markup language.
56SGML
- SGML allows you to define your own tags, each of
which is used to mark a particular sort of
document element, such as a paragraph, section
heading or a list. - In SGML defining a tag consists of giving it a
name and some attributes and specifying some
restrictions on the context in which the tag can
be used.
57SGML
- In SGML the structure of a document is defined in
the Document Type Definition (DTD) . - A DTD describes how a document can be structured.
58Introduction to SGML
59Elements
- The technical term used in the SGML standard for
a textual unit, viewed as a structural component,
is element.
60- Within a marked up text (a document instance),
each element must be explicitly marked or tagged
in some way. - The standard provides for a variety of different
ways of doing this, the most commonly used being
to insert a tag at the beginning of the element
(a start-tag) and another at its end (an
end-tag).
61- The start- and end-tag pair is used to bracket
off the element occurrences within the running
text, in rather the same way as different types
of parentheses or quotation marks are used in
conventional punctuation. - For example, a quotation element in a text might
be tagged as follows
62- ... Rosalind's remarks This is the
silliest stuff that ere I heard of!
clearly indicate ...
63- As this example shows, a start-tag takes the form
, where the opening angle indicates the start of the start-tag, - name'' is the generic identifier of the
element which is being delimited, and the closing
angle bracket indicates the end of a tag. - An end-tag takes an identical form, except that
the opening angle bracket is followed by a
solidus (slash) character, so that the
corresponding end-tag would be .
64- The actual characters used for the delimiting
characters (the angle brackets, exclamation mark
and solidus) may be redefined, but it is
conventional to use the characters used in this
description.
65SGML An Example
- An element may be empty, that is, it may have no
content at all, or it may contain simple text.
More usually, however, elements of one type will
be embedded (contained entirely) within elements
of a different type.
66- An Example
- Consider a very simple structural model. Let us
assume that we wish to identify within an
anthology only poems, their titles, and the
stanzas and lines of which they are composed.
67- In SGML terms, our document type is the
anthology, and it consists of a series of poems. - Each poem has embedded within it one element, a
title, and several occurrences of another, a
verse,\ - each verse having embedded within it a number of
line elements.
68- Fully marked up, a text conforming to this model
might appear as follows
69-
- The SICK ROSE
-
- O Rose thou art sick.
- The invisible worm,
- That flies in the night
- In the howling storm
-
70-
- Has found out thy bed
- Of crimson joy
- And his dark secret love
- Does thy life destroy.
-
-
-
71- Considering our greatly over-simplified model of
a poem, we could state the following rules
72- An anthology contains a number of poems and
nothing else. - A poem always has a single title element which
precedes the first verse and contains no other
elements. - Apart from the title, a poem consists only of
verses. - Verses consist only of lines and every line is
contained by a verse. - Nothing can follow a verse except another verse
or the end of a poem. - Nothing can follow a line except another line or
the start of a new verse.
73-
- The SICK ROSE
-
- O Rose thou art sick.
- The invisible worm,
- That flies in the night
- In the howling storm
74-
- Has found out thy bed
- Of crimson joy
- And his dark secret love
- Does thy life destroy.
-
-
-
-
75- Before considering these rules further, you may
wish to consider how text marked up in the form
above could be processed by a computer for very
many different purposes.
76- A simple indexing program could extract only the
relevant text elements in order to make a list of
titles, or of words used in the poem text. - A simple formatting program could insert blank
lines between stanzas, perhaps indenting the
first line of each, or inserting a stanza number.
- Different parts of each poem could be typeset in
different ways.
77EXAMPLE DTD
- A DTD is expressed in SGML as a set of
declarative statements, using a simple syntax
defined in the standard. For our simple model of
a poem, the following declarations would be
appropriate
78An Example DTD
79- These five lines are examples of formal SGML
element declarations. - Each consists of three parts
- a generic name
- two characters specifying minimization rules
- a content model.
- Components of the declaration are separated by
white space, that is one or more blanks, tabs or
newlines.
80- The first part of each declaration gives the
generic identifier of the element which is being
declared, for example poem, title, etc.
81Minimization Rules
- determine whether or not start and end tags must
be present in every occurrence of the element
concerned. - They take the form of a pair of characters,
separated by white space, the first of which
relates to the start-tag, and the second to the
end-tag. In either case, either a hyphen or a
letter O (for omissible'' or optional'') must
be given
82- The hyphen indicates that the tag must be
present, - The letter O that it may be omitted.
- In this example, every element except must
have a start-tag. Only the and
elements must have end-tags as well.
83Content Model
- specifies what element occurrences may
legitimately contain. - Contents are specified either in terms of other
elements or using special reserved words. - There are several such reserved words, of which
by far the most commonly encountered is PCDATA,
as in this example. This is an abbreviation for
parsed character data, and it means that the
element being defined may contain any valid
character data.
84- But wait theres more!
- The content model has other bits in it.
85Occurrence Indicators
- Indicates how many times the element named in its
content model may occur. There are three
occurrence indicators in the SGML syntax,
conventionally represented by the plus sign, the
question mark, and the asterisk or star.
86- Occurrence indicators
- The plus sign means that there may be one or more
occurrences of the element concerned. - The question mark means that there may be at most
one and possibly no occurrence. - The star means that the element concerned may
either be absent or appear one or more times.
87Group Connectors
- The content model (TITLE?, VERSE) contains more
than one component, and thus needs additionally
to specify the order in which these elements (
and ) may appear. This ordering is
determined by the group connector (the comma)
used between its components.
88- There are three possible group connectors
- The comma means that the components it connects
must both appear in the order specified by the
content model. - The ampersand indicates that the components it
connects must both appear but may appear in any
order. - The vertical bar indicates that only one of the
components it connects may appear.
89Attributes
- In the SGML context, the word attribute, like
some other words, has a specific technical sense.
It is used to describe information which is in
some sense descriptive of a specific element
occurrence but not regarded as part of its
content.
90For example
91- An SGML processor can use the values of the
attributes in any way it chooses - A formatter might print a poem element which has
the status attribute set to draft in a different
way from one with the same attribute set to
revised. - Another processor might use the same attribute to
determine whether or not poem elements are to be
processed at all.
92- Attributes
- Like elements, attributes are declared in the
SGML document type declaration (DTD), using
rather similar syntax. - As well as specifying its name and the element to
which it is to be attached, it is possible to
specify (within limits) what kind of value is
acceptable for an attribute and a default value.
93- The following declarations could be used to
define the two attributes we have specified above
for the element - id ID IMPLIED
- status (draft revised published)
draft
94- The declaration begins with the symbol ATTLIST,
which introduces an attribute list specification.
- The first part of this specifies the element (or
elements) concerned. In our example, attributes
have been set for poem
95- Following this name (or list of names), is a
series of rows, one for each attribute being
declared, each containing three parts - The name of the attribute
- The type of value it takes
- A default value respectively.
96SGML
- If a DTD describes a sufficiently large class of
documents it may make sense to construct display
software specifically for that class of document
and to hardwire the layout rules into the
software. - That way every document will be laid out
consistently by a particular display program.
97Markup Languages
- This is the approach followed by the first
generation of web browsers. - Most of the formating of headers, lists, tables
and other elements is controlled by the browser,
but some details, specifically fonts, type sizes
and colours, may be controlled by preferences set
by the user.
98Markup Languages
- Alternative option Provide a separate
specification of the layout, parallel to and
complementing the DTD. - This layout specification is known as a
stylesheet. - For each tag defined in the DTD, a stylesheet
provides a rule describing the way in which
elements with that tag should be laid out.
99Markup Languages and the WWW
- Since structural markup can be interpreted on any
platform in a logically consistent if not
necessarily visually consistent manner, it is
ideally suited for the markup of documents which
are to be transimitted over networks. - When the World Wide Web was being designed SGML
was used as the basis of the Hypertext Markup
Language (HTML).
100HTML
- HTML provides a set of tags suitable for marking
up web pages. - It does not provide any way of defining new tags.
- HTML is defined by an SGML DTD, which describes
the structure of the class of documents known as
Web pages. - Like SGML it is concerned solely with identifying
the structural elements of a page and not with
their appearance.
101HTML
- Originally the WWW was intended as a means of
dissemination of scientific research, so the DTD
for the Web pages contained tags corresponding to
the main elements of a scientific paper - Title
- Headings that can be nested several levels deep
- Lists of various types
- Some typographical control (bold, italic)
- Tables
- Forms
- Etc.
102HTMLs Limitations
- Although adequate for marking up simple mainly
textual papers for which they were originally
intended, HTMLs layout tags are not sufficient
for all the diverse types of material which have
found their way onto the WWW. - Two results
- Browser manufacturers added ad hoc proprietary
extensions to HTML. - Web Designers used tags as they were never
intended.
103XML
- Solution provide web designers with a facility
to define their own tags. - SGML can do this, but too unwieldy, slow response
times. - Work on adapting SGML to the Internet led to the
definition of a subset, known as XML (eXtensible
Markup Language).
104XML
- Provides all of the important facilities of SGML
without the overhead imposed by full SGML. - XML allows web designers to define their own DTDs
for any type of document. - All new browsers now read and interpret (parse)
both HTML and XML but as XML becomes the new
standard HTML will be left in the lurch.
105XHMTL 1.0
- XHTML is an XML-based language that reproduces
essentially all the features of HTML, subject to
the stricter syntax of XML. - XHTML documents can be processed by both HTML and
XML software. So XHTML documents can be read by
existing HTML browsers of can be used with future
browsers that understand XML.
106SGML and XML Family Tree
SGML
HTML
XHTML
MathML
SMIL
SVG
107