Web Engineering
Web Engineering
Internet began as a research network funded by Advanced Research Projects Agency (ARPA) of the US
Defense department, when the first node of the ARPANET was installed at the University of California at
Los Angeles in Sept‟ 1969.
The various services provides on the internet are: ftp, telnet, www, http/https, smtp, pop, imap, dns, etc.
Each internet service is implemented on an internet server via dedicated software known as “daemon”.
In 1983, DNS (domain name system) was developed to rationally assign names and addresses to
computers linked to the internet e.g. gmail.com.
URL (uniform resource locator) was standardized in 1994 to uniquely identify documents on the internet.
The format of the URL is as follows:
protocol://server.subDomain.domainName.topLevelDomain/directory/filename.filetype
e.g. http://www/ieee.msit.in/events/seminar.html
# URI (I:Identifier) = URL and URN; URN (N:Name) is URL without any protocol.
The “world wide web” started in 1989 at CERN, Geneva Switzerland. CERN stands for Couseil European
pour la Recherche Nucleaire (European Organization for Nuclear Research).
Tim-Berners Lee is known as “Father of www”.
Tim-Berners Lee wanted to develop a hypertext (text linked to a resource) system in order to enable
information sharing among geographically separated teams of researchers in a more efficient and easy
manner. The main purpose for which www was designed to deliver are:
i. Linking a multiplicity of documents located on computers within internet.
ii. Making retrieval of documents quick and easy.
iii. One of the original purpose of the web was to disseminate research for academic use.
iv. The main use of the web now is for entertainment and business purpose.
Tools for www: web server (Apache HTTP Server / Microsoft’s IIS i.e. Internet Information
Services / nginx / GWS (Google Web Server) / LiteSpeed), browser, plugin, search engines.
Users typically use a program that uses SMTP for sending e-mail and either POP3 or IMAP for
receiving e-mail. POP creates local copies of e-mails and deletes original from the server. IMAP keeps
mail on remote e-mail server and allows you to view your mail from more than one place.
To identify the nature of data transmitted, the internet uses a standard list of filename extensions called
Multipurpose Internet Mail Extensions (MIME) e.g. jpg, mpg, etc.
SGML (Standard Generalized Markup Language) is a standard for defining generalized
markup languages for documents, developed by ISO in 1986.
The derivatives of SGML are HTML, XML and WML.
HTML was developed by W3C (WWW Consortium) in 1993 as a markup language for
hypertext documents.
Extensible Markup Language (XML) is a markup language that defines a set of rules for
encoding documents in a format that is both human-readable and machine-readable; developed
by W3C in 1996. XML was designed to store and transport data.
Wireless Markup Language (WML), based on XML, is a markup language intended for
devices that implement the Wireless Application Protocol (WAP) specification, such as mobile
phones. It provides navigational support, data input, hyperlinks, text and image presentation, and
forms, much like HTML (HyperText Markup Language).
Contents of <head>
<title> is for title of html page
<style> is for internal CSS
<link> is for external CSS
<script> for script file e.g. JavaScript file,
<base> for base URL
<meta name=“keywords” contents=“HTML,CSS,XML,JavaScript”>
<meta name=“author” contents=“Tim”>
<meta name=“description” contents=“Web Engineering Tutorial”>
<meta charset="UTF-8">
<ol type=“1”>
Ordered List. Value of type can be “1” (default) or “A” or “a” or “I” or “I”
<li>item1</li>
<li>item2</li>
</ol>
<frameset cols=”25%,50%,25%”>
<frame name=“left” src=“a.html”>
<frame name=“left” src=“b.html”>
<frame name=“left” src=“c.html”>
</frameset>
<form>
<input type=“text” name=“t1”>
<input type=“password” name=“p1”>
<input type=“submit” name=“s1”>
<input type=“reset” name=“r1”>
<input type=“button” onclick=“alert(„Hello World!‟)” value=“Click Me!”>
<input type=“radio” name=“gender” value=“male” checked>Male
<input type=“checkbox” name=“vehicle” value=“bike” checked>Bike
<select name=“cars”>
<option value=“volvo”>Volvo</option>
<option value=“fiat”>Fiat</option>
</select>
<textarea name=“message” rows=“10” cols=“30”> This is text area. </textarea>
<button type=“button” onclick=“alert(„Hello World!‟)”>“Click Me!”</button>
</form>
CSS
CSS stands for Cascading Style Sheets.
CSS describes how HTML elements are to be displayed on screen, paper, or in other media.
CSS saves a lot of work. It can control the layout of multiple web pages all at once.
Internal CSS:
<html><head><style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style></head><body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
External CSS:
styles.css
body { background-color: powderblue; }
h1 { color: blue; }
p { color: red; }
CSS selectors
● Element selector e.g. div{color:blue;}, p{font-size:18px;}
● Group selector e.g. div, p { font-size : 18px; }
● ID selector e.g. #para1{text-align:center;color:red;} <p id=“para1”>Text</p>
● Class selector e.g. .center{text-align:center;color:red;}
<h1 class=“center”>Text1</h1> <p class=“center”>Text2</h1>
All HTML elements can be considered as boxes. In CSS, the term "box model" is used when
talking about design and layout.
The CSS box model is essentially a box that wraps around every HTML element. It consists of:
margins (outermost), borders, padding, and the actual content (innermost).
XML tags identify the data and are used to store and organize the data, rather than specifying
how to display it like HTML tags, which are used to display the data.
XML tags are user-defined. XML tags are case-sensitive. XML tags must be closed in an
appropriate order.
An XML document is a basic unit of XML information composed of elements and other markup
in an orderly package.
A simple document is shown in the following example:
<?xml version = "1.0"?>
<contact-info>
<name>Tanmay Patil</name>
<company>TutorialsPoint</company>
<phone>(011) 123-4567</phone>
</contact-info>
XML declaration contains details that prepare an XML processor to parse the XML document.
It is optional, but when used, it must appear in the first line of the XML document.
<?xml
version = "version_number"
encoding = "encoding_declaration"
standalone = "standalone_status"
?>
<?xml version = "1.0" encoding = "UTF-8" standalone = "no" ?>
<?xml version = '1.0' encoding = 'iso-8859-1' standalone = 'no' ?>
Parameter “standalone” informs the parser whether the document relies on the information from
an external source, such as external document type definition (DTD), for its content. The default
value is set to no. Setting it to yes tells the processor there are no external declarations required
for parsing the document.
There are two current versions of XML. The first (XML 1.0) was initially defined in 1998. The
second (XML 1.1) was initially published on February 4, 2004. XML 1.1 is not very widely
implemented.
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
</book>
<book id="bk112">
<author>Galos, Mike</author>
<title>Visual Studio 7: A Comprehensive Guide</title>
<price>49.95</price>
<publish_date>2001-04-16</publish_date>
</book>
</catalog>
XML DTD
The purpose of a DTD is to define the structure of an XML document. It defines the structure
with a list of legal elements. With a DTD, you can verify that the data you receive from the
outside world is valid.
<!DOCTYPE note
[
<!ELEMENT note (to,from,heading,body,footer)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ELEMENT footer (#PCDATA)>
<!ENTITY nbsp " ">
<!ENTITY writer "Writer: Donald Duck.">
<!ENTITY copyright "Copyright: W3Schools.">
]>
<note>
<to>Tove</to>
<from>Jani</from>
<body>Don't forget me this weekend!</body>
<footer>&writer; ©right;</footer>
</note>
!DOCTYPE note defines that the root element of the document is note
!ELEMENT note defines that the note element must contain the elements: "to, from, body,
footer"
!ELEMENT to defines the to element to be of type "#PCDATA"
An !ENTITY has three parts: an ampersand (&), an entity name, and a semicolon (;). The XML
parser replaces the entity with its value defined in the DTD.
#PCDATA means parseable text data, CDATA is non-parseable text data (ignored by parser).
The term CDATA means, Character Data. By using CDATA section, you are commanding the
parser that the particular section of the document contains no markup and should be treated as
regular text.
<script>
<![CDATA[
<message> Welcome to TutorialsPoint </message>
]] >
</script >
Characters between these two enclosures are interpreted as characters, and not as markup. This
section may contain markup characters (<, >, and &), but they are ignored by the XML
processor.
XHTML
● XHTML stands for EXtensible HyperText Markup Language
● XHTML is almost identical to HTML
● XHTML is stricter than HTML
● XHTML is HTML defined as an XML application
XPath uses path expressions to select nodes in an XML document. The node is selected by
following a path or steps. The most useful path expressions are listed below:
WML
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml" >
<wml>
<card id="main" title="First Card">
<p mode="wrap">This is a sample WML page.</p>
</card>
</wml>
WMLScript is a procedural programming language and dialect of JavaScript used for WML
pages and is part of the Wireless Application Protocol (WAP).
WMLScript is a client-side scripting language and is similar to JavaScript. Just like JavaScript
WMLScript is used for tasks such as user input validation, generation of error message and other
Dialog boxes etc.
WAP tools: Nokia WAP Phone Simulator, Nokia WAP Gateway Simulator, Apache Web Server
for WAP.
HTML5
In year 2000, the World Wide Web Consortium (W3C) recommended XHTML 1.0.
The W3C HTML5 recommendation was released 28 October 2014.
● HTML5 has reduced need for external plugins, like Flash.
● HTML5 has new form controls, like calendar, date, time, email, URL, search.
● HTML5 has new content specific elements, like article, footer, header, NAV, section.
● HTML5 has the canvas element for drawing.
● In HTML5, JS GeoLocation API helps in identifying location.
● <html>, <head>, <body> tages can be omitted.
● The attributes of <body> and <table> tags have been obsoleted and CSS styling is
recommended to format body and table. <frame> have been obsoleted as well.
<!DOCTYPE html>
<meta name=viewport” content=”width=device-width, initial-scale=1.0”>
<img src=”a.jpg” style=”width=100%;”>
<h1 style=”font-size:10vw”>Hello World!</h1>
<input type=”email” name=“email”>
<input type=”date” name=“bday”>
<input type=”search” name=“googlesearch”>