Title: Test1 Solutions
1Test1 Solutions
- Web 2.0 and Rich Internet Applications
21. a. What is Web 2.0 ?
- Web 2.0 as a term was first coined during a
brainstorming session at a conference on Internet
Technology. - Before year 200, Websites were well insulated
entities that executed entirely within the
browser and well within their own sphere of
influence. - Users were important but no one would dare
venture so far as to suggest that users specify
what they wanted. - After 2000, Web 2.0 provides rich user
interaction. Web 2.0 like art, has no real
definition.
31.b. Briefly describe iterative development.
- Rather than use a forklift approach to getting
functionality out of door, web 2.0 companies
operate in a very short cycles of design,
develop, launch, get feedback, repeat. - This means time-to-market is reduced.
- Companies purposefully leave features out to
achieve shorter cycle times. - Rather than guess at what the users want, its
better to launch a small subset of functionality
and then take real-world users feedback. - The feedback is then used to drive feature
definition in subsequent cycles.
41. c. What are Folksonomies?
- The term folksonomy refers to the process whereby
a group of people collaborate to organize
information using an impromptu vocabulary. - A common example in the corporate world is team
building excercises, whereby a group of
individuals rearrange flash cards on the floor or
stickers on a white board. By getting a large
group of peoples input, you have a higher
probability of getting an appropriate
classification of the information in question.
51.c. How do Folksonomies apply to web 2.0?
- In the web 2.0, there is a huge amount of
information and its updated constantly. - It would be naïve to think that any one company
could categorize that information so accurately
that classification would make sense to everyone. - Who better to categorize data than the people
closest to it? - For example Amazon allows users to tag products
with key words. Over time, this will evolve into
its own folksonomy where the users are adding
value for other users simply by using amazon
site.
62.a. Is Internet different from World Wide Web?
- The internet is a collection of computers and
other devices connected by equipment that allows
them to communicate with each other. - The web is a collection of software and protocols
that has been installed on most if not all of the
computers on the internet. - The internet was quite useful before the web was
developed, and it is still useful without it. - However, it is now the case that most users of
the internet use web.
72.b. Briefly describe HTTP Protocol.
- Application level, client-server protocol
- Primarily for distributed hypermedia systems
- Flexible - thus has many other uses - e.g.
- Nameservers
- Distributed collaborative document management
systems - HTTP is small and fast
- Minimal performance overhead
- Easy to implement
- HTTP is a stateless protocol
- Each request is an independent transaction -
unrelated to any previous requests (unlike
session-based protocols, e.g. FTP) - Advantage
- Simplifies server design - information about
previous transactions does not need to be stored - Disadvantage
- More information must be included in each request
8HTTP Operation
- On the Internet HTTP usually uses TCP/IP
connections - TCP Port 80 is the default (though others can be
specified) - HTTP uses a Request/Response paradigm
- Client establishes a connection to the server,
and sends it a request - Server responds to the request by generating a
response (which may or may not contain content)
9HTTP Request
- Delivered from a client to a server containing
instructions for the server - Contains
- the method to be applied to the data resource
- the identifier of the resource
- the protocol version in use
- Most commonly used methods
- GET - Fetch a document
- HEAD - Fetch just the header of the document
- POST - Execute the document, using the data in
body - PUT - Store a new document on the server
- DELETE - Remove a document from the server
10Request message
General request message structure
METHOD /path-to-resource HTTP/version-number Hea
der-Name-1 value Header-Name-2 value optional
request body
Example
GET /index.html HTTP/1.1 Host
www.cs.nott.ac.uk Accept text/ User-Agent
Mozilla/2.02Gold (WinNT I)
11HTTP Response
- Message generated by a server after receiving and
interpreting a request - Responses contain
- Status line with the protocol version, a status
code, and a reason phrase - Response-Header (containing information about the
server) - Entity Header (meta-information)
- Entity Body (data)
12Response message
General response message structure
HTTP/version-number status-code message
Response-Header-Name-1 value Response-Header-Nam
e-2 value Entity-Header-Name-1
value Entity-Header-Name-2 value optional
entity body
Example
HTTP/1.1 200 OK Server Apache
(Red-Hat/Linux) Content-Type text/html Content-Le
ngth 9934 ltHTMLgt ltHEADgt ltTITLEgtSchool of
Computer Sciencelt/TITLEgt
132.c. What is a hyperlink?
- A hypertext link in an XHTML document is called
Hyperlink acts as a pointer to some resource.
That resource can be an XHTML document anywhere
on the web.
143.a What is the task of the Domain Name Server?
- The Domain name servers convert domain names into
IP addresses. - Name servers serve a collection of machines on
the internet and are operated by organizations
that are responsible for the part of internet to
which those machines are connected. - All document requests from browsers are routed to
the nearest name servers.
153.b. What are the differences between IPv4 and
IPv6?
- IPv4 supports 32 bit IP addresses
- IPv6 supports 128 bit IP addresses
- ( with this every grain of sand on earth can be
IP addressable!) - New type of addresses called anycast apart from
unicast and multicast. - Fragmentation and Reassembly IPv6 does not allow
for fragmentation and reassembly at intermediate
routers. - Header Checksum As with IPv4, due to fast
processing requirements, this has been removed in
IPv6 - Options An option field is no longer a part of
the standard IP header. The removal of the
options field results in a fixed-length, 40-byte
IP header. - IPv6 has an elusive definition of a flow state
that allows labeling of packets belonging to
particular flows.
163.c. Why is TCP/IP referred to as network
friendly protocol?
- TCP/IP uses slow start and helps congestion
control. - Whenver the network becomes congested, it will
slow down packet transmission such that network
can recover quickly.
174.a. Briefly describe MIME
- Problems with international languages
- Languages with accents (French, German).
- Languages in non-Latin alphabets (Hebrew,
Russian). - Languages without alphabets (Chinese, Japanese).
- Messages not containing text at all (audio or
images). - Multipurpose Internet Mail Extensions
18MIME (2)
- The MIME types and subtypes defined in RFC 2045.
194. b. What is a plug-in?
204. c. What is the important capability lacking in
a markup language?
- Uniformity while being rendered by different
browsers. - User interaction, dynamism, control loops,
programming language constructs.
215.a. Why is HTTP 1.0 considered as a stateless
protocol?
- Each request is an independent transaction -
unrelated to any previous requests (unlike
session-based protocols, e.g. FTP)
225.b. What are use of cookies?
- Cookies provide general approach to storing
information about sessions on the browser system
itself. - A cookie is a small object of information
consisting of a name and a textual value. - A cookie is created by some software system on
the server such as a CGI program.
235.c. What is a proxy server?
- A web cache also called proxy server is a network
entity that satisfies HTTP requests on the behalf
of an origin server. - The web cache has its own disk storage and keeps
in this storage copies of recently requested
objects. - A users browser can be configured so that all
the users HTTP requests are first directed to
the web cache.
246.a. What are the differences between HTML and
XHTML?
- HTML has lax syntax rules, leading to sloppy
and sometime ambiguous documents - XHTML syntax is much more strict, leading
to clean and clear documents in a standard
form - HTML processors do not even enforce the few
syntax rules that do exist in HTML - The syntactic correctness of XHTML documents can
be validated
256.b. What is the application of XHTML document
Validation?
- W3C HTML Validation Service
- http//validator.w3.org/file-upload.html
266.c. What is the use of meta element?
- The meta element is used to provide additional
information about a document. - It has no content rather all of the provided
information is specified through attributes. - ltmeta name Keywords contentbinary tree /gt
- Web search engines use the info provided with the
meta element to categorize web documents in their
indices.
277.a. What are the XHTML tags useful for designing
a Table?
- A table is a matrix of cells
- The cells can include almost any element
- Some cells have row or column labels and some
have data - A table is specified as the content of a lttablegt
tag - Each row of a table is specified as the content
of a lttrgt tag - The row headings are specified as the content of
a ltthgt tag - Each data cell of a row is specified as the
content of a lttdgt tag
287.b. Creat an XHTML document that has a form with
following controls. ( A text box to collect
users name. Four checkboxes and 3 radio buttons.)
29An example
- lt?xml version "1.0" encoding "utf-8"?gt
- lt!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.1//EN"
- "http//www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"gt
- lt!-- popcorn.html
- This describes popcorn sales form page
- --gt
- lthtml xmlns "http//www.w3.org/1999/xhtml"gt
- ltheadgt lttitlegt Popcorn Sales Form lt/titlegt
- lt/headgt
- ltbodygt
- ltform action "http//marian.cs.nott.ac.uk/b
nk/cgi-bin/popcorn.pl" method "post"gt - lth2gt Welcome to Millennium Gymnastics
Booster Club Popcorn Sales lt/h2gt - lt!-- A borderless table of text widgets for name
and address --gt - lttablegt
- lttrgt
- lttdgt Name lt/tdgt
30contd
- lt!-- A bordered table for item orders --gt
- lttable border "border"gt
- lt!-- First, the column headings --gt
- lttrgt
- ltthgt Product Name lt/thgt
- ltthgt Price lt/thgt
- ltthgt Quantity lt/thgt
- lt/trgt
- lt!-- Now, the table data entries --gt
- lttrgt
- ltthgt Unpopped Popcorn (1 lb.) lt/thgt
- lttdgt 3.00 lt/tdgt
- lttdgt ltinput type "text" name "unpop"
size "2" /gt lt/tdgt - lt/trgt
31contd
- lt!-- The radio buttons for the payment method --gt
-
- lth3gt Payment Method lt/h3gt
- ltpgt
- ltinput type "radio" name "payment" value
"visa" checked "checked" /gt Visa - ltinput type "radio" name "payment" value
"mc" /gt Master Card - ltinput type "radio" name "payment" value
"discover" /gt Discover - ltinput type "radio" name "payment" value
"check" /gt Check ltbr/gt - lt/pgt
-
- lt!-- The submit and reset buttons --gt
- ltpgt
- ltinput type "submit" value "Submit
Order" /gt - ltinput type "reset" value "Clear
Order Form" /gt - lt/pgt
- lt/formgt
- lt/bodygt
- lt/htmlgt
32Result
338.a. Write a short note on CSS
- CSS provides the means to control and change
presentation of XHTML documents - Style sheets allow you to impose a standard style
on a whole document, or even a whole collection
of documents - CSS1 specification was developed in 1996
- CSS level 2 revision 1 (CSS 2.1) - 2004, is a
Candidate W3C Recommendation - CSS3 is under development
34Levels of Style Sheets
- There are three levels of style sheets
- Inline - specified for a specific occurrence of a
tag and apply only to that tag - This is fine-grain style, which defeats the
purpose of style sheets - uniform style - Document-level style sheets - apply to the whole
document in which they appear - External style sheets - can be applied to any
number of documents - When more than one style sheet applies to a
specific tag in a document, the lowest level
style sheet has precedence
35Levels of Style Sheets
- Inline style sheets appear in the tag itself
- Document-level style sheets appear in the head of
the document - External style sheets are in separate files,
potentially on any server on the Internet - Written as text files with the MIME type text/css
- A ltlinkgt tag is used to specify that the browser
is to fetch and use an external style sheet file - ltlink rel "stylesheet" type "text/css"
- href "http//www.wherever.org/example.css"gt
- lt/linkgt
368.b. Write a short note on Web servers
- Apache, IIS
- Webroot
- Port number
- Webpages
- TCP/IP connection
37Webserver