SlideShare a Scribd company logo
1 of 102
RCS 301 INTERNET
PROGRAMMING AND
E-APPLICATIONS
CHAPTER 1
1
Course Introduction,
Agenda;
Introductions
Course Outline
Chapter One
2
cont..
Introductions
Who are you? (name, background).
How is God working in your life?
What's one interesting thing about you?
3
Course Outline
Web Technologies (Browser, HTML, The
Dynamic web, Dynamic Server Concepts, Web
Application Servers, XML, Plug-ins, and VRML)
Security and privacy on the Internet
(Cryptography, digital signatures, Client-based
Security, Server-based security)
Search engines and portals (Intelligent Network
Agents, Portal Sites, All-in-One Mega web sites)
4
cont..
Interactive Communication Experiences (Online
meetings, Internet Chat Solutions, Internet-based
Training (e-training, e-learning, portals)
Electronic Commerce (The payment business,
Comparing Payment Technologies (Postpaid
Payment Systems, Instant-paid Payment Systems,
Pre-paid Payment Systems, The future of Payment)
5
Method of Assessment
--Dave Cintron, Fast Track Web Programming: A
Programmer’s Guide to Mastering Web Technologies,
John Wiley & Sons.
--www.w3schools.com.
READING
--Coursework (quizzes, tests, assignments/ homework/
practical) 40%.
--End Semester Exam 60%.
6
CHAPTER ONE
WEB TECHNOLOGIES
Browser,
HTML,
The Dynamic web,
Dynamic Server Concepts,
Web Application Servers,
XML,
Plug-ins, and
VRML 7
BROWSER
-a computer application program with a
graphical user interface that allows a user to
locate, access, and display web pages.
-common web browsers include; internet
explorer, google chrome, safari, opera, mozilla
firefox etc...
8
Common Browser Error Messages
Page Not Found (404)
This error simply means that your browser is able to
communicate with the website or the server you are
trying to connect to, but the server could not find what
you are looking for thus responding with a 404 error
message.
There are many reasons like deleted or moved
content, behind the 404 error.
9
cont..
Bad Gateway (502)
This error message means while attempting to fulfill
your request, the server which is acting as a gateway
has received an invalid response from the upstream
server.
Most of the time, the problem is outside your
computer and the error is generated due to the
problems in the servers, and there is nothing much
you can do to solve this problem.
10
cont..
Service Unavailable (503)
This error message appears whenever the website you
are trying to reach is down at the current time, but the
server itself is responding to the requests with an error
message.
There is not much you can do in order to get access to
the server or the website. However, in rare cases, you
may receive an error like “Service Unavailable – DNS
Failure.” The reason for this might be an issue with
your router or with the DNS service itself. In those
cases, consider restarting your router or change the
DNS services you are using to resolve the issue.
11
cont..
Connection Timed Out
This Error message simply means that the request
sent by your computer isn’t being fulfilled within the
predetermined time frame.
The reasons for this type of error may be that the
actual server or computer you are trying to access is
not responding as it should, or there is a network
problem with your connection.
Try accessing other websites. If you can, then the
problem may be with the website or the server you
are visiting. If you can’t access the whole Internet,
then it might be a network problem.
12
cont..
Phishing or Malicious Content Warnings
These warnings are some of the best things about
the modern browser as they protect you from falling
prey to the Internet fraud. Whenever your browser
displays a phishing warning, it means that the
website you are visiting is not what you think it is and
is just faking to be the original site.
Crackers usually use these phishing techniques to
steal your passwords and other important
information. In those cases, quit clicking on the links
displayed on the web or in the emails and manually
enter the website URL to be sure.
13
How browsers work
The main function of a browser is to present the
web resources you choose by requesting it from
the server and displaying it in the browser
window.
14
The browser’s high level
structure
The browser’s main components are;
The user interface
The browser engine
The rendering engine
Networking
UI backend
JavaScript Interpreter
Data storage
15
The user interface: this includes the address
bar, back/forward button, bookmarking menu,
etc. Every part of the browser display except the
window where you see the requested page.
The browser engine: organizes actions between
the UI and the rendering engine.(the interface for
querying and manipulating the rendering engine.)
cont..
16
cont..
3. The rendering engine : responsible for displaying
requested content. For example if the requested
content is HTML, the rendering engine analyses
HTML and CSS, and displays the analysed content on
the screen.
4. Networking: for network calls such as HTTP
requests, using different implementations for different
platform behind a platform-independent interface.
17
cont..
5. UI backend: used for drawing basic widgets like
combo boxes and windows. This backend exposes a
generic interface that is not platform specific.
Underneath, it uses the operating system user
interface methods.
6. JavaScript interpreter. Used to analyse(parse)
and execute JavaScript code.
18
cont..
7. Data storage. The browser may need to
save all sorts of data locally. Browsers also
support storage mechanisms such as
localStorage, IndexedDB, WebSQL and
FileSystem. This is a persistence layer.
19
cont..
20
cont..
It is important to note that browsers such as
Chrome run multiple instances of the rendering
engine: one for each tab. Each tab runs in a
separate process.
21
The rendering engine
The responsibility of the rendering engine is well...
Rendering, that is display of the requested contents
on the browser screen.
By default the rendering engine can display HTML and
XML documents and images. It can display other
types of data via plug-ins or extension; for example,
displaying PDF documents using a PDF viewer plug-
in.
22
cont..
Rendering engines
Different browsers use different rendering engines:
Internet Explorer uses Trident, Firefox uses Gecko,
Safari uses WebKit. Chrome and Opera (from
version 15) use Blink, a fork of WebKit.
WebKit is an open source rendering engine which
started as an engine for the Linux platform and was
modified by Apple to support Mac and Windows.
See webkit.org for more details.
23
cont..
The main flow
The rendering engine will start getting the contents of
the requested document from the networking layer.
This will usually be done in 8kB chunks.After that, this
is the basic flow of the rendering engine:
Figure : Rendering engine basic flow
24
cont..
The rendering engine will start parsing the HTML
document and convert elements to DOM nodes in a
tree called the "content tree". The engine will parse the
style data, both in external CSS files and in style
elements. Styling information together with visual
instructions in the HTML will be used to create another
tree: the render tree.
The render tree contains rectangles with visual
attributes like color and dimensions. The rectangles are
in the right order to be displayed on the screen.
After the construction of the render tree it goes through
a "layout" process. This means giving each node the
exact coordinates where it should appear on the
screen. 25
cont.. The next stage is painting–the render tree will be
traversed and each node will be painted using the UI
backend layer.
It's important to understand that this is a gradual
process. For better user experience, the rendering
engine will try to display contents on the screen as
soon as possible.
It will not wait until all HTML is parsed before starting
to build and layout the render tree. Parts of the content
will be parsed and displayed, while the process
continues with the rest of the contents that keeps
coming from the network.
26
Main flow examples
WEBKIT
Rendering
Engine
27
GECKO
Rendering
engine
28
cont.
.
From the above figures, WebKit and Gecko use slightly
different terminology, the flow is basically the same.
Gecko calls the tree of visually formatted elements a
"Frame tree". Each element is a frame. WebKit uses
the term "Render Tree" and it consists of "Render
Objects".
WebKit uses the term "layout" for the placing of
elements, while Gecko calls it "Reflow". "Attachment"
is WebKit's term for connecting DOM nodes and visual
information to create the render tree. A minor
difference is that Gecko has an extra layer between
the HTML and the DOM tree. It is called the "content
sink" and is a factory for making DOM elements.
29
Hypertext Markup
Language (HTML)
-describes the content and structure of information on
a web page. not the same as the presentation
(appearance on screen)
-surrounds text content with opening and closing tags
-each tag's name is called an element
syntax: <element> content </element>
example: <p>This is a paragraph</p>
-whitespace is frequently insignificant in HTML (ignored
or collapsed to a single space)
30
Structure
of a
HTML
page
<!DOCTYPE html>
<html>
<head>
information about the page
</head>
<body>
page contents.
</body>
</html>
the header describes the page and the body
contains the page's contents.
HTML page is saved into a file ending with
extension .html or .htm
DOCTYPE tag tells browser to interpret our page's
code as HTML 31
Page title: <title>
describes the title of the web page.
<title>Chapter 1 part two: HTML Basics</title>
placed within the head of the page
displayed in the web browser's title bar and
when bookmarking the page
32
Paragraph: <p>
paragraphs of text (block)
<p>In the beginning was the Word,
and the Word was with God,
and the Word was God.
He was with God in the beginning.
</p>
placed within the body of the page.
33
Headings: <h1>, <h2>, ..., <h6>
headings to separate major areas of the page.
<h1>Ruaha catholic university</h1>
<h2>Department of Computer Science</h2>
<h3>Sponsored by Micro$oft</h3>
Ruaha catholic university
Department of Computer Science
Sponsored by Micro$oft
34
Horizontal rule: <hr>
a horizontal line to visually separate sections of a
page.
<p>First paragraph</p>
<hr />
<p>Second paragraph</p>
First paragraph
Second paragraph
should be immediately closed with />
35
More
about
HTML
tags
some tags can contain additional information
called attributes.
syntax: <element attribute="value"
attribute="value"> content </element>
example: <a href="page2.html">Next page</a>
some tags don't contain content; can be opened
and closed in one tag
syntax: <element attribute="value"
attribute="value" />
example: <hr />
example: <img src="bunny.jpg" alt="pic from
Easter" />
36
Links:
<a>
links, or "anchors", to other pages
<p>
Search
<a href="http://www.google.com/">Google</a> or
our
<a href="01_course_introduction.html">Lecture
Notes</a>.
</p>
Search Google or Lecture Notes.
-uses the href attribute to specify the destination URL
can be absolute (to another web site) or relative
(to another page on this site)
-anchors are inline elements; must be placed in a
block element such as p or h1 37
Block and inline elements
block elements contain an entire large region of
content
examples: paragraphs, lists, table cells
the browser places a margin of whitespace
between block elements for separation
inline elements affect a small amount of content
examples: bold text, code fragments, images
the browser allows many inline elements to
appear on the same line
must be nested inside a block element 38
Images: <img>
inserts a graphical image into the page (inline)
<img src="images/gollum.jpg" alt="Gollum from
LOTR" />
the src attribute specifies the image URL
HTML5 also requires an alt attribute describing the
image
39
More about images
<a href="http://theonering.net/">
<img src="images/gandalf.jpg" alt="Gandalf from
LOTR"
title="You shall not pass!" />
</a>
if placed in an a anchor, the image becomes a link
title attribute is an optional tooltip (on ANY
element)
40
Line break: <br>
forces a line break in the middle of a block element
(inline)
<p>The Lord is my shepherd, I lack nothing.<br />
He makes me lie down in green pastures,<br />
he leads me beside quiet waters,</p>
The Lord is my shepherd, I lack nothing.
He makes me lie down in green pastures,
he leads me beside quiet waters,
Warning: Don't over-use br they are hard to apply
css styles (more on this later)
br should not be used to separate paragraphs or
used multiple times in a row to create spacing 41
Phrase elements : <em>, <strong>
em: emphasized text (usually rendered in italic)
strong: strongly emphasized text (usually rendered in
bold)
<p>
HTML is <em>really</em>,
<strong>REALLY</strong> fun!
</p>
HTML is really REALLY fun!
as usual, the tags must be properly nested for a
valid page.
42
Nesting tags
<p>
HTML is <em>really,
<strong>REALLY</em> lots of</strong> fun!
</p>
tags must be correctly nested
(a closing tag must match the most recently
opened tag)
the browser may render it correctly anyway, but it
is invalid HTML
(how would we get the above effect in a valid
way?)
43
Comments
<!-- ... -->
comments to document your HTML file or "comment
out" text
<!-- My web page, by Anthony Jumanne 2015 -->
<p>Computer science courses are <!-- NOT --> a lot of
fun!</p>
Computer science courses are a lot of fun!
many web pages are not thoroughly commented (or
at all)
still useful at top of page and for disabling code
comments cannot be nested and cannot contain a --
HTML comments are visible to anyone that views
the page source code, but are not rendered when
the HTML document is rendered by a browser.
44
More HTML Elements
Unordered list: <ul>, <li>
ul represents a bulleted list of items (block)
li represents a single item within the list (block)
<ul>
<li>No shoes</li>
<li>No shirt</li>
<li>No soup for you!</li>
</ul>
No shoes
No shirt
No soup for you!
45
More
about
unorde
red
lists
a list can contain other lists:
<ul>
<li>Tribes:
<ul>
<li>Levi</li>
<li>Judah</li>
<li>Benjamin</li>
</ul>
</li>
<li>Disciples:
<ul>
<li>Peter</li>
<li>John</li>
</ul>
</li>
</ul>
Tribes:
Levi
Judah
Benjamin
Disciples:
-Peter
-John
46
Ordered list: <ol>
ol represents a numbered list of items (block)
<p>RIAA business model:</p>
<ol>
<li>Sue customers</li>
<li>???</li>
<li>Profit!</li>
</ol>
RIAA business model
Sue customers
???
Profit!
we can make lists with letters or Roman numerals
using CSS
47
Definition
list:<dl>
<dt>,
<dd>
dl represents a list of definitions of terms (block)
dt represents each term, and dd its definition
<dl>
<dt>newbie</dt>
<dd>one who does not have mad skills</dd>
<dt>own</dt>
<dd>to soundly defeat (e.gI owned that newbie!)</dd>
<dt>frag</dt>
<dd>a kill in a shooting game</dd>
</dl>
newbie
one who does not have mad skills
own
to soundly defeat (e.g. I owned that newbie!)
frag
a kill in a shooting game 48
Quotations: <blockquote>
a lengthy quotation (block)
<p>As Lincoln said in his famous Address:</p>
<blockquote>
<p>Fourscore and seven years ago, our fathers
brought forth on this continent a new nation,
conceived in liberty, and dedicated to the proposition
that all men are created equal.</p>
</blockquote>
As Lincoln said in his famous Address:
Fourscore and seven years ago, our fathers brought
forth on this continent a new nation, conceived in
liberty, and dedicated to the proposition that all men
are created equal.
49
Inline quotations: <q>
a short quotation (inline)
<p>Quoth the Raven, <q>Nevermore.</q></p>
Quoth the Raven, Nevermore.
Why not just write the following?
<p>Quoth the Raven, "Nevermore."</p>
We don't use " marks for two reasons:
HTML shouldn't contain literal quotation mark
characters; they should be written as &quot;
using <q> allows us to apply CSS styles to
quotations.
50
HTML Character Entities
a way of representing any Unicode character within a
web page
character(s) entity
< > &lt; &gt;
é è ñ &eacute; &egrave; &ntilde;
™ © &trade; &copy;
π δ Δ &pi; &delta; &Delta;
И &#1048;
® &reg;
list of HTML entities
https://www.w3schools.com/html/html_entities.asp)
51
cont..
Reserved characters in HTML must be replaced with
character entities. Characters that are not present on
your keyboard can also be replaced by entities.
example
If you use the less than (<) or greater than (>) signs in
your text, the browser might mix them with tags.
To display a less than sign (<) we must write: &lt; or
&#60;
52
What is new in html5
The DOCTYPE declaration for HTML5 is very simple:
<!DOCTYPE html>
New HTML5 Elements
The most interesting new HTML5 elements are:
New semantic elements like <header>, <footer>,
<article>, and <section>.
New attributes of form elements like number, date,
time, calendar, and range.
New graphic elements: <svg> and <canvas>.
New multimedia elements: <audio> and <video>.
53
Removed Elements in HTML5
Some of removed Elements in HTML5
The following HTML 4 elements have been removed
in html5;
Removed Element Use Instead
<acronym> <abbr>
<applet> <object>
<basefont> CSS
<big> CSS
<center> CSS
<dir> <ul>
<font> CSS
<strike> CSS
54
CHOOSING A HTML EDITOR
Both code and WYSIWYG html editors exist.
There is a debate over whether to use a WYSIWYG
editor instead of code. WYSIWYG stands for What
You See Is What You Get.
With WYSIWYG you can drag and drop, insert images
and create numbered or bullet lists using an editor just
like in Word.
The editor would then take that and create the HTML
code for you.
55
cont..
Some of the html code editors
Sublime text
Brackets
Aptana Studio 3
Notepad++
Some of the html WYSIWYG editors
Seamonkey
Amaya
kompozer
Trellian WebPage
56
The dynamic web
A website, or individual web page, can be static or
dynamic.
A static website contains information that does not
change. It remains the same, or static, for every
viewer of the site.
A dynamic website is a site that contains dynamic
(changing) contents depending on the viewer, the
time of the day, the viewer's native language, and
other factors.
57
Types of dynamic websites
A dynamic website can contain client-side scripting
or server-side scripting to generate the changing
content, or a combination of both scripting types.
Scripts
A script is a set of instructions. For Web pages
they are instructions either to the Web browser
(client-side scripting) or to the server (server-side
scripting). These are explained more below.
58
Client-side
The client is the system on which the Web browser is
running. JavaScript is the main client-side scripting
language for the Web.
Client-side scripts are interpreted by the browser. The
process with client-side scripting is:
the user requests a Web page from the server
the server finds the page and sends it to the user
the page is displayed on the browser with any
scripts running during or after display.
59
cont..
So client-side scripting is used to make Web pages
change after they arrive at the browser making pages
a bit more interesting and user-friendly.
Client-side scripts rely on the user's computer. If that
computer is slow they may run slowly. They may not
run at all if the browser does not understand the
scripting language. As they have to run on the user's
system the code which makes up the script is there in
the HTML for the user to look at (and copy or change).
60
Server-side
The server is where the Web page and other content
lives. The server sends pages to the user/client on
request. The process is:
the user requests a Web page from the server
the script in the page is interpreted by the server
creating or changing the page content to suit the
user and the occasion.
the page in its final form is sent to the user and
then cannot be changed using server-side
scripting
61
cont..
The use of HTML forms allow data to be sent to the
server and processed.
Server-side scripting tends to be used for allowing
users to have individual accounts and providing data
from databases. It allows a level of privacy, and
personalisation.
E-commerce, login pages, submission forms, and
social networking sites all rely heavily on server-side
scripting.
PHP, JSP, and ASP.net are the technologies for
server-side scripting.
62
The combination
A site such as Google, Amazon, or Facebook will
use both types of scripting:
server-side handles logging in, personal
information and preferences and provides the
specific data which the user wants (and allows
new data to be stored)
client-side makes the page interactive,
displaying or sorting data in different ways if the
user asks for that by clicking on elements with
event triggers
63
Dynamic Server Concepts
"Web server" can refer to hardware or software, or
both of them working together.
On the hardware side, a web server is a computer
that stores web server software and a website's
component files (e.g. HTML documents, images,
CSS stylesheets, and JavaScript files).
It is connected to the Internet and supports physical
data interchange with other devices connected to the
web.
64
cont..
2. On the software side, A web server is a specialized
type of file server. Its job is to retrieve files from the
server’s hard drive, format the files for the Web
browser, and send them out via the network.
The function of a typical Web server is shown below.
The user requests a web page. The Web Server finds
the web page file and sends it back out to the user.
The Web Server standards were originally designed to
publish static documents on the Internet.
65
66
As the Internet and Web browsers became popular
in the mid-1990’s, organizations saw an opportunity
to provide web pages that contained dynamic
content like stock prices, weather information, and
shipping status for a package.
So, Web servers had to be extended to allow
software application development and access to
databases.
cont..
67
Then, What is a Web Application
Server?
Web application servers are designed specifically
to extend web servers to support dynamic content.
The application server software “hooks in” to the
web server software and automatically intercepts
any user requests for dynamic content.
The web server still sends out static web pages
and graphic files–Just like before. But now, the
application server can create dynamic content by
running programs, or by accessing databases.
68
69
cont..
There are a variety of Web Application Server product
available. Some of the more popular products include:
Macromedia:
Cold Fusion
Cold Fusion is inexpensive and easy to learn resulting
in low cost for both development and implementation.
70
XML
XML, or Extensible Markup Language, is a markup
language that you can use to create your own tags.
It was created to overcome the limitations of HTML.
XML is a software- and hardware-independent tool.
It is extensible because it is not a fixed format like
HTML (which is a single, predefined markup
language). Instead, XML is a language which lets
you design your own markup languages.
71
cont..
A markup language is a set of words and symbols for
describing the identity or function of the parts of a
document (for example ‘this is a paragraph’, ‘this is a
heading’, ‘this is a list’, ‘this is the caption of this
figure’, etc).
XML is sometimes referred to as ‘self-describing’
because the names of the markup elements can
represent the type of content they hold (eg title,
chapter, link, etc).
72
Some key terminologies
Tag
A tag is a markup construct that begins with < and ends
with >. Tags come in three flavors:
start-tag, such as <section>;
end-tag, such as </section>;
empty-element tag, such as <line-break />.
Element
An element is a logical document component that either
begins with a start-tag and ends with a matching end-tag
or consists only of an empty-element tag. example
<greeting>Hello!</greeting>.
73
cont..
XML declaration
XML documents may begin with an XML
declaration that describes some information.
An example is;
<?xml version="1.0" encoding="UTF-8"?>.
74
So XML is Just Like HTML?
No. In HTML, the tag is fixed(predefined). An
<q> is always an inline quotation tag and the
tag <book> is meaningless.
XML provides a facility to define tags and the
relationships between them. Since there's no
predefined tag set, there can't be any
preconceived meaning.
75
Some XML editors
1. XML Notepad
2. EditiX
3. FontoXML
4. Oxygen XML Editor
76
XML Syntax
The syntax rules of XML are very simple and logical.
The rules are easy to learn, and easy to use.
<?xml version="1.0" encoding="UTF-8"?>
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
77
EXAMPLE
<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
78
cont..
To: Tove
From: Jani
Heading: Reminder
Body: Don't forget me this weekend!
79
cont..
In XML, it is illegal to omit the closing tag. All elements
must have a closing tag:
Note: The XML prolog does not have a closing tag!
This is not an error.
XML tags are case sensitive. The tag <Letter> is
different from the tag <letter>.
Opening and closing tags must be written with the
same case:<message>This is correct</message>
In XML, all elements must be properly nested within
each other:
<b><i>This text is bold and italic</i></b>
80
cont..
-In XML, the attribute values must always be quoted:
<note date="12/11/2007">
<to>Tove</to>
<from>Jani</from>
</note>
-XML does not truncate multiple white-spaces (HTML
truncates multiple white-spaces to one single white-
space):
XML: Hello Tove
HTML: Hello Tove
81
XML
Elements
An XML document contains XML Elements.
An XML element is everything from (including) the
element's start tag to (including) the element's end
tag. <price>29.99</price>
An element can contain: text, attributes, other
elements, or a mix of the above.
<bookstore>
<book category="children">
<title>Harry Potter</title>
<year>2005</year>
<price>29.99</price>
</book>
</bookstore>
82
cont..
In the example above:
<title>, <author>, <year>, and <price> have text
content because they contain text (like 29.99).
<bookstore> and <book> have element contents,
because they contain elements.
<book> has an attribute (category="children").
83
XML Tree Structure
XML documents form a tree structure that starts at "the
root" and branches to "the leaves".
84
XML Attributes
XML elements can have attributes, just like HTML.
They are designed to contain data related to a specific
element
Attribute values must always be quoted. Either single
or double quotes can be used.
<person gender="female"> or
<person gender='female'>
If the attribute value itself contains double quotes you
can use single quotes, like in this example:
<gangster name='George "Shotgun" Ziegler'>
or you can use character entities
85
XML Elements vs. Attributes
Take a look at these examples:
<person gender="female">
<firstname>Anna</firstname>
</person>
<person>
<gender>female</gender>
<firstname>Anna</firstname>
</person>
86
cont..
In the first example gender is an attribute.
In the last, gender is an element.
Both examples provide the same information.
There are no rules about when to use
attributes or when to use elements in XML.
87
Entity characters
There are 5 predefined entity references in XML:
&lt; < less than
&gt; > greater than
&amp; & ampersand
&apos; ' apostrophe
&quot; " quotation mark
88
cont..
If you place a character like "<" inside an XML
element, it will generate an error because it’s
interpreted as the start of a new element.
This will generate an XML error:
<message>salary < 1000</message>
To avoid this error, replace the "<" character with
an entity reference:
<message>salary &lt; 1000</message>
89
Comments in XML
The syntax for writing comments in XML is similar
to that of HTML:
<!-- This is a comment -->
Two dashes in the middle of a comment are not
allowed:
<!-- This is an invalid -- comment -->
90
PLUGINS
A plug-in (or plugin, add-in, add-on, or extension)
is a software component that adds a specific feature
to an existing computer program.
The common examples are the plug-ins used in web
browsers to add new features such as search
engines, virus scanners, or the ability to use a new file
type such as a new video format.
91
Why plug ins?
Applications support plug-ins for many reasons.
Some of the main reasons include:
to enable third-party developers to create
abilities which extend an application
to support easily adding new features
to reduce the size of an application
to separate source code from an application
because of incompatible software licenses.
92
How plugins work
The life cycle of a plug-in, unlike that of an
application, is completely controlled by the web page
that calls it.
When a browser starts, it looks for plugin on the
system.
When the user opens a page that contains
embedded data of a media type that invokes a plug-
in, the browser responds with the following sequence
of actions:
93
cont..
check for a plug-in with a matching MIME type
load the plug-in code into memory
initialize the plug-in
If you are browsing a page that has several
embedded RealAudio clips, for example, the browser
will create as many instances of the RealPlayer plug-
in as are needed (though of course playing several
RealAudio files at the same time would not be a good
idea).
94
cont..
When the user leaves the page or closes the
window, the plug-in instance is deleted. When
the last instance of a plug-in is deleted, the
plug-in code is unloaded from memory.
A plug-in consumes no resources other than
disk space when it is not loaded.
95
The following stages outline the life of a plug-in
from loading to deletion:
When Gecko encounters data of a MIME type
registered for a plug-in (either embedded in an
HTML page or in a separate file), it dynamically
loads the plug-in code into memory, if it hasn't
been loaded already, and it creates a new
instance of the plug-in.
Gecko calls the plug-in API function NPP_Initialize
when the plug-in code is first loaded.
By convention, all of the plug-in specific functions
have the prefix "NPP", and all of the browser-specific
functions have the prefix "NPN".
96
cont..
The browser calls the plug-in API function
NPP_New when the instance is created.
Multiple instances of the same plug-in can exist
(a) if there are multiple embedded objects on a single
page, or
(b) if several browser windows are open and each
displays the same data type.
A plug-in instance is deleted when a user leaves
the instance's page or closes its window; Gecko
calls the function NPP_Destroy to inform the plug-
in that the instance is being deleted.
97
cont..
When the last instance of a plug-in is
deleted, the plug-in code is unloaded from
memory. Gecko calls the function
NPP_Shutdown.
Plug-ins consume no resources (other than
disk space) when not loaded.
98
Using HTML to Display Plug-
Ins
When a user browses to a web page that invokes a
plug-in, how the plug-in appears (or does not appear)
depends on two factors:
The way the developer writes the plug-in
determines whether it is displayed in its own
window or is windowless.
The way the content provider uses HTML
elements to invoke the plug-in determines its
display mode: whether it is embedded in a page,
is part of a section, appears on its own separate
page, or is hidden.
99
VRML
(Virtual Reality Modeling Language)
Virtual Reality Modeling Language (VRML) is an
open-standard programming language created to
design three-dimensional (3-D) and Web-based
models, textures and illusion.
VRML is used to illustrate 3-D objects, buildings,
landscapes or other items requiring 3-D structure
and is very similar to Hypertext Markup Language
(HTML).
VRML also uses textual representation to define 3-D
illusion presentation methods. 100
What are the strengths of VRML?
VRML is a highly dynamic, extensible language. The
architects of VRML designed the language in a very
modular format.
Every object is created in its own world. For instance,
if a vase was designed in VRML, it would first be
constructed in its own world coordinates. If a designer
wanted to place the vase in a mansion that he was
creating, he could simply translate, rotate, and scale
the vase so it fit exactly where he wanted it to.
By specifying components such as the vase in a
generic coordinate system, large libraries of VRML
components can be created that developers can
reference.
101
What are the weaknesses of VRML?
Unfortunately, VRML is fairly slow.
Given VRML's architecture, it will always have
trouble competing with 3d implementations that
squeeze the last little bit of performance out of
the CPU and graphics hardware.
Since VRML is so abstract, it will always be one
step behind applications that are optimized for a
particular architecture.
102

More Related Content

What's hot

Website designing company in faridabad
Website designing company in faridabadWebsite designing company in faridabad
Website designing company in faridabadCss Founder
 
4 internet programming
4 internet programming4 internet programming
4 internet programmingsoner_kavlak
 
Industrial training report
Industrial training report Industrial training report
Industrial training report Akash Kr Sinha
 
Mengelola isi halaman web 5 eng
Mengelola isi halaman web 5 engMengelola isi halaman web 5 eng
Mengelola isi halaman web 5 engEko Supriyadi
 
HTML - hypertext markup language
HTML - hypertext markup languageHTML - hypertext markup language
HTML - hypertext markup languageBasmaa Mostafa
 
Basic web architecture
Basic web architectureBasic web architecture
Basic web architectureRalu Mihordea
 
KMUTNB - Internet Programming 1/7
KMUTNB - Internet Programming 1/7KMUTNB - Internet Programming 1/7
KMUTNB - Internet Programming 1/7phuphax
 
Web designing and publishing computer studies theory lesson
Web designing and publishing computer studies theory lessonWeb designing and publishing computer studies theory lesson
Web designing and publishing computer studies theory lessonMukalele Rogers
 
Passport js authentication in nodejs how to implement facebook login feature ...
Passport js authentication in nodejs how to implement facebook login feature ...Passport js authentication in nodejs how to implement facebook login feature ...
Passport js authentication in nodejs how to implement facebook login feature ...Katy Slemon
 
Getting Started With Linux® Shared Hosting
Getting Started With Linux® Shared HostingGetting Started With Linux® Shared Hosting
Getting Started With Linux® Shared Hostingwebhostingguy
 
Introductiontowebarchitecture 090922221506-phpapp01
Introductiontowebarchitecture 090922221506-phpapp01Introductiontowebarchitecture 090922221506-phpapp01
Introductiontowebarchitecture 090922221506-phpapp01Maisha Price
 

What's hot (16)

Website designing company in faridabad
Website designing company in faridabadWebsite designing company in faridabad
Website designing company in faridabad
 
4 internet programming
4 internet programming4 internet programming
4 internet programming
 
Industrial training report
Industrial training report Industrial training report
Industrial training report
 
Web development
Web developmentWeb development
Web development
 
Mengelola isi halaman web 5 eng
Mengelola isi halaman web 5 engMengelola isi halaman web 5 eng
Mengelola isi halaman web 5 eng
 
HTML - hypertext markup language
HTML - hypertext markup languageHTML - hypertext markup language
HTML - hypertext markup language
 
Basic web architecture
Basic web architectureBasic web architecture
Basic web architecture
 
KMUTNB - Internet Programming 1/7
KMUTNB - Internet Programming 1/7KMUTNB - Internet Programming 1/7
KMUTNB - Internet Programming 1/7
 
Web designing and publishing computer studies theory lesson
Web designing and publishing computer studies theory lessonWeb designing and publishing computer studies theory lesson
Web designing and publishing computer studies theory lesson
 
SeniorProject_Jurgun
SeniorProject_JurgunSeniorProject_Jurgun
SeniorProject_Jurgun
 
Web Architecture
Web ArchitectureWeb Architecture
Web Architecture
 
Passport js authentication in nodejs how to implement facebook login feature ...
Passport js authentication in nodejs how to implement facebook login feature ...Passport js authentication in nodejs how to implement facebook login feature ...
Passport js authentication in nodejs how to implement facebook login feature ...
 
Static dynamic and active web pages
Static dynamic and active web pagesStatic dynamic and active web pages
Static dynamic and active web pages
 
Web Programming Assignment
Web Programming AssignmentWeb Programming Assignment
Web Programming Assignment
 
Getting Started With Linux® Shared Hosting
Getting Started With Linux® Shared HostingGetting Started With Linux® Shared Hosting
Getting Started With Linux® Shared Hosting
 
Introductiontowebarchitecture 090922221506-phpapp01
Introductiontowebarchitecture 090922221506-phpapp01Introductiontowebarchitecture 090922221506-phpapp01
Introductiontowebarchitecture 090922221506-phpapp01
 

Similar to Lecture 1 (2)

Web browser architecture
Web browser architectureWeb browser architecture
Web browser architectureNguyen Quang
 
NME WPI UNIt 3.pptx
NME WPI UNIt 3.pptxNME WPI UNIt 3.pptx
NME WPI UNIt 3.pptxSeethaDinesh
 
21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMSkoolkampus
 
Nt1310 Final Exam Questions And Answers
Nt1310 Final Exam Questions And AnswersNt1310 Final Exam Questions And Answers
Nt1310 Final Exam Questions And AnswersLisa Williams
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
The Factors For The Website
The Factors For The WebsiteThe Factors For The Website
The Factors For The WebsiteJulie May
 
MINOR PROZECT REPORT on WINDOWS SERVER
MINOR PROZECT REPORT on WINDOWS SERVERMINOR PROZECT REPORT on WINDOWS SERVER
MINOR PROZECT REPORT on WINDOWS SERVERAsish Verma
 
Rails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSRails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSTimo Herttua
 
Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Clarence Ngoh
 
Architecting RIAs with Silverlight
Architecting RIAs with SilverlightArchitecting RIAs with Silverlight
Architecting RIAs with SilverlightJosh Holmes
 
Web Database
Web DatabaseWeb Database
Web Databaseidroos7
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
 
Creating Effective Web Pages Creating HTML Documents
Creating Effective Web Pages Creating HTML Documents Creating Effective Web Pages Creating HTML Documents
Creating Effective Web Pages Creating HTML Documents webhostingguy
 
Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)Michael Dobe, Ph.D.
 

Similar to Lecture 1 (2) (20)

Rendering engine
Rendering engineRendering engine
Rendering engine
 
Web browser architecture
Web browser architectureWeb browser architecture
Web browser architecture
 
NME WPI UNIt 3.pptx
NME WPI UNIt 3.pptxNME WPI UNIt 3.pptx
NME WPI UNIt 3.pptx
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
 
21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS
 
Nt1310 Final Exam Questions And Answers
Nt1310 Final Exam Questions And AnswersNt1310 Final Exam Questions And Answers
Nt1310 Final Exam Questions And Answers
 
Web Browsers.pptx
Web Browsers.pptxWeb Browsers.pptx
Web Browsers.pptx
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
The Factors For The Website
The Factors For The WebsiteThe Factors For The Website
The Factors For The Website
 
Asp
AspAsp
Asp
 
MINOR PROZECT REPORT on WINDOWS SERVER
MINOR PROZECT REPORT on WINDOWS SERVERMINOR PROZECT REPORT on WINDOWS SERVER
MINOR PROZECT REPORT on WINDOWS SERVER
 
Rails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSRails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSS
 
Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)
 
Architecting RIAs with Silverlight
Architecting RIAs with SilverlightArchitecting RIAs with Silverlight
Architecting RIAs with Silverlight
 
Web Database
Web DatabaseWeb Database
Web Database
 
Lecture 10.pptx
Lecture 10.pptxLecture 10.pptx
Lecture 10.pptx
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
Web browser
Web browserWeb browser
Web browser
 
Creating Effective Web Pages Creating HTML Documents
Creating Effective Web Pages Creating HTML Documents Creating Effective Web Pages Creating HTML Documents
Creating Effective Web Pages Creating HTML Documents
 
Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
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...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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
 
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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Lecture 1 (2)

  • 1. RCS 301 INTERNET PROGRAMMING AND E-APPLICATIONS CHAPTER 1 1
  • 3. cont.. Introductions Who are you? (name, background). How is God working in your life? What's one interesting thing about you? 3
  • 4. Course Outline Web Technologies (Browser, HTML, The Dynamic web, Dynamic Server Concepts, Web Application Servers, XML, Plug-ins, and VRML) Security and privacy on the Internet (Cryptography, digital signatures, Client-based Security, Server-based security) Search engines and portals (Intelligent Network Agents, Portal Sites, All-in-One Mega web sites) 4
  • 5. cont.. Interactive Communication Experiences (Online meetings, Internet Chat Solutions, Internet-based Training (e-training, e-learning, portals) Electronic Commerce (The payment business, Comparing Payment Technologies (Postpaid Payment Systems, Instant-paid Payment Systems, Pre-paid Payment Systems, The future of Payment) 5
  • 6. Method of Assessment --Dave Cintron, Fast Track Web Programming: A Programmer’s Guide to Mastering Web Technologies, John Wiley & Sons. --www.w3schools.com. READING --Coursework (quizzes, tests, assignments/ homework/ practical) 40%. --End Semester Exam 60%. 6
  • 7. CHAPTER ONE WEB TECHNOLOGIES Browser, HTML, The Dynamic web, Dynamic Server Concepts, Web Application Servers, XML, Plug-ins, and VRML 7
  • 8. BROWSER -a computer application program with a graphical user interface that allows a user to locate, access, and display web pages. -common web browsers include; internet explorer, google chrome, safari, opera, mozilla firefox etc... 8
  • 9. Common Browser Error Messages Page Not Found (404) This error simply means that your browser is able to communicate with the website or the server you are trying to connect to, but the server could not find what you are looking for thus responding with a 404 error message. There are many reasons like deleted or moved content, behind the 404 error. 9
  • 10. cont.. Bad Gateway (502) This error message means while attempting to fulfill your request, the server which is acting as a gateway has received an invalid response from the upstream server. Most of the time, the problem is outside your computer and the error is generated due to the problems in the servers, and there is nothing much you can do to solve this problem. 10
  • 11. cont.. Service Unavailable (503) This error message appears whenever the website you are trying to reach is down at the current time, but the server itself is responding to the requests with an error message. There is not much you can do in order to get access to the server or the website. However, in rare cases, you may receive an error like “Service Unavailable – DNS Failure.” The reason for this might be an issue with your router or with the DNS service itself. In those cases, consider restarting your router or change the DNS services you are using to resolve the issue. 11
  • 12. cont.. Connection Timed Out This Error message simply means that the request sent by your computer isn’t being fulfilled within the predetermined time frame. The reasons for this type of error may be that the actual server or computer you are trying to access is not responding as it should, or there is a network problem with your connection. Try accessing other websites. If you can, then the problem may be with the website or the server you are visiting. If you can’t access the whole Internet, then it might be a network problem. 12
  • 13. cont.. Phishing or Malicious Content Warnings These warnings are some of the best things about the modern browser as they protect you from falling prey to the Internet fraud. Whenever your browser displays a phishing warning, it means that the website you are visiting is not what you think it is and is just faking to be the original site. Crackers usually use these phishing techniques to steal your passwords and other important information. In those cases, quit clicking on the links displayed on the web or in the emails and manually enter the website URL to be sure. 13
  • 14. How browsers work The main function of a browser is to present the web resources you choose by requesting it from the server and displaying it in the browser window. 14
  • 15. The browser’s high level structure The browser’s main components are; The user interface The browser engine The rendering engine Networking UI backend JavaScript Interpreter Data storage 15
  • 16. The user interface: this includes the address bar, back/forward button, bookmarking menu, etc. Every part of the browser display except the window where you see the requested page. The browser engine: organizes actions between the UI and the rendering engine.(the interface for querying and manipulating the rendering engine.) cont.. 16
  • 17. cont.. 3. The rendering engine : responsible for displaying requested content. For example if the requested content is HTML, the rendering engine analyses HTML and CSS, and displays the analysed content on the screen. 4. Networking: for network calls such as HTTP requests, using different implementations for different platform behind a platform-independent interface. 17
  • 18. cont.. 5. UI backend: used for drawing basic widgets like combo boxes and windows. This backend exposes a generic interface that is not platform specific. Underneath, it uses the operating system user interface methods. 6. JavaScript interpreter. Used to analyse(parse) and execute JavaScript code. 18
  • 19. cont.. 7. Data storage. The browser may need to save all sorts of data locally. Browsers also support storage mechanisms such as localStorage, IndexedDB, WebSQL and FileSystem. This is a persistence layer. 19
  • 21. cont.. It is important to note that browsers such as Chrome run multiple instances of the rendering engine: one for each tab. Each tab runs in a separate process. 21
  • 22. The rendering engine The responsibility of the rendering engine is well... Rendering, that is display of the requested contents on the browser screen. By default the rendering engine can display HTML and XML documents and images. It can display other types of data via plug-ins or extension; for example, displaying PDF documents using a PDF viewer plug- in. 22
  • 23. cont.. Rendering engines Different browsers use different rendering engines: Internet Explorer uses Trident, Firefox uses Gecko, Safari uses WebKit. Chrome and Opera (from version 15) use Blink, a fork of WebKit. WebKit is an open source rendering engine which started as an engine for the Linux platform and was modified by Apple to support Mac and Windows. See webkit.org for more details. 23
  • 24. cont.. The main flow The rendering engine will start getting the contents of the requested document from the networking layer. This will usually be done in 8kB chunks.After that, this is the basic flow of the rendering engine: Figure : Rendering engine basic flow 24
  • 25. cont.. The rendering engine will start parsing the HTML document and convert elements to DOM nodes in a tree called the "content tree". The engine will parse the style data, both in external CSS files and in style elements. Styling information together with visual instructions in the HTML will be used to create another tree: the render tree. The render tree contains rectangles with visual attributes like color and dimensions. The rectangles are in the right order to be displayed on the screen. After the construction of the render tree it goes through a "layout" process. This means giving each node the exact coordinates where it should appear on the screen. 25
  • 26. cont.. The next stage is painting–the render tree will be traversed and each node will be painted using the UI backend layer. It's important to understand that this is a gradual process. For better user experience, the rendering engine will try to display contents on the screen as soon as possible. It will not wait until all HTML is parsed before starting to build and layout the render tree. Parts of the content will be parsed and displayed, while the process continues with the rest of the contents that keeps coming from the network. 26
  • 29. cont. . From the above figures, WebKit and Gecko use slightly different terminology, the flow is basically the same. Gecko calls the tree of visually formatted elements a "Frame tree". Each element is a frame. WebKit uses the term "Render Tree" and it consists of "Render Objects". WebKit uses the term "layout" for the placing of elements, while Gecko calls it "Reflow". "Attachment" is WebKit's term for connecting DOM nodes and visual information to create the render tree. A minor difference is that Gecko has an extra layer between the HTML and the DOM tree. It is called the "content sink" and is a factory for making DOM elements. 29
  • 30. Hypertext Markup Language (HTML) -describes the content and structure of information on a web page. not the same as the presentation (appearance on screen) -surrounds text content with opening and closing tags -each tag's name is called an element syntax: <element> content </element> example: <p>This is a paragraph</p> -whitespace is frequently insignificant in HTML (ignored or collapsed to a single space) 30
  • 31. Structure of a HTML page <!DOCTYPE html> <html> <head> information about the page </head> <body> page contents. </body> </html> the header describes the page and the body contains the page's contents. HTML page is saved into a file ending with extension .html or .htm DOCTYPE tag tells browser to interpret our page's code as HTML 31
  • 32. Page title: <title> describes the title of the web page. <title>Chapter 1 part two: HTML Basics</title> placed within the head of the page displayed in the web browser's title bar and when bookmarking the page 32
  • 33. Paragraph: <p> paragraphs of text (block) <p>In the beginning was the Word, and the Word was with God, and the Word was God. He was with God in the beginning. </p> placed within the body of the page. 33
  • 34. Headings: <h1>, <h2>, ..., <h6> headings to separate major areas of the page. <h1>Ruaha catholic university</h1> <h2>Department of Computer Science</h2> <h3>Sponsored by Micro$oft</h3> Ruaha catholic university Department of Computer Science Sponsored by Micro$oft 34
  • 35. Horizontal rule: <hr> a horizontal line to visually separate sections of a page. <p>First paragraph</p> <hr /> <p>Second paragraph</p> First paragraph Second paragraph should be immediately closed with /> 35
  • 36. More about HTML tags some tags can contain additional information called attributes. syntax: <element attribute="value" attribute="value"> content </element> example: <a href="page2.html">Next page</a> some tags don't contain content; can be opened and closed in one tag syntax: <element attribute="value" attribute="value" /> example: <hr /> example: <img src="bunny.jpg" alt="pic from Easter" /> 36
  • 37. Links: <a> links, or "anchors", to other pages <p> Search <a href="http://www.google.com/">Google</a> or our <a href="01_course_introduction.html">Lecture Notes</a>. </p> Search Google or Lecture Notes. -uses the href attribute to specify the destination URL can be absolute (to another web site) or relative (to another page on this site) -anchors are inline elements; must be placed in a block element such as p or h1 37
  • 38. Block and inline elements block elements contain an entire large region of content examples: paragraphs, lists, table cells the browser places a margin of whitespace between block elements for separation inline elements affect a small amount of content examples: bold text, code fragments, images the browser allows many inline elements to appear on the same line must be nested inside a block element 38
  • 39. Images: <img> inserts a graphical image into the page (inline) <img src="images/gollum.jpg" alt="Gollum from LOTR" /> the src attribute specifies the image URL HTML5 also requires an alt attribute describing the image 39
  • 40. More about images <a href="http://theonering.net/"> <img src="images/gandalf.jpg" alt="Gandalf from LOTR" title="You shall not pass!" /> </a> if placed in an a anchor, the image becomes a link title attribute is an optional tooltip (on ANY element) 40
  • 41. Line break: <br> forces a line break in the middle of a block element (inline) <p>The Lord is my shepherd, I lack nothing.<br /> He makes me lie down in green pastures,<br /> he leads me beside quiet waters,</p> The Lord is my shepherd, I lack nothing. He makes me lie down in green pastures, he leads me beside quiet waters, Warning: Don't over-use br they are hard to apply css styles (more on this later) br should not be used to separate paragraphs or used multiple times in a row to create spacing 41
  • 42. Phrase elements : <em>, <strong> em: emphasized text (usually rendered in italic) strong: strongly emphasized text (usually rendered in bold) <p> HTML is <em>really</em>, <strong>REALLY</strong> fun! </p> HTML is really REALLY fun! as usual, the tags must be properly nested for a valid page. 42
  • 43. Nesting tags <p> HTML is <em>really, <strong>REALLY</em> lots of</strong> fun! </p> tags must be correctly nested (a closing tag must match the most recently opened tag) the browser may render it correctly anyway, but it is invalid HTML (how would we get the above effect in a valid way?) 43
  • 44. Comments <!-- ... --> comments to document your HTML file or "comment out" text <!-- My web page, by Anthony Jumanne 2015 --> <p>Computer science courses are <!-- NOT --> a lot of fun!</p> Computer science courses are a lot of fun! many web pages are not thoroughly commented (or at all) still useful at top of page and for disabling code comments cannot be nested and cannot contain a -- HTML comments are visible to anyone that views the page source code, but are not rendered when the HTML document is rendered by a browser. 44
  • 45. More HTML Elements Unordered list: <ul>, <li> ul represents a bulleted list of items (block) li represents a single item within the list (block) <ul> <li>No shoes</li> <li>No shirt</li> <li>No soup for you!</li> </ul> No shoes No shirt No soup for you! 45
  • 46. More about unorde red lists a list can contain other lists: <ul> <li>Tribes: <ul> <li>Levi</li> <li>Judah</li> <li>Benjamin</li> </ul> </li> <li>Disciples: <ul> <li>Peter</li> <li>John</li> </ul> </li> </ul> Tribes: Levi Judah Benjamin Disciples: -Peter -John 46
  • 47. Ordered list: <ol> ol represents a numbered list of items (block) <p>RIAA business model:</p> <ol> <li>Sue customers</li> <li>???</li> <li>Profit!</li> </ol> RIAA business model Sue customers ??? Profit! we can make lists with letters or Roman numerals using CSS 47
  • 48. Definition list:<dl> <dt>, <dd> dl represents a list of definitions of terms (block) dt represents each term, and dd its definition <dl> <dt>newbie</dt> <dd>one who does not have mad skills</dd> <dt>own</dt> <dd>to soundly defeat (e.gI owned that newbie!)</dd> <dt>frag</dt> <dd>a kill in a shooting game</dd> </dl> newbie one who does not have mad skills own to soundly defeat (e.g. I owned that newbie!) frag a kill in a shooting game 48
  • 49. Quotations: <blockquote> a lengthy quotation (block) <p>As Lincoln said in his famous Address:</p> <blockquote> <p>Fourscore and seven years ago, our fathers brought forth on this continent a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal.</p> </blockquote> As Lincoln said in his famous Address: Fourscore and seven years ago, our fathers brought forth on this continent a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal. 49
  • 50. Inline quotations: <q> a short quotation (inline) <p>Quoth the Raven, <q>Nevermore.</q></p> Quoth the Raven, Nevermore. Why not just write the following? <p>Quoth the Raven, "Nevermore."</p> We don't use " marks for two reasons: HTML shouldn't contain literal quotation mark characters; they should be written as &quot; using <q> allows us to apply CSS styles to quotations. 50
  • 51. HTML Character Entities a way of representing any Unicode character within a web page character(s) entity < > &lt; &gt; é è ñ &eacute; &egrave; &ntilde; ™ © &trade; &copy; π δ Δ &pi; &delta; &Delta; И &#1048; ® &reg; list of HTML entities https://www.w3schools.com/html/html_entities.asp) 51
  • 52. cont.. Reserved characters in HTML must be replaced with character entities. Characters that are not present on your keyboard can also be replaced by entities. example If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags. To display a less than sign (<) we must write: &lt; or &#60; 52
  • 53. What is new in html5 The DOCTYPE declaration for HTML5 is very simple: <!DOCTYPE html> New HTML5 Elements The most interesting new HTML5 elements are: New semantic elements like <header>, <footer>, <article>, and <section>. New attributes of form elements like number, date, time, calendar, and range. New graphic elements: <svg> and <canvas>. New multimedia elements: <audio> and <video>. 53
  • 54. Removed Elements in HTML5 Some of removed Elements in HTML5 The following HTML 4 elements have been removed in html5; Removed Element Use Instead <acronym> <abbr> <applet> <object> <basefont> CSS <big> CSS <center> CSS <dir> <ul> <font> CSS <strike> CSS 54
  • 55. CHOOSING A HTML EDITOR Both code and WYSIWYG html editors exist. There is a debate over whether to use a WYSIWYG editor instead of code. WYSIWYG stands for What You See Is What You Get. With WYSIWYG you can drag and drop, insert images and create numbered or bullet lists using an editor just like in Word. The editor would then take that and create the HTML code for you. 55
  • 56. cont.. Some of the html code editors Sublime text Brackets Aptana Studio 3 Notepad++ Some of the html WYSIWYG editors Seamonkey Amaya kompozer Trellian WebPage 56
  • 57. The dynamic web A website, or individual web page, can be static or dynamic. A static website contains information that does not change. It remains the same, or static, for every viewer of the site. A dynamic website is a site that contains dynamic (changing) contents depending on the viewer, the time of the day, the viewer's native language, and other factors. 57
  • 58. Types of dynamic websites A dynamic website can contain client-side scripting or server-side scripting to generate the changing content, or a combination of both scripting types. Scripts A script is a set of instructions. For Web pages they are instructions either to the Web browser (client-side scripting) or to the server (server-side scripting). These are explained more below. 58
  • 59. Client-side The client is the system on which the Web browser is running. JavaScript is the main client-side scripting language for the Web. Client-side scripts are interpreted by the browser. The process with client-side scripting is: the user requests a Web page from the server the server finds the page and sends it to the user the page is displayed on the browser with any scripts running during or after display. 59
  • 60. cont.. So client-side scripting is used to make Web pages change after they arrive at the browser making pages a bit more interesting and user-friendly. Client-side scripts rely on the user's computer. If that computer is slow they may run slowly. They may not run at all if the browser does not understand the scripting language. As they have to run on the user's system the code which makes up the script is there in the HTML for the user to look at (and copy or change). 60
  • 61. Server-side The server is where the Web page and other content lives. The server sends pages to the user/client on request. The process is: the user requests a Web page from the server the script in the page is interpreted by the server creating or changing the page content to suit the user and the occasion. the page in its final form is sent to the user and then cannot be changed using server-side scripting 61
  • 62. cont.. The use of HTML forms allow data to be sent to the server and processed. Server-side scripting tends to be used for allowing users to have individual accounts and providing data from databases. It allows a level of privacy, and personalisation. E-commerce, login pages, submission forms, and social networking sites all rely heavily on server-side scripting. PHP, JSP, and ASP.net are the technologies for server-side scripting. 62
  • 63. The combination A site such as Google, Amazon, or Facebook will use both types of scripting: server-side handles logging in, personal information and preferences and provides the specific data which the user wants (and allows new data to be stored) client-side makes the page interactive, displaying or sorting data in different ways if the user asks for that by clicking on elements with event triggers 63
  • 64. Dynamic Server Concepts "Web server" can refer to hardware or software, or both of them working together. On the hardware side, a web server is a computer that stores web server software and a website's component files (e.g. HTML documents, images, CSS stylesheets, and JavaScript files). It is connected to the Internet and supports physical data interchange with other devices connected to the web. 64
  • 65. cont.. 2. On the software side, A web server is a specialized type of file server. Its job is to retrieve files from the server’s hard drive, format the files for the Web browser, and send them out via the network. The function of a typical Web server is shown below. The user requests a web page. The Web Server finds the web page file and sends it back out to the user. The Web Server standards were originally designed to publish static documents on the Internet. 65
  • 66. 66
  • 67. As the Internet and Web browsers became popular in the mid-1990’s, organizations saw an opportunity to provide web pages that contained dynamic content like stock prices, weather information, and shipping status for a package. So, Web servers had to be extended to allow software application development and access to databases. cont.. 67
  • 68. Then, What is a Web Application Server? Web application servers are designed specifically to extend web servers to support dynamic content. The application server software “hooks in” to the web server software and automatically intercepts any user requests for dynamic content. The web server still sends out static web pages and graphic files–Just like before. But now, the application server can create dynamic content by running programs, or by accessing databases. 68
  • 69. 69
  • 70. cont.. There are a variety of Web Application Server product available. Some of the more popular products include: Macromedia: Cold Fusion Cold Fusion is inexpensive and easy to learn resulting in low cost for both development and implementation. 70
  • 71. XML XML, or Extensible Markup Language, is a markup language that you can use to create your own tags. It was created to overcome the limitations of HTML. XML is a software- and hardware-independent tool. It is extensible because it is not a fixed format like HTML (which is a single, predefined markup language). Instead, XML is a language which lets you design your own markup languages. 71
  • 72. cont.. A markup language is a set of words and symbols for describing the identity or function of the parts of a document (for example ‘this is a paragraph’, ‘this is a heading’, ‘this is a list’, ‘this is the caption of this figure’, etc). XML is sometimes referred to as ‘self-describing’ because the names of the markup elements can represent the type of content they hold (eg title, chapter, link, etc). 72
  • 73. Some key terminologies Tag A tag is a markup construct that begins with < and ends with >. Tags come in three flavors: start-tag, such as <section>; end-tag, such as </section>; empty-element tag, such as <line-break />. Element An element is a logical document component that either begins with a start-tag and ends with a matching end-tag or consists only of an empty-element tag. example <greeting>Hello!</greeting>. 73
  • 74. cont.. XML declaration XML documents may begin with an XML declaration that describes some information. An example is; <?xml version="1.0" encoding="UTF-8"?>. 74
  • 75. So XML is Just Like HTML? No. In HTML, the tag is fixed(predefined). An <q> is always an inline quotation tag and the tag <book> is meaningless. XML provides a facility to define tags and the relationships between them. Since there's no predefined tag set, there can't be any preconceived meaning. 75
  • 76. Some XML editors 1. XML Notepad 2. EditiX 3. FontoXML 4. Oxygen XML Editor 76
  • 77. XML Syntax The syntax rules of XML are very simple and logical. The rules are easy to learn, and easy to use. <?xml version="1.0" encoding="UTF-8"?> <root> <child> <subchild>.....</subchild> </child> </root> 77
  • 79. cont.. To: Tove From: Jani Heading: Reminder Body: Don't forget me this weekend! 79
  • 80. cont.. In XML, it is illegal to omit the closing tag. All elements must have a closing tag: Note: The XML prolog does not have a closing tag! This is not an error. XML tags are case sensitive. The tag <Letter> is different from the tag <letter>. Opening and closing tags must be written with the same case:<message>This is correct</message> In XML, all elements must be properly nested within each other: <b><i>This text is bold and italic</i></b> 80
  • 81. cont.. -In XML, the attribute values must always be quoted: <note date="12/11/2007"> <to>Tove</to> <from>Jani</from> </note> -XML does not truncate multiple white-spaces (HTML truncates multiple white-spaces to one single white- space): XML: Hello Tove HTML: Hello Tove 81
  • 82. XML Elements An XML document contains XML Elements. An XML element is everything from (including) the element's start tag to (including) the element's end tag. <price>29.99</price> An element can contain: text, attributes, other elements, or a mix of the above. <bookstore> <book category="children"> <title>Harry Potter</title> <year>2005</year> <price>29.99</price> </book> </bookstore> 82
  • 83. cont.. In the example above: <title>, <author>, <year>, and <price> have text content because they contain text (like 29.99). <bookstore> and <book> have element contents, because they contain elements. <book> has an attribute (category="children"). 83
  • 84. XML Tree Structure XML documents form a tree structure that starts at "the root" and branches to "the leaves". 84
  • 85. XML Attributes XML elements can have attributes, just like HTML. They are designed to contain data related to a specific element Attribute values must always be quoted. Either single or double quotes can be used. <person gender="female"> or <person gender='female'> If the attribute value itself contains double quotes you can use single quotes, like in this example: <gangster name='George "Shotgun" Ziegler'> or you can use character entities 85
  • 86. XML Elements vs. Attributes Take a look at these examples: <person gender="female"> <firstname>Anna</firstname> </person> <person> <gender>female</gender> <firstname>Anna</firstname> </person> 86
  • 87. cont.. In the first example gender is an attribute. In the last, gender is an element. Both examples provide the same information. There are no rules about when to use attributes or when to use elements in XML. 87
  • 88. Entity characters There are 5 predefined entity references in XML: &lt; < less than &gt; > greater than &amp; & ampersand &apos; ' apostrophe &quot; " quotation mark 88
  • 89. cont.. If you place a character like "<" inside an XML element, it will generate an error because it’s interpreted as the start of a new element. This will generate an XML error: <message>salary < 1000</message> To avoid this error, replace the "<" character with an entity reference: <message>salary &lt; 1000</message> 89
  • 90. Comments in XML The syntax for writing comments in XML is similar to that of HTML: <!-- This is a comment --> Two dashes in the middle of a comment are not allowed: <!-- This is an invalid -- comment --> 90
  • 91. PLUGINS A plug-in (or plugin, add-in, add-on, or extension) is a software component that adds a specific feature to an existing computer program. The common examples are the plug-ins used in web browsers to add new features such as search engines, virus scanners, or the ability to use a new file type such as a new video format. 91
  • 92. Why plug ins? Applications support plug-ins for many reasons. Some of the main reasons include: to enable third-party developers to create abilities which extend an application to support easily adding new features to reduce the size of an application to separate source code from an application because of incompatible software licenses. 92
  • 93. How plugins work The life cycle of a plug-in, unlike that of an application, is completely controlled by the web page that calls it. When a browser starts, it looks for plugin on the system. When the user opens a page that contains embedded data of a media type that invokes a plug- in, the browser responds with the following sequence of actions: 93
  • 94. cont.. check for a plug-in with a matching MIME type load the plug-in code into memory initialize the plug-in If you are browsing a page that has several embedded RealAudio clips, for example, the browser will create as many instances of the RealPlayer plug- in as are needed (though of course playing several RealAudio files at the same time would not be a good idea). 94
  • 95. cont.. When the user leaves the page or closes the window, the plug-in instance is deleted. When the last instance of a plug-in is deleted, the plug-in code is unloaded from memory. A plug-in consumes no resources other than disk space when it is not loaded. 95
  • 96. The following stages outline the life of a plug-in from loading to deletion: When Gecko encounters data of a MIME type registered for a plug-in (either embedded in an HTML page or in a separate file), it dynamically loads the plug-in code into memory, if it hasn't been loaded already, and it creates a new instance of the plug-in. Gecko calls the plug-in API function NPP_Initialize when the plug-in code is first loaded. By convention, all of the plug-in specific functions have the prefix "NPP", and all of the browser-specific functions have the prefix "NPN". 96
  • 97. cont.. The browser calls the plug-in API function NPP_New when the instance is created. Multiple instances of the same plug-in can exist (a) if there are multiple embedded objects on a single page, or (b) if several browser windows are open and each displays the same data type. A plug-in instance is deleted when a user leaves the instance's page or closes its window; Gecko calls the function NPP_Destroy to inform the plug- in that the instance is being deleted. 97
  • 98. cont.. When the last instance of a plug-in is deleted, the plug-in code is unloaded from memory. Gecko calls the function NPP_Shutdown. Plug-ins consume no resources (other than disk space) when not loaded. 98
  • 99. Using HTML to Display Plug- Ins When a user browses to a web page that invokes a plug-in, how the plug-in appears (or does not appear) depends on two factors: The way the developer writes the plug-in determines whether it is displayed in its own window or is windowless. The way the content provider uses HTML elements to invoke the plug-in determines its display mode: whether it is embedded in a page, is part of a section, appears on its own separate page, or is hidden. 99
  • 100. VRML (Virtual Reality Modeling Language) Virtual Reality Modeling Language (VRML) is an open-standard programming language created to design three-dimensional (3-D) and Web-based models, textures and illusion. VRML is used to illustrate 3-D objects, buildings, landscapes or other items requiring 3-D structure and is very similar to Hypertext Markup Language (HTML). VRML also uses textual representation to define 3-D illusion presentation methods. 100
  • 101. What are the strengths of VRML? VRML is a highly dynamic, extensible language. The architects of VRML designed the language in a very modular format. Every object is created in its own world. For instance, if a vase was designed in VRML, it would first be constructed in its own world coordinates. If a designer wanted to place the vase in a mansion that he was creating, he could simply translate, rotate, and scale the vase so it fit exactly where he wanted it to. By specifying components such as the vase in a generic coordinate system, large libraries of VRML components can be created that developers can reference. 101
  • 102. What are the weaknesses of VRML? Unfortunately, VRML is fairly slow. Given VRML's architecture, it will always have trouble competing with 3d implementations that squeeze the last little bit of performance out of the CPU and graphics hardware. Since VRML is so abstract, it will always be one step behind applications that are optimized for a particular architecture. 102

Editor's Notes

  1. The Multipurpose Internet Mail Extensions (MIME) type is a standardized way to indicate the nature and format of a document. It is defined and standardized in IETF RFC 6838. The Internet Assigned Numbers Authority (IANA) is the official body responsible for keeping track of all official MIME types, and you can find the most up-to-date and complete list at the Media Types page.
  2. API=application programming interface. In general terms, it is a set of clearly defined methods of communication between various software components.