KEMBAR78
Web Technology Complete Course | PDF | World Wide Web | Internet & Web
0% found this document useful (0 votes)
28 views100 pages

Web Technology Complete Course

A web application is a program accessed via a web browser, typically hosted on a remote server, and can serve various functions such as e-commerce, social media, and online forms. It operates through a client/server model, where users send requests to a web server that processes and responds with the requested information. While web applications offer benefits like accessibility and reduced installation needs, they also have disadvantages, including dependency on internet connectivity and potential security concerns.

Uploaded by

mominahnaeem14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views100 pages

Web Technology Complete Course

A web application is a program accessed via a web browser, typically hosted on a remote server, and can serve various functions such as e-commerce, social media, and online forms. It operates through a client/server model, where users send requests to a web server that processes and responds with the requested information. While web applications offer benefits like accessibility and reduced installation needs, they also have disadvantages, including dependency on internet connectivity and potential security concerns.

Uploaded by

mominahnaeem14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 100

What is a Web Application?

Definition of Web-application

A web-application is an application program that is usually stored on a remote server, and users
can access it through the use of Software known as web-browser.

Another definition

It is a type of computer program that usually runs with the help of a web browser and also uses
many web technologies to perform various tasks on the internet.

A web application can be developed for several uses, which can be used by anyone like it can be
used as an individual or as a whole organization for several reasons.

In general, a web application can contain online shops (or we can also say them e-commerce
shops), webmail's, calculators, social media platforms, etc. There is also some kind of web
application that usually requires a special kind of web browser to access them. We cannot access
those kinds of web applications by using regular web- browsers. However, most of the web
applications available on the internet can be accessed using a standard web browser.

If we talk about the web application in general, a web application usually uses a combination of
the server-side scripts such as PHP, ASP, for handling the information/ data storage and retrieval
of the data.
Some of them also use the client-side scripts such as JavaScript, HTML to represent the
data/information in front of the users, and some of the web applications are also using both server-
side and client-side at the same time.

It allows the users to communicate with the organization or companies by using the online form,
online forums, shopping carts, content management system, and much more.

Apart from that web applications also allow its users to create documents, share them, or share the
data/ information. By using the web application, users can collaborate on same projects by event
when they are not available on the same geographical location.

After knowing that what a web application is, there may be a question hitting in mind that how it
will work.

Let's understand the working of the web-application.

How does a web- application work?

In general, web-application does not require downloading them because, as we already discussed,
the web application is a computer program that usually resides on the remote server. Any user can
access it by using one of the standard web browsers such as Google Chrome, Safari, Microsoft
Edge, etc., and most of them are available free for everyone.

A web application are generally coded using the languages supported by almost every web-
browsers such as HTML, JavaScript because these are the languages that rely on the web browsers
to render the program executable.

Some of the web applications are entirely static due to which they not required any processing on
the server at all while, on the other hand, some web applications are dynamic and require server-
side processing.

To operate a web- application, we usually required a web server (or we can say some space on the
web-server for our programs/application's code) to manage the clients' upcoming requests and
required an application server.

The application server performs the task that requested by the clients, which also may need a
database to store the information sometimes. Application server technologies range
from ASP.NET, ASP, and ColdFusion to PHP and JSP.
A standard web application usually has short development cycles and can be easily developed with
a small team of developers. As we all know, most of the currently available web applications on
the internet are written using the programming languages such as the HTML (or HyperText
Markup Language), CSS( or Cascading Style Sheets), and Javascript that are used in
creating front-end interface (Client-side programming).

To create the web applications script, server-side programming is done by using programming
languages such as Java, Python, PHP, and Ruby, etc. Python and Java are the languages that
are usually used for server-side programming.

The Flow of the Web Application

Let's understand how the flow of the typical web application looks like.
1. In general, a user sends a request to the web-server using web browsers such as Google
Chrome, Microsoft Edge, Firefox, etc over the internet.
2. Then, the request is forwarded to the appropriate web application server by the web-
server.
3. Web application server performs the requested operations/ tasks like processing the
database, querying the databases; produces the result of the requested data.
4. The obtained result is sent to the web-server by the web application server along with the
requested data/information or processed data.
5. The web server responds to the user with the requested or processed data/information and
provides the result to the user's screen .

Benefits of a web application

Let see some of the significant benefits offered by a web application:

o Any typical web application can run or accessible on any operating system such as the
Windows, Mac, Linux as long as the browser is compatible.
o A web application is usually not required to install in the hard drive of the computer system,
thus it eliminates all the issues related to the space limitation.
o All the users are able to access the same version of the web application, which eliminates
all compatibility issues.
o It also reduces software piracy in subscription-based web applications, for example, SAAS
(or Software as a service).
o They also reduce the expense for end-users, business owners because the maintenance
needed by the business is significantly less.
o Web applications are flexible. A user can work from any geographical location as long as
he has a working internet connection.
o It just takes a moment to create a new user by providing a username, password, and URL,
and it's all.
o After the availability of the cloud, storage space is now virtually unlimited as long as you
can afford it.
o A web application can be programmed to run on a wide variety of operating systems, unlike
native applications that can run on a particular platform.
o Any standard web application is developed with some basic programming languages like
HTML, CSS that are compatible and well known among the IT professionals.

Disadvantages of the Web Applications

As we all know, there are two sides of anything; if something has some advantages, it may also
have limitations/ disadvantages. Consider the following disadvantages of the web applications.

o Internet connection is necessary to access any web application, and without an internet
connection, anyone can't use any of the web applications. It is very typical to get an internet
connection in our modern cities, still rural area internet connectivity not so well.
o Several people in business believe that their data on the cloud environment is no that secure
and likes to stick with old methods; they even don't want to use new methods.
o As we all know that many users like to use different web browsers according to their needs
and choices. So while creating a web application, you must remember that your application
must support several web browsers, including new and old versions of browsers.
o Speed-related issues are also affecting the web application's performance because there are
several factors on which the performance of a web application depends, and these all
factors affect the performance of the web application in their own way.
o If a user's web application faces any kind of issues, or if he does not have a good quality
corporate website, his web application will not be going to run correctly, smoothly.
o A user must have to spend enough money to maintain the good condition of his web
application, provide an update whenever an issue occurs, and make an attractive user
interface, which is not so cheap at all.
o A web application must be programmed/ coded in such a way that it will be run regardless
of the device's operating system.
o A web application may face some issues while running on Windows, Android, or several
other operating systems if it is not responsive.

There are several advantages and disadvantages of web applications; it is impossible to discuss
them all at once. So in the above, we only discussed some critical and useful points that may help
you quickly understand the pros and cons of the web application.

TCP/IP Services & Application Protocols

The Client/Server Model

TC/IP applications operate at the application or process layer of the TCP/IP hierarchy as discussed
in the preceding sections. TCP/IP protocol splits an application into server and client components.
The server component is a service provider that controls commonly shared resources pertaining
to a particular application on the network. The server normally runs on a remote, high-
powered, computer to which only authorized users have access. The client component is the
service user. That piece of software engages with the server in a sequence of request-response
data grams fulfilling certain user-specified demands or requirements.

The client/server computing model has the following attributes;


Flexible deployment This can be easily customized.
Low computer cost Reduced processing requirement at the client end. In most cases, the client
has to deal with lesser details of the application compared to the Server. This, in turn,. Means
cheaper hardware on the client machine (less CPU power, memory, disk space, and so on). On
the other hand, the server must be powerful enough and well-outfitted to make it respond
satisfactorily to the user demands on its services.
Increased network management costs Reduced loss of bandwidth from unnecessary data traffic,
due to the exchange of data on an as-needed basis. In the case of an Ethernet LAN, this also
contributes to reduced collisions and therefore, better networks availability.
Lower transmission facility costs.

Telnet

Telnet is a program that allows a user with remote login capabilities to use the computing
resources and services available on the host. Telnet can also be used to connect other ports serving
user defined as well as well-known services. The telnet program requires two arguments that is
the name of a computer on which the server runs and the protocol port number of the server.
Telnet service is unique in that it is not platform-specific like other TCP/IP services. A DOS user
running Telnet, for example, can connect to a UNIX host or a mainframe computer. The 90wn
side of using Telnet, however, is that unless the user is familiar with the operating system running
on the remote platform, he or she cannot use the desired resources easily.

File Transfer Protocol (FTP)

File Transfer protocol is among the oldest protocols still used in the internet. FTP is widely
available on almost all-computing platforms, including DOS, OS/2, UNIX, and up to
the mainframe level. FTP is a file server access protocol that enables a user to transfer files
between two hosts across the network or Internet. This is also established through TCP. Accessing
FTP sites over the internet requires that the user must have the knowledge of the location and the
name of the desired files.
Unlike Telnet, FTP does not require any familiarity with the remote operating system. The user
is still required, however, to be familiar with the FTP command set built into the protocol itself
so that he or she can productively manage the session.
Modem FTP servers known as ftpd support two modes, the classic normal mode and more
security conscious passive mode or PASV mode.

Trivial File Transfer Protocol (TFTP)

TITP, like ITP, is also an internet service intended for the transfer of files between hosts. Unlike
ITP, however, TITP does not rely on TCP for transport services. Instead, TITP uses UDP to
shuttle the requested file to the TITP client.

Simple Mail Transfer Protocol (SMTP)

The Simple Mail Transfer Protocol is an electronic mail (e-mail) service provider. It is intended
for the Transfer of e-mail messages across ·the network. SMTP uses TCP transport for the reliable
delivery of mail messages. When there is an outgoing mail, the SMTP client will connect to the
SMTP server and sends the mail to the remote server.

Network File System (NFS)


Network File System service enables hosts across the network to share file system resources
transparently among themselves. Although it all started on UNIX platforms, NFS can be
implemented on any platform, including DOS, NetWare, and Windows NT.

Simple Network Management Protocol (SNMP)

Using the Simple Network Management Protocol, LAN administrators can monitor and tune the
performance of TCP/IP (as well as non-TCP/IP) networks. Using SNMP, all kinds
of information about network performance can be gathered, including statistics, routing tables,
and configuration-related parameters. The information and configuration gathering capabilities
of SNMP make it an ideal tool for network troubleshooting and performance tuning.

Domain Name System (DNS)

Due to Internet explosion, it is not practical to keep an exhaustive hosts file for every host because
of the sheer volume of listing as well as addition, deletion and updating of new, old and current
hosts. Therefore, DNS is used to provide host-to-IP address mapping of remote hosts to the local
hosts and vice versa. As we know that each device connected directly to the network must have
an IP address that is uniquely assigned to it. The address takes the form of a dotted decimal
notation such as 128.45.6.89
Web Server

Overview

Web server is a computer where the web content is stored. Basically web server is used to host
the web sites but there exists other web servers also such as gaming, storage, FTP, email etc.
Web site is collection of web pages while web server is a software that respond to the request for
web resources.

Web Server Working

Web server respond to the client request in either of the following two ways:
 Sending the file to the client associated with the requested URL.
 Generating response by invoking a script and communicating with database
Key Points
 When client sends request for a web page, the web server search for the requested page if
requested page is found then it will send it to client with an HTTP response.
 If the requested web page is not found, web server will the send an HTTP response:Error
404 Not found.
 If client has requested for some other resources then the web server will contact to the
application server and data store to construct the HTTP response.

Architecture

Web Server Architecture follows the following two approaches:


1. Concurrent Approach
2. Single-Process-Event-Driven Approach.

Concurrent Approach

Concurrent approach allows the web server to handle multiple client requests at the same time. It
can be achieved by following methods:
 Multi-process
 Multi-threaded
 Hybrid method.

Multi-processing

In this a single process (parent process) initiates several single-threaded child processes and
distribute incoming requests to these child processes. Each of the child processes are responsible
for handling single request.
It is the responsibility of parent process to monitor the load and decide if processes should be killed
or forked.

Multi-threaded

Unlike Multi-process, it creates multiple single-threaded process.

Hybrid

It is combination of above two approaches. In this approach multiple process are created and each
process initiates multiple threads. Each of the threads handles one connection. Using multiple
threads in single process results in less load on system resources.

Examples

Following table describes the most leading web servers available today:
S.N. Web Server Description

1 Apache HTTP Server


This is the most popular web server in the world developed by the Apache Software Foundation.
Apache web server is an open source software and can be installed on almost all operating systems
including Linux, UNIX, Windows, FreeBSD, Mac OS X and more. About 60% of the web server
machines run the Apache Web Server.

2. Internet Information Services (IIS)


The Internet Information Server (IIS) is a high performance Web Server from Microsoft. This web
server runs on Windows NT/2000 and 2003 platforms (and may be on upcoming new Windows
version also). IIS comes bundled with Windows NT/2000 and 2003; Because IIS is tightly
integrated with the operating system so it is relatively easy to administer it.

3. Lighttpd
The lighttpd, pronounced lighty is also a free web server that is distributed with the FreeBSD
operating system. This open source web server is fast, secure and consumes much less CPU power.
Lighttpd can also run on Windows, Mac OS X, Linux and Solaris operating systems.

4. Sun Java System Web Server


This web server from Sun Microsystems is suited for medium and large web sites. Though the
server is free it is not open source. It however, runs on Windows, Linux and UNIX platforms. The
Sun Java System web server supports various languages, scripts and technologies required for Web
2.0 such as JSP, Java Servlets, PHP, Perl, Python, and Ruby on Rails, ASP and Coldfusion etc.

5. Jigsaw Server
Jigsaw (W3C's Server) comes from the World Wide Web Consortium. It is open source and free
and can run on various platforms like Linux, UNIX, Windows, and Mac OS X Free BSD etc.
Jigsaw has been written in Java and can run CGI scripts and PHP programs.

Web Servers
Web pages are a collection of data, including images, text files, hyperlinks, database files etc., all
located on some computer (also known as server space) on the Internet. A web server is dedicated
software that runs on the server-side. When any user requests their web browser to run any web
page, the webserver places all the data materials together into an organized web page and forwards
them back to the web browser with the help of the Internet. Therefore, we can conclude that: -

A web server is a dedicated computer responsible for running websites sitting out on those
computers somewhere on the Internet. They are specialized programs that circulate web pages as
summoned by the user. The primary objective of any web server is to collect, process and
provide web pages to the users.

This intercommunication of a web server with a web browser is done with the help of a protocol
named HTTP (Hypertext Transfer Protocol). These stored web pages mostly use static content,
containing HTML documents, images, style sheets, text files, etc. However, web servers can
serve static as well as dynamic contents. Web Servers also assists in emailing services and
storing files. Therefore it also uses SMTP (Simple Mail Transfer Protocol) and FTP (File Transfer
Protocol) protocols to support the respective services. Web servers are mainly used in web hosting
or hosting the website's data and running web-based applications.

The hardware of the web servers are connected to the Internet that manages the data exchange
facility within different connected devices. In contrast, the software of web server software is
responsible for controlling how a user accesses delivered files. Typically, web server management
is an ideal example of the client/server model. Therefore, it is compulsory for all computers that
host websites (whether with state or dynamic web page content) to have web server software.

How do web servers work?

The term web server can denote server hardware or server software, or in most cases, both
hardware and software might be working together.
1. On the hardware side, a web server is defined as a computer that stores software and
another website raw data, such as HTML files, images, text documents, and JavaScript
files. The hardware of the web servers are connected to the web and supports the data
exchange with different devices connected to the Internet.
2. On the software side, a web server includes server software accessed through website
domain names. It controls how web users access the web files and ensures the supply of
website content to the end-user. The web server contains several components, including an
HTTP server.

Whenever any web browser, such as Google Chrome, Microsoft Edge or Firefox, requests for a
web page hosted on a web server, the browser will process the request forward with the help of
HTTP. At the server end, when it receives the request, the HTTP server will accept the request and
immediately start looking for the requested data and forwards it back to the web browser via HTTP.

Let's discover the step-by-step process of what happens whenever a web browser approaches the
web server and requests a web file or file. Follow the below steps:

1. First, any web user is required to type the URL of the web page in the address bar of
your web browser.
2. With the help of the URL, your web browser will fetch the IP address of your
domain name either by converting the URL via DNS (Domain Name System) or by
looking for the IP in cache memory. The IP address will direct your browser to the web
server.
3. After making the connection, the web browser will request for the web page from the
web server with the help of an HTTP request.
4. As soon as the web server receives this request, it immediately responds by sending back
the requested page or file to the web browser HTTP.
5. If the web page requested by the browser does not exist or if there occurs some error in
the process, the web server will return an error message.
6. If there occurs no error, the browser will successfully display the webpage.

NOTE: A single web server can host multiple domains as well.

Examples of web server uses

Web servers are mostly used for:


o sending and receiving mails on Internet by using SMTP (Simple Mail transfer Protocol);
o fetching requests for File Transfer Protocol (FTP) files; and
o designing, developing, and publishing websites.

Many Web servers, even the basic one, also support the server-side scripting technique. Server-
side scripting is a web development method used to employ scripts on a web server that produces
a customized response for each user. This technique operates on the server machine and consists
of an extensive feature set, including database access. The server-side scripting process will have
various scripting languages such ASP, PHP, Java, JavaScript, Python, ruby and many more. This
technique also enables the HTML files to be created dynamically.

Static web servers vs. Dynamic web servers

A web server can be used to store, process or deliver either static or dynamic web pages. Let's
understands the definition of static and dynamic web servers with the help of their difference table
given below:

S.NO. Static Web Servers Dynamic Web Servers

1 Static web servers refer to the servers, Dynamic web servers refer to the servers where the
which serve only the static content i.e., content of the page can be updated and altered.
the content is fixed and being shown as it
is.

2 A static web server includes a computer A dynamic web server also includes a computer with
and the HTTP (Hyper Text Transfer plenty of other software, unlike an application server and
Protocol) software. database model.

3 It is called static; the web pages content It is called dynamic because the application server is used
won't change unless the user manually to update the web pages files at the server-side, and due to
changes it, and the server will deliver which, it can change on every call requested by the web
web files as is to the web browser. browser.

4 Static web servers take less time to load The Dynamic web server can only produce the data when
the data. it is requested from the database. Therefore, it is time
consuming and more complicated when compared to static
web servers.

Web server software available in the market


Though there are various web servers found in today's market, but the commonly used one are as
follows:

S.NO Web Server Description

1. Apache HTTP Server


This web server is developed by Apache Software Foundation. It is an open-source, accessible web server
available for almost all operating systems, including Windows, MACOS, Linus, FreeBSD, etc. Apache is one
of the most popular web servers used around the globe.

2. Microsoft Internet Information Services (IIS)


IIS is a high-performance web server that is developed by Microsoft only for Microsoft platforms. This webs
server is tightly integrated with Microsoft operating system; therefore, it is not open-sourced.

3. Nginx
Nginx is an open-source web server commonly used by administrators as it supports light resource application
and scalability.

4. Lighttpd
Lighttpd, also known as lighty, is a free, open-source web server with the FreeBSD operating system. This
web server is fast, secure and consumes much less CPU power. It can also run on the commonly used operating
system, unlike Windows, Mac OS X, Linus.

5. Sun Java System Web Server


Sun Java is a free web server developed by Sun Microsystems well equipped for a medium and large website
that can run on Windows, Linux and Unix. Moreover, this web server supports several languages, scripts and
technologies essential for Web 2.0, unlike JSP, Java Servlets, PHP, Python, HTML, etc. Though Sun Java is
free, it is not an open-source web server.

Web server security Methods

Though there are various security techniques available in the market that a user can implement to
have a safe web server experience, below given are some examples of security practices that can
include processes:

1. A reverse proxy is a proxy server that is accessible to the clients, therefore hiding the
internal server. It acts as an intermediary as wherever any user makes requests to the web
server for any data or file, the proxy server seizes those requests and then communicates
with the webserver.
2. Access restriction is a technique that limits the web host's access to infrastructure
machines or using Secure Socket Shell (SSH);
3. Keeping web servers mended and updated, as it benefits to ensure the web server isn't
vulnerable to exposures;
4. Network monitoring is a security practice that ensures that no unauthorized activity is
going on the web server; and
5. Using a firewall and SSL safeguards the web server as firewalls can supervise HTTP
request traffic while a Secure Sockets Layer (SSL) supports securing the data.

Operation in a Web Server

A Web server repeatedly accepts TCP connections from clients, reads the client's HTTP request,
and transmits the requested content data with an HTTP response header. If the requested content
is static, the corresponding document is read from the file system. If the document is not found in
the file system's cache, a disk read is necessary.

Copying occurs as part of the reading of data from the file system, and when the data is written to
the socket attached to the client's TCP connection. High-performance Web servers avoid the first
copy by using the UNIX map interface to read files, but the second copy remains. Multiple
buffering occurs because a given document may simultaneously be stored in the file cache and in
the TCP retransmission buffers of potentially multiple client connections.

With IO-Lite, all data copying and multiple buffering is eliminated. Once a document is in main
memory, it can be served repeatedly by passing buffer aggregates between the file cache, the server
application, and the network subsystem. The server obtains a buffer aggregate using the IOL_read
operation on the appropriate file descriptor, concatenates a response header, and transmits the
resulting aggregate using IOL_write on the TCP socket. If a document is served repeatedly from
the file cache, the TCP checksum need not be recalculated except for the buffer containing the
response header.

Dynamic content is typically generated by an auxiliary third-party CGI program that runs as a
separate process. The data is sent from the CGI process to the server process via a UNIX pipe. In
conventional systems, sending data across the pipe involves at least one data copy. In addition,
many CGI programs read primary files that they use to synthesize dynamic content from the file
system, causing more data copying when that data is read. Caching of dynamic content in a CGI
program can aggravate the multiple buffering problem: Primary files used to synthesize dynamic
content may now be stored in the file cache, in the CGI program's cache as part of a dynamic page,
in the server's holding buffers, and in the TCP retransmission buffers.
With IO-Lite, sending data over a pipe involves no copying. CGI programs can synthesize dynamic
content by manipulating buffer aggregates containing data from primary files and newly generated
data. Again, IO-Lite eliminates all copying and multiple buffering, even in the presence of caching
CGI programs. TCP checksums need not be recomputed for portions of dynamically generated
content that are repeatedly transmitted.

IO-Lite's ability to eliminate data copying and multiple buffering can dramatically reduce the cost
of serving static and dynamic content. The impact is particularly strong in the case when a cached
copy (static or dynamic) of the requested content exists, since copying costs can dominate the
service time in this case. Moreover, the elimination of multiple buffering frees up valuable memory
resources, permitting a larger file cache size and hit rate, thus further increasing server
performance.

Finally, a Web server can use the IO-Lite facilities to customize the replacement policy used in
the file cache to derive further performance benefits. To use IO-Lite, an existing Web server need
only be modified to use the IO-Lite API. CGI programs must likewise use buffer aggregates to
synthesize dynamic content.

A quantitative evaluation of IO-Lite in the context of a Web server follows in Section

What is Virtual Web Hosting?

Virtual web hosting refers to the process of running multiple "virtual" web servers on a single
physical host computer. Using this technique, a single computer can host thousands of independent
websites.
Commercial web hosting service providers often use this technique to allow better manageability,
efficiency, and scalability of their service infrastructure.
Virtual hosting is a method that servers such as web servers use to host more than one domain
name on the same computer, sometimes on the same IP address.
Virtual web hosting is one of the most popular hosting options available at the moment - probably
because it is one of the most cost-effective options on the market.
Also known as shared hosting, virtual hosting allows a website owner to have a site hosted on a
web server shared with other websites.
In simple terms, the virtual hosting company's server will allocate out hosting services and
bandwidth to more than one website. Virtual web hosting is a cheaper hosting option because you
won't have to pay for a dedicated server to host just your website.
Virtual web hosting is a good solution for small- to medium-sized (and even some larger) websites
that aren't constantly being visited or have reasonable bandwidth needs.
There are two basic methods of accomplishing virtual hosting: name-based and an IP address or
IP-based.
Name-based

Name-based virtual hosts use multiple hostnames for the same webserver IP address.

IP-Based

In IP-based virtual hosting, each site (either a DNS hostname or a group of DNS hostnames that
act the same) points to a unique IP address.
The web server is configured with multiple physical network interfaces, virtual network
interfaces on the same physical interface, or multiple IP addresses on one interface.

The web server can obtain the address the TCP connection was intended for using a standard API
and use this to determine which website to serve. The client is not involved in this process, and
therefore (unlike with name-based virtual hosting), there are no compatibility issues.

Virtual hosting is the term used to describe multiple domains that are hosted on the same server.
Virtual web hosting can be compared to leasing an item as opposed to purchasing it.
In this case, you are leasing a service offered by a virtual hosting provider that generally
includes the following:

1. Basic server features


2. Internet connection services
3. Domain name registration
4. File storage and directory services
5. An email account with related services

Besides, a provider of virtual hosting may provide website and web page design.
Why Virtual Web Hosting?

Support:
Virtual web hosting providers generally offer round-the-clock support, providing you with the
security of available help when you need it most. Besides, many virtual web hosting companies
have measures in place to keep your site from hackers.

Flexibility:
You can try a variety of features without the burden of long-term commitment. You can also
customize your virtual hosting arrangements with the bandwidth and database access that
matches your business needs.

Cost:
Virtual hosting is a great value for small or medium companies on a tight budget. With no major
equipment purchases required, virtual hosting is ideal for start-up companies trying to minimize
their initial investment.

Chunked transfer encoding


is a streaming data transfer mechanism available in Hypertext Transfer Protocol (HTTP) version
1.1, defined in RFC 9112 7.1. In chunked transfer encoding, the data stream is divided into a series
of non-overlapping "chunks". The chunks are sent out and received independently of one another.
No knowledge of the data stream outside the currently-being-processed chunk is necessary for
both the sender and the receiver at any given time.
Each chunk is preceded by its size in bytes. The transmission ends when a zero-length chunk is
received. The chunked keyword in the Transfer-Encoding header is used to indicate chunked
transfer.
Chunked transfer encoding is not supported in HTTP/2, which provides its own mechanisms for
data streaming.

Rationale
The introduction of chunked encoding provided various benefits:

 Chunked transfer encoding allows a server to maintain an HTTP persistent connection for
dynamically generated content. In this case, the HTTP Content-Length header cannot be used
to bound the content and the next HTTP request/response, as the content size is not yet known.
Chunked encoding has the benefit that it is not necessary to generate the full content before
writing the header, as it allows streaming of content as chunks and explicitly signaling the end
of the content, making the connection available for the next HTTP request/response.
 Chunked encoding allows the sender to send additional header fields after the message body.
This is important in cases where values of a field cannot be known until the content has been
produced, such as when the content of the message must be digitally signed. Without chunked
encoding, the sender would have to buffer the content until it was complete in order to calculate
a field value and send it before the content.

Applicability
For version 1.1 of the HTTP protocol, the chunked transfer mechanism is considered to be always
and anyway acceptable, even if not listed in the TE (transfer encoding) request header field, and
when used with other transfer mechanisms, should always be applied last to the transferred data
and never more than one time. This transfer coding method also allows additional entity header
fields to be sent after the last chunk if the client specified the "trailers" parameter as an argument
of the TE field. The origin server of the response can also decide to send additional entity trailers
even if the client did not specify the "trailers" option in the TE request field, but only if the
metadata is optional (i.e. the client can use the received entity without them). Whenever the trailers
are used, the server should list their names in the Trailer header field; three header field types are
specifically prohibited from appearing as a trailer field: Transfer-Encoding, Content-
Length and Trailer.

Format
If a Transfer-Encoding field with a value of "chunked" is specified in an HTTP message (either a
request sent by a client or the response from the server), the body of the message consists of one
or more chunks and one terminating chunk with an optional trailer before the final ␍␊ sequence
(i.e. carriage return followed by line feed).
Each chunk starts with the number of octets of the data it embeds expressed as
a hexadecimal number in ASCII followed by optional parameters (chunk extension) and a
terminating ␍␊ sequence, followed by the chunk data. The chunk is terminated by ␍␊.
If chunk extensions are provided, the chunk size is terminated by a semicolon and followed by the
parameters, each also delimited by semicolons. Each parameter is encoded as an extension name
followed by an optional equal sign and value. These parameters could be used for a
running message digest or digital signature, or to indicate an estimated transfer progress, for
instance.
The terminating chunk is a special chunk of zero length. It may contain a trailer, which consists of
a (possibly empty) sequence of entity header fields. Normally, such header fields would be sent in
the message's header; however, it may be more efficient to determine them after processing the
entire message entity. In that case, it is useful to send those headers in the trailer.
Header fields that regulate the use of trailers are TE (used in requests), and Trailers (used in
responses).

Use with compression


HTTP servers often use compression to optimize transmission, for example with Content-
Encoding: gzip or Content-Encoding: deflate. If both compression and chunked encoding are
enabled, then the content stream is first compressed, then chunked; so the chunk encoding itself is
not compressed, and the data in each chunk is not compressed individually. The remote endpoint
then decodes the stream by concatenating the chunks and uncompressing the result.
Example
Encoded data
The following example contains three chunks of size 4, 7, and 11 (hexadecimal "B") octets of
data.

4␍␊Wiki␍␊7␍␊pedia i␍␊B␍␊n ␍␊chunks.␍␊0␍␊␍␊

Below is an annotated version of the encoded data.

4␍␊ (chunk size is four octets)


Wiki (four octets of data)
␍␊ (end of chunk)

7␍␊ (chunk size is seven octets)


pedia i (seven octets of data)
␍␊ (end of chunk)

B␍␊ (chunk size is eleven octets)


n ␍␊chunks. (eleven octets of data)
␍␊ (end of chunk)

0␍␊ (chunk size is zero octets, no more chunks)


␍␊ (end of final chunk with zero data octets)

Note: Each chunk's size excludes the two ␍␊ bytes that terminate the data of each chunk.
Decoded data
Decoding the above example produces the following octets:

Wikipedia in ␍␊chunks.

The bytes above are typically displayed as

Wikipedia in
chunks.
What is web caching?

The web cache stores recently requested objects in its memory. When requests for these objects
are placed again, the cache (not the original server) services these HTTP requests. If the requested
object is not available in the cache, then the web cache contacts the original server to obtain the
object. The purpose of caching is to reduce response time by avoiding calls to the actual webserver.

Steps

The following steps demonstrate how web caching works:

1. The user’s browser makes an HTTP request for the desired object to the web cache.
2. If the web cache does not have this object in its memory, it requests the original server
for the file, sends the object to the user’s browser, and stores a copy of it along with the
last-modified date of the object.
3. When another user requests the same object, the object is available in the cache. Before
sending the object to the requesting user, the cache needs to ensure that this object has
not been modified on the original server.
4. The web cache sends a conditional GET request to the original webserver, i.e., it tells the
webserver to send the file only if it has been modified since the web cache’s last-
modified date.
5. If the object has not been modified at the original web server, then the response message
will not contain the requested object, and the web cache will service the user’s request
using the object in its memory.
What is caching?

Caching is the process of storing copies of files in a cache, or temporary storage location, so that
they can be accessed more quickly. Technically, a cache is any temporary storage location for
copies of files or data, but the term is often used in reference to Internet technologies. Web
browsers cache HTML files, JavaScript, and images in order to load websites more quickly,
while DNS servers cache DNS records for faster lookups and CDN servers cache content to
reduce latency.

To understand how caches work, consider real-world caches of food and other supplies. When
explorer Roald Amundsen made his return journey from his trip to the South Pole in 1912, he and
his men subsisted on the caches of food they had stored along the way. This was much more
efficient than waiting for supplies to be delivered from their base camp as they traveled. Caches
on the Internet serve a similar purpose; they temporarily store the 'supplies', or content, needed for
users to make their journey across the web.

What does a browser cache do?


Every time a user loads a webpage, their browser has to download quite a lot of data in order to
display that webpage. To shorten page load times, browsers cache most of the content that appears
on the webpage, saving a copy of the webpage's content on the device’s hard drive. This way, the
next time the user loads the page, most of the content is already stored locally and the page will
load much more quickly.

Browsers store these files until their time to live (TTL) expires or until the hard drive cache is full.
(TTL is an indication of how long content should be cached.) Users can also clear their browser
cache if desired.

What does clearing a browser cache accomplish?

Once a browser cache is cleared, every webpage that loads will load as if it is the first time the
user has visited the page. If something loaded incorrectly the first time and was cached, clearing
the cache can allow it to load correctly. However, clearing one's browser cache can also
temporarily slow page load times.

What is CDN caching?

A CDN, or content delivery network, caches content (such as images, videos, or webpages) in
proxy servers that are located closer to end users than origin servers. (A proxy server is a server
that receives requests from clients and passes them along to other servers.) Because the servers are
closer to the user making the request, a CDN is able to deliver content more quickly.
Think of a CDN as being like a chain of grocery stores: Instead of going all the way to the farms
where food is grown, which could be hundreds of miles away, shoppers go to their local grocery
store, which still requires some travel but is much closer. Because grocery stores stock food from
faraway farms, grocery shopping takes minutes instead of days. Similarly, CDN caches 'stock' the
content that appears on the Internet so that webpages load much more quickly.

When a user requests content from a website using a CDN, the CDN fetches that content from an
origin server, and then saves a copy of the content for future requests. Cached content remains in
the CDN cache as long as users continue to request it.

What is a CDN cache hit? What is a cache miss?

A cache hit is when a client device makes a request to the cache for content, and the cache has that
content saved. A cache miss occurs when the cache does not have the requested content.

A cache hit means that the content will be able to load much more quickly, since the CDN can
immediately deliver it to the end user. In the case of a cache miss, a CDN server will pass the
request along to the origin server, then cache the content once the origin server responds, so that
subsequent requests will result in a cache hit.
Where are CDN caching servers located?

CDN caching servers are located in data centers all over the globe. Cloudflare has CDN servers in
300 cities spread out throughout the world in order to be as close to end users accessing the content
as possible. A location where CDN servers are present is also called a data center.

How long does cached data remain in a CDN server?

When websites respond to CDN servers with the requested content, they attach the content’s TTL
as well, letting the servers know how long to store it. The TTL is stored in a part of the response
called the HTTP header, and it specifies for how many seconds, minutes, or hours content will be
cached. When the TTL expires, the cache removes the content. Some CDNs will also purge files
from the cache early if the content is not requested for a while, or if a CDN customer manually
purges certain content.

How do other kinds of caching work?

DNS caching takes place on DNS servers. The servers store recent DNS lookups in their cache
so that they do not have to query nameservers and can instantly reply with the IP address of a
domain.

Search engines may cache webpages that frequently appear in search results in order to answer
user queries even if the website they are attempting to access is temporarily down or unable to
respond.

How does Cloudflare use caching?

Cloudflare offers a CDN with 300 PoPs distributed internationally. Cloudflare offers free CDN
caching services, while paid CDN customers are able to customize how their content is cached.
The network is Anycast, meaning the same content can be delivered from any of these data centers.
A user in London and a user in Sydney can both view the same content loaded from CDN servers
only a few miles away.

Extensibility in the web UI framework for application developers


Extensibility allows you to customize the user interface of an out-of-the-box installation of an
application using the Extensibility Workbench. Although application developers mostly use the
Designer Workbench, the Extensibility Workbench is useful for testing and simulating the
behavior of the Web UI Framework tools of the actual user interface.

You can open an existing screen and bring up the same user interface tools that were used by
application developers to build the screen using the Designer Workbench. You can add controls
(like buttons, labels, and grid columns), panels, data sources, and other items. The Extensibility
Workbench allows you to personalize and localize an application.

Note: When customizing the interface, copy the standard resources of an application and then
modify your copy. Do not modify the standard resources of an application.

Functional overview

Extensibility allows you to customize an existing installation of an application at runtime without


recompiling or changing the original source code.

Extensibility works in two areas of an application:

 Extensibility in the UI helps to show more relevant and organized data to the end user.
It also helps in showing a personalized or a localized version of an application.
 UI extensibility allows you to add new widgets to a UI screen, hide existing widgets,
override default field labels, customize the theme for an application, and other UI-related
tasks.

UI extensibility takes two basic forms:

o Override extensibility, in which you completely replace the out-of-the-box


screens with new screens. Use the Designer Workbench for this task.
o Differential extensibility, in which you change parts of the out-of-the-box
screens. Use the Extensibility Workbench for this task.

The changes that one can make to an existing component using differential extensibility are limited
to a particular set of properties. This ensures that arbitrary properties are not allowed to change,
resulting in upgrade issues.

You can work with override extensibility in the following layers: Struts, mashup, presentation, and
XAPI mashup. With differential extensibility, you can work with only the presentation and XAPI
mashup layers.

 Extensibility in the backend helps you perform custom business logic and processing.
Custom logic can be driven by integration with other applications, changed use cases,
and other special requirements of an application.
Backend extensibility allows you to change the server-side APIs to perform the
customized business logic.

Technical overview
UI framework extensibility has the following technical details:

 The HTML UI is based on the Ext JS JavaScript framework.

In the Ext JS-based class hierarchy, various JavaScript libraries have their own class-
based hierarchy for creating object models. The Web UI Framework uses the Ext JS-
based class hierarchy for this purpose.

 Every screen is identified by an identifier (className) that must be unique across an


application.
 Every component within a screen is identified by an identifier (sciId) that must be
unique within the screen.
 Once a component has been added to the base screen, it should not be removed. If a
component is removed, and an extension was applied with regard to the removed
component, the extension might not display after an upgrade.

Backend extensibility has the following technical details:

 To get the extended JSP file, the extensibility mechanism appends extn to the path to
get the complete src (source) path of the extension file.
 Applications consuming only the Base UI Framework will provide the custom
extensibility mechanism as defined in the Base UI Framework's interface contract.
There will not be any default implementation in the Base UI Framework.
 The extended mashup class makes XAPI calls and other kinds of calls. If a XAPI
mashup is being extended, then a XAPI call also should be made.
 If the extensibility mechanism is not given in the backend of an application, an error
will occur and be logged.
 If the mashup implementation is not given in the backend of an application, an error
will occur and be logged.

To build an extensible application, it is essential to follow strict design guidelines. In the Web
UI Framework, this involves the following:

 Adding business logic (rules and conditions) in a mashup so that it is easy to re-use and
change.
 Using the client-side JavaScript component (Ext JS) to build a rich and responsive user
interface (without business logic).

 Differential extensibility in the web UI framework


With differential extensibility, you can customize parts of a screen. Changes are overlaid
on top of the base screen. Differential extensibility contrasts with override extensibility,
where the entire screen is replaced.
 Override extensibility in the web UI framework
With override extensibility, you can customize a screen by completely replacing it.
Override extensibility contrasts with differential extensibility, in which only parts of the
screen are replaced. Use the Designer Workbench to apply override extensibility.
 Differential extensibility versus override extensibility in the web UI framework
There are various differences between differential extensibility and override extensibility.
Some of these differences can be seen in the Scope of Changes, Recommended Usage,
and Extensible Layers.
 What can be customized and extended with the web UI framework
 Extending versus customizing an ext JS widget/component with the web UI
framework
Extending and customizing are very similar. Both involve changes to the default, out-of-
the-box version of the application.
 Extensibility workbench versus designer workbench in the web UI framework
The Extensibility Workbench is used to modify the UI while the application is live and
running online. The changes can be saved and later applied to the application EAR, if
required. Use the Extensibility Workbench to make changes to part of the UI.

Future of Web Technology: Interoperability & Extensibility

In recent times, the web has gone through a significant amount of changes and is updated well
enough. Starting with this new decade, we predict that the web will be directed towards
interoperability and extensibility.
Let’s start by looking into interoperability.
1. Interoperability
With a technical approach, a lot of product companies are switching between technology stacks,
implementing multiple stacks, or migrating from one stack to another. In some cases, they are
trying to safeguard certain stacks as they might go out-dated due to future changes.
a. Web Components
From a web-standards perspective, web components might solve the problem of component-
based architecture. Here, the idea is to devise a standard format that can be used either with a
library or without. Thus, it enhances the development experience and ensures uniformity across
components. Every web component is encapsulated and works perfectly fine across browsers
without dependencies, and web components are going to witness a lot of growth in the coming
years.
b. Logical Properties
Logical properties help us handle layout sizing for different languages and reading modes with a
unique perspective. It makes the layouts to be interoperable with the user experience. For most of
the left to right languages, we use a compass-type expression for margins, borders, & padding,
and think of layouts as height and width. The scene totally changes when you have to deal with a
right-to-left language. Because none of your padding-left is going to have any effect on your
layout and it gets messy.
So, the solution is to write the styles as padding-inline-start and not padding-left to make your
layout adjust to the changes correctly when switching from left-to-right to right-to-left.
c. Preference Media Queries
Preference media queries help you to customize your site to satisfy the needs of users who
choose high contrast or dark mode and who choose less animation-heavy front-end experience.
Below are some of the preference media queries for your reference:

 prefers-color-scheme
 prefers-contrast
 prefers-reduced-motion
 prefers-reduced-transparency

2. Extensibility
Extensibility is about stretching technology and extending it to satisfy the required project needs.
By every passing year, we started designing and developing web with component-based (React
component, Vue component, etc.) approach. The extensibility on the web gives us an opportunity
to customize the platform to our requirements and play around with the outcomes.
a. CSS Houdini
Also, with CSS Houdini, you can now easily extend CSS Object Models and instruct browsers
on how to read and render CSS. As a result, you can now include certain styles that weren’t
available on the web earlier.
CSS Houdini is nothing but a set of different browser API aimed at enhancing browser
performance. The best part about Houdini is that it enables styling more extensible and allows
you to dictate your own styles. Below are some of the Houdini APIs:

 Properties and Values


 Paint API
 Animation Worklet
 Typed Object Model
 Layout API

You can use these APIs to create semantic CSS and apply semantics to your CSS variables such
as properties and values. Let’s take a quick look at the Paint API with which you draw a canvas
and use it as a border-image. Also, with the help of a single line of CSS code, you can create
animated sparkles.
Using the Layout API, you can start designing round menus and you don’t have to place them
manually. Also, using the Animation Worklet you can integrate custom interactions written by
you.
b. Variable Fonts:
Another extensibility feature to make websites more functional is variable fonts. According
to Can I Use, 87% of modern browsers support variable fonts. Recently, Google launched the
beta version of Google Fonts in which variable fonts are made available and are easy to use in
your web projects. Also, variable fonts are vector-based graphics and you can set different
values for distinct axes such as weight, slant, etc. To tap your creative side of the brain, they
allow you for new axes.
Final Thoughts
In 2020 and the coming years, it is for sure that the web interoperability and extensibility will
make a significant difference in the way you approach front-end design (including layout sizing,
variable fonts, etc.). With all these tips, you can give more control to your users over how they
want to see and read content from your website or application.

What is SGML

SGML stands for (Standard generalized markup language) is a Standard generalized markup
language that makes use of a superset of extensively used markup languages like HTML and
XML. It is used for marking up files and has the gain of now no longer depending on a particular
application.
It is basically derived from GML (Generalized Markup Language), which allowed users to work
on standardized formatting styles for electronic documents. It was developed and standardized
by the International Organization for Standards (ISO) in 1986. SGML specifies the rules for
tagging elements. These tags can then be interpreted to layout factors in specific ways.
It is used extensively to manipulate massive files which are a concern with common revisions
and want to be published in one-of-a-kind formats due to the fact it’s far a massive and
complicated system, it isn’t always but extensively used on private computers.
Components of SGML:
 SGML provides a way of describing the relationships between these entities, elements, and
attributes, and tells the computer how it can recognize the component parts of a document
and it is based on the concept of a document being composed of a series of entities (object).
 It provides rules that allow the computer to recognize where the various elements of a text
entity start and end.
 Document Type Definition (DTD) in SGML is used to describe each element of the
document in a form that the computer can understand.

SGML is the simplest medium to produce files that can be read by people and exchanged
between machines and applications in a straightforward manner. It is easy to understand by the
human as well as the machine.

Structure of SGML:
<mainObject>
<subObject>
</subObject>
</mainObject>

The extension of SGML files is:

File_Name.sgml
Syntax:
<NAME TYPE="user">
Punjab college
</NAME>

Example 1: In this example, we will write code in SGML


 SGML
<EMAIL>

<SENDER>

<PERSON>

<FIRSTNAME>Punjab college mian channu</FIRSTNAME>

</PERSON>

</SENDER>

<BODY>

<p>A Computer Science Portal For punjabian</p>

</BODY>

</EMAIL>

Output:

Punjab college mian channu


A Computer Science Portal For punjabian

HTML5

HTML5 is the latest and most enhanced version of HTML. Technically, HTML is not a
programming language, but rather a markup language.

HTML5 - Overview
HTML5 is the next major revision of the HTML standard principal HTML 4.01, XHTML 1.0, and
XHTML 1.1. HTML5 is a standard for structuring and presenting content on the World Wide Web.
HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web
Hypertext Application Technology Working Group (WHATWG).
The new standard incorporates features like video playback and drag-and-drop that have been
previously dependent on third-party browser plug-ins such as Adobe Flash, Microsoft Silverlight,
and Google Gears.

Browser Support

The latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support many
HTML5 features and Internet Explorer 9.0 will also have support for some HTML5 functionality.
The mobile web browsers that come pre-installed on iPhones, iPads, and Android phones all have
excellent support for HTML5.

New Features

HTML5 introduces a number of new elements and attributes that can help you in building modern
websites. Here is a set of some of the most prominent features introduced in HTML5.
 New Semantic Elements − these are like <header>, <footer>, and <section>.
 Forms 2.0 − Improvements to HTML web forms where new attributes have been
introduced for <input> tag.
 Persistent Local Storage − to achieve without resorting to third-party plugins.
 WebSocket − A next-generation bidirectional communication technology for web
applications.
 Server-Sent Events − HTML5 introduces events which flow from web server to the web
browsers and they are called Server-Sent Events (SSE).
 Canvas − this supports a two-dimensional drawing surface that you can program with
JavaScript.
 Audio & Video − you can embed audio or video on your webpages without resorting to
third-party plugins.
 Geolocation − Now visitors can choose to share their physical location with your web
application.
 Microdata − this lets you create your own vocabularies beyond HTML5 and extend your
web pages with custom semantics.
 Drag and drop − Drag and drop the items from one location to another location on the
same webpage.

Backward Compatibility

HTML5 is designed, as much as possible, to be backward compatible with existing web browsers.
Its new features have been built on existing features and allow you to provide fallback content for
older browsers.
It is suggested to detect support for individual HTML5 features using a few lines of JavaScript.
If you are not familiar with any previous version of HTML, I would recommend that you go
through our HTML Tutorial before exploring the features of HTML5.
Difference between CSS and CSS3

CSS: CSS stands for Cascading Style Sheet. Its main objective is to provide styling and fashion
to the web page. CSS provides color, layout, background, font, and border properties. CSS
features allow better content accessibility, enhanced flexibility, and control, as well as the
specification of the characteristics of presentation.

CSS3: CSS3 stands for Cascading Style Sheet level 3, which is the advanced version of CSS. It
is used for structuring, styling, and formatting web pages. Several new features have been added
to CSS3 and it is supported by all modern web browsers. The most important feature of CSS3 is
the splitting of CSS standards into separate modules that are simpler to learn and use.

Difference between CSS and CSS3:


S.No. CSS CSS3

On the other hand, CSS3 is capable of


making the web page more attractive and
CSS is capable of positioning texts takes less time to create. CSS3 is backward
1 and objects. compatible with CSS.

Responsive designing is not CSS3 is the latest version, hence it supports


2 supported in CSS responsive design.

Whereas CSS3 can be breakdown into


3 CSS cannot be split into modules. modules.

But in CSS3 we can perform all kinds of


Using CSS, we cannot build 3D animation and transformations as it supports
4 animation and transformation. animation and 3D transformations.

CSS is very slow as compared to


5 CSS3 Whereas CSS3 is faster than CSS.

In CSS we have set of standard


colors and it uses basic color Whereas CSS3 has a good collection of HSL
6 schemes only. RGBA, HSLA, and gradient colors.

In CSS we can only use single text But in CSS3 we can use multi-column text
7 blocks. blocks

CSS does not support media


8 queries. But CSS3 supports media queries

CSS codes are not supported by all Being the latest version, CSS3 codes are
9 types of modern browsers. supported by all modern browsers.
In CSS, designers have to
manually develop rounded But CSS3 provides advanced codes for
10 gradients and corners. setting rounded gradients and corners

There is no special effect like


shadowing text, text animation, CSS3 has many advance features like text
etc. in CSS. The animation was shadows, visual effects, and a wide range of
11 coded in jQuery and JavaScript. font styles and colors.

In CSS, the user can add


background colors to list items and Whereas CSS3 list has a
lists, set images for the list items, special display property defined in it. Even
12 etc. list items also have counter reset properties.

CSS3 is the latest version of CSS and was


13 CSS was developed in 1996. released in 2005.

CSS3 memory consumption is low as


14 CSS is memory intensive. compared to CSS.

New features of CSS3:

Combinator: CSS3 has a new General sibling combinator which matches up with sibling
elements via the tilde (~) combinator.

CSS Selectors: CSS3 selectors are much advanced in comparison to simple selectors offered by
CSS, and are termed as a sequence of easy to use and simple selectors.

Pseudo-elements: Plenty of new pseudo-elements have been added to CSS3 to give easy styling
in depth. Even a new convention of double colons :: is also added.
Border Style: The latest CSS3 also has new border styling features like border-radius, image-
slice, image-source, and values for “width stretch”, etc.

Background style properties: New features like background-clip, size,


style, and origin properties have been added to CSS3.

XML

XML stands for Extensible Markup Language. It is a text-based markup language derived from
Standard Generalized Markup Language (SGML).
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 is not going to replace
HTML in the near future, but it introduces new possibilities by adopting many successful features
of HTML.
There are three important characteristics of XML that make it useful in a variety of systems and
solutions −
 XML is extensible − XML allows you to create your own self-descriptive tags, or language,
that suits your application.
 XML carries the data, does not present it − XML allows you to store the data irrespective
of how it will be presented.
 XML is a public standard − XML was developed by an organization called the World
Wide Web Consortium (W3C) and is available as an open standard.

XML Usage

A short list of XML usage says it all −


 XML can work behind the scene to simplify the creation of HTML documents for large
web sites.
 XML can be used to exchange the information between organizations and systems.
 XML can be used for offloading and reloading of databases.
 XML can be used to store and arrange the data, which can customize your data handling
needs.
 XML can easily be merged with style sheets to create almost any desired output.
 Virtually, any type of data can be expressed as an XML document.

What is Markup?

XML is a markup language that defines set of rules for encoding documents in a format that is
both human-readable and machine-readable. So what exactly is a markup language? Markup is
information added to a document that enhances its meaning in certain ways, in that it identifies the
parts and how they relate to each other. More specifically, a markup language is a set of symbols
that can be placed in the text of a document to demarcate and label the parts of that document.
Following example shows how XML markup looks, when embedded in a piece of text −
<message>
<text>Hello, world!</text>
</message>
This snippet includes the markup symbols, or the tags such as <message>...</message> and
<text>... </text>. The tags <message> and </message> mark the start and the end of the XML code
fragment. The tags <text> and </text> surround the text Hello, world!.

Is XML a Programming Language?

A programming language consists of grammar rules and its own vocabulary which is used to create
computer programs. These programs instruct the computer to perform specific tasks. XML does
not qualify to be a programming language as it does not perform any computation or algorithms.
It is usually stored in a simple text file and is processed by special software that is capable of
interpreting XML.

XML elements

The logical structure of an XML file requires that all data in the file be encapsulated within an
XML element called the root element or document element. This element identifies the type of
data contained in the file; in the example above, the root element is <library>.

The root element contains other elements that define the different parts of the XML document; in
the example above, the root element contains <book> elements, which, in turn, consist of the two
elements <title> and <author>.

All XML elements must be properly terminated for an XML file to be considered well-formed.
This means that a tag must be properly terminated with an opening and closing tag, like this
paragraph element that would be a part of a document:

<para>This is an example of an XML tag for a paragraph.</para>

A tag can also be empty, in which case it is terminated with a forward slash. In this example,
an empty self-terminating paragraph tag is used to insert an extra space in a document:

<para />
XML enables users to define their own additional elements if needed. In the preceding example,
an XML author might define new elements for publisher, date of publication, International
Standard Book Number and any other relevant data. The elements can also be defined to enforce
rules regarding the contents of the elements.

XML entities

XML elements can also contain predefined entities, which are used for special reserved XML
characters. Custom entities can be defined to insert a predefined string of characters for inclusion
in an XML file.

The five standard predefined XML entities are the following:

1. &lt; -- The less than symbol (<), also known as the open angle bracket, is normally used in
XML to indicate the start of an XML tag. This entity is used when the open angle bracket is
part of the content of the XML file.

2. &gt; -- The greater than symbol (>), also known as the close angle bracket, is normally used
in XML to indicate the end of an XML tag. This entity is used when the close angle bracket
is part of the content of the XML file.

3. &amp; -- The ASCII ampersand symbol (&) is reserved in XML for indicating the start of an
XML entity. This entity is used when an ampersand occurs within an XML element.

4. &quot; -- The ASCII double quote character (") is used in XML element tags to identify
optional attribute values of the element. For example, an <emphasis> tag might include
options for emphasizing some text, such as bold, italic or underline. This entity is used when
a double quote character appears in the contents of an XML element.

5. &apos; -- The ASCII single quote character ('), also known as an apostrophe, is used in
XML element tags to identify option attributes of the element. For example,
an <emphasis> tag might include options for emphasizing some text, such
as bold, italic or underline. This entity is used when a single quote or apostrophe appears in
the contents of an XML element.
XML entities take the form of &name; where the entity name begins with the ampersand symbol
and ends with a semicolon. Custom entities can be single characters or complex XML elements.
For example, boilerplate language for technical documentation or legal contracts can be reduced
to a single entity. However, when using entities, the XML author must ensure that inserting the
entity into an XML file will produce well-formed XML data.

XML-CORE

XML-CORE is a set of classes that make it easier to work with XML within the browser and
node.We use xml-core to make the creation of these libraries easier. Fundamentally xml-
core provides a way to transform XML to JSON(JavaScript Object Notation) and JSON to XML,
which enables you to enforce a schema on the associated XML. The goal of this is to let you
work naturally with XML in Javascript.

What is XHTML

XHTML stands for Extensible HyperText Markup Language. It is a cross between HTML and
XML language.

XHTML is almost identical to HTML but it is stricter than HTML. XHTML is HTML defined as
an XML application. It is supported by all major browsers.

Although XHTML is almost the same as HTML but It is more important to create your code
correctly, because XHTML is stricter than HTML in syntax and case sensitivity. XHTML
documents are well-formed and parsed using standard XML parsers, unlike HTML, which requires
a lenient HTML-specific parser.

History

XHTML 1.0 became a World Wide Web Consortium (W3C) Recommendation on January 26,
2000. XHTML 1.1 became a W3C Recommendation on May 31, 2001. The standard known as
XHTML5 is being developed as an XML adaptation of the HTML5 specification.

Why use XHTML

XHTML was developed to make HTML more extensible and increase interoperability with other
data formats. There are two main reasons behind the creation of XHTML:

o It creates a stricter standard for making web pages, reducing incompatibilities between
browsers. So it is compatible for all major browsers.
o It creates a standard that can be used on a variety of different devices without changes.
Let's take an example to understand it.

HTML is mainly used to create web pages but we can see that many pages on the internet contain
"bad" HTML (not follow the HTML rule).

This HTML code works fine in most browsers (even if it does not follow the HTML rules).

For example:

1. <html>
2. <head>
3. <title>This is an example of bad HTML</title>
4. <body>
5. <h1>Bad HTML
6. <p>This is a paragraph
7. </body>

The above HTML code doesn't follow the HTML rule although it runs. Now a day, there are
different browser technologies. Some browsers run on computers, and some browsers run on
mobile phones or other small devices. The main issue with the bad HTML is that it can't be
interpreted by smaller devices.

So, XHTML is introduced to combine the strengths of HTML and XML.

XHTML is HTML redesigned as XML. It helps you to create better formatted code on your site.

XHTML doesn't facilitate you to make badly formed code to be XHTML compatible. Unlike with
HTML (where simple errors (like missing out a closing tag) are ignored by the browser), XHTML
code must be exactly how it is specified to be.

XHTML MP (XHTML Mobile Profile) Introduction

XHTML MP (extensible HyperText Markup Language Mobile Profile) is the markup language
defined in WAP(Wireless Application Protocol) 2.0. WAP 2.0 is the most recent mobile services
specification created by the WAP Forum (now the Open Mobile Alliance [OMA] ). The
specification of WAP CSS (WAP Cascading Style Sheet or WCSS) is also defined in WAP 2.0.
WAP CSS is the companion of XHTML Mobile Profile and they are used together. With WAP
CSS, you can easily change and format the presentation of XHTML MP pages.

XHTML Mobile Profile is a subset of XHTML, which is the stricter version of HTML. XHTML
Mobile Profile is XHTML Basic (also a subset of XHTML) plus some additional elements and
attributes from the full version of XHTML.
The goal of XHTML Mobile Profile is to bring together the technologies for mobile Internet
browsing and that for the World Wide Web. Before the coming out of XHTML Mobile Profile,
WAP developers make use of WML(Wireless Markup Language) and WMLScript to create WAP
sites, while web developers use HTML / XHTML and CSS style sheets to build web sites.

With the announcement of XHTML Mobile Profile, the markup language of the wireless world
and the wired world finally converges. XHTML Mobile Profile and WAP CSS give wireless
Internet application developers more and better presentation control. The greatest advantage,
however, is that the same technologies can now be used to develop both the web and wireless
version of your Internet site. You can use any web browsers to view your WAP2.0 application
during the prototyping and development process.

The previous version of WAP is 1.2.1. WAP 1.2.1 sites are developed using WML and
WMLScript. WAP 2.0 is backward compatible to WAP 1.x. So, a WAP 2.0 wireless device can
be used to visit both XHTML MP / WCSS and WML / WMLScript sites. If you are interested in
learning WML or WMLScript, you may want to read our WML tutorial and WMLScript tutorial.

Advantages of XHTML MP

The greatest advantage brought by XHTML MP is that developers can now use the same
technologies for the development of both web sites and WAP sites. This benefits WAP application
development in the following ways:

 If you are familiar with web technologies such as HTML, XHTML, and CSS, you can start
developing your WAP site almost immediately. If you are new to the above web
technologies and now you learn XHTML MP, you learn at the same time how to write
markup code for the web.
 The same development tools can be used to develop both web sites and WAP sites. You
can stick to your web development tools to build your mobile Internet browsing
application. This results in a lower development cost (no need to buy new development
tools) and a lower time investment (no need to learn new development tools).
 Ordinary web browsers can be used to view your WAP site during the development
process. (You should test your WAP site with emulators and real mobile phones before the
final release, since the characteristics [e.g. screen size, number of colors supported] of real
mobile devices vary considerably.)
 HTML / XHTML pages on your web site can be converted to XHTML MP documents
with minor changes or even without any changes. (However, you have to make sure that
the layout of the HTML / XHTML pages looks nicely on a small screen and that the file
size does not exceed the maximum page size of your targeted mobile devices.)
 It becomes easier to find a developer to join your mobile Internet application development
team, since there are plenty of web developers on the job market.

Here are some other advantages of XHTML MP:

 XHTML MP supports WAP CSS, which enables the separation of content and presentation
in different files. As you all know, mobile devices have very different characteristics such
as screen sizes. The separation of the content and the presentation means you can write the
content once, and change the style and layout to suit different mobile devices with various
WAP CSS files.
 With XHTML MP and WAP CSS, you have more control over the presentation. For
example, you can control borders, backgrounds, margins, padding, etc. You can also
specify the font sizes, font families and font colors. Such features are not available in WML
1.x.

SOAP Web Services

SOAP stands for Simple Object Access Protocol. It is a XML-based protocol for accessing web
services.

SOAP is a W3C recommendation for communication between two applications.

SOAP is XML based protocol. It is platform independent and language independent. By using
SOAP, you will be able to interact with other programming language applications.

Advantages of Soap Web Services

WS Security: SOAP defines its own security known as WS Security.

Language and Platform independent: SOAP web services can be written in any programming
language and executed in any platform.

Disadvantages of Soap Web Services

Slow: SOAP uses XML format that must be parsed to be read. It defines many standards that must
be followed while developing the SOAP applications. So it is slow and consumes more bandwidth
and resource.

WSDL dependent: SOAP uses WSDL and doesn't have any other mechanism to discover the
service.

RESTful Web Services

REST stands for Representational State Transfer.

REST is an architectural style not a protocol.

Advantages of RESTful Web Services


Fast: RESTful Web Services are fast because there is no strict specification like SOAP. It
consumes less bandwidth and resource.

Language and Platform independent: RESTful web services can be written in any programming
language and executed in any platform.

Can use SOAP: RESTful web services can use SOAP web services as the implementation.

Permits different data format: RESTful web service permits different data format such as Plain
Text, HTML, XML and JSON.

SOAP vs REST Web Services

There are many differences between SOAP and REST web services. The important 10 differences
between SOAP and REST are given below:

No. SOAP REST

1) SOAP is a protocol. REST is an architectural style.

2) SOAP stands for Simple REST stands for Representational State Transfer.
Object Access Protocol.

3) SOAP can't use REST because REST can use SOAP web services because it is a
it is a protocol. concept and can use any protocol like HTTP, SOAP.

4) SOAP uses services interfaces REST uses URI to expose business logic.
to expose the business logic.

5) JAX-WS is the java API for JAX-RS is the java API for RESTful web services.
SOAP web services.

6) SOAP defines standards to be REST does not define too much standards like SOAP.
strictly followed.

7) SOAP requires more REST requires less bandwidth and resource than
bandwidth and resource than SOAP.
REST.

8) SOAP defines its own RESTful web services inherits security


security. measures from the underlying transport.

9) SOAP permits XML data REST permits different data format such as Plain
format only. text, HTML, XML, JSON etc.
10) SOAP is less preferred than REST more preferred than SOAP.
REST.

WML - Overview
The topmost layer in the WAP (Wireless Application Protocol) architecture is made up of WAE
(Wireless Application Environment), which consists of WML and WML scripting language.
 WML stands for Wireless Markup Language
 WML is an application of XML, which is defined in a document-type definition.
 WML is based on HDML and is modified so that it can be compared with HTML.
 WML takes care of the small screen and the low bandwidth of transmission.
 WML is the markup language defined in the WAP specification.
 WAP sites are written in WML, while web sites are written in HTML.
 WML is very similar to HTML. Both of them use tags and are written in plain text format.
 WML files have the extension ".wml". The MIME type of WML is "text/vnd.wap.wml".
 WML supports client-side scripting. The scripting language supported is called
WMLScript.
Features of WML:
 Text and Images: WML gives a clue about how the text and images can be presented to
the user. The final presentation depends upon the user. Pictures need to be in WBMP
format and will be monochrome.
 User Interaction: WML supports different elements for input like password entry, option
selector and text entry control. The user is free to choose inputs such as keys or voice.
 Navigation: WML offers hyperlink navigation and browsing history.
 Context Management: The state can be shared across different decks and can also be
saved between different decks.

WML Versions:

WAP Forum has released a latest version WAP 2.0. The markup language defined in WAP 2.0 is
XHTML Mobile Profile (MP). The WML MP is a subset of the XHTML. A style sheet called
WCSS (WAP CSS) has been introduced alongwith XHTML MP. The WCSS is a subset of the
CSS2.
Most of the new mobile phone models released are WAP 2.0-enabled. Because WAP 2.0 is
backward compatible to WAP 1.x, WAP 2.0-enabled mobile devices can display both XHTML
MP and WML documents.
WML 1.x is an earlier technology. However, that does not mean it is of no use, since a lot of
wireless devices that only supports WML 1.x are still being used. Latest version of WML is 2.0
and it is created for backward compatibility purposes. So WAP site developers need not to worry
about WML 2.0.

WML Decks and Cards:


A main difference between HTML and WML is that the basic unit of navigation in HTML is a
page, while that in WML is a card. A WML file can contain multiple cards and they form a deck.
When a WML page is accessed from a mobile phone, all the cards in the page are downloaded
from the WAP server. So if the user goes to another card of the same deck, the mobile browser
does not have to send any requests to the server since the file that contains the deck is already
stored in the wireless device.
You can put links, text, images, input fields, option boxes and many other elements in a card.

WML Program Structure:

Following is the basic structure of a WML program:


<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
"http://www.wapforum.org/DTD/wml12.dtd">

<wml>

<card id="one" title="First Card">


<p>
This is the first card in the deck
</p>
</card>

<card id="two" title="Second Card">


<p>
Ths is the second card in the deck
</p>
</card>

</wml>
The first line of this text says that this is an XML document and the version is 1.0. The second line
selects the document type and gives the URL of the document type definition (DTD).
One WML deck (i.e. page ) can have one or more cards as shown above. We will see complete
details on WML document structure in subsequent chapter.
Unlike HTML 4.01 Transitional, text cannot be enclosed directly in the <card>...</card> tag pair.
So you need to put a content inside <p>...</p> as shown above.

WAP Site Design Considerations:

Wireless devices are limited by the size of their displays and keypads. It's therefore very important
to take this into account when designing a WAP Site.
While designing a WAP site you must ensure that you keep things simple and easy to use. You
should always keep in mind that there are no standard microbrowser behaviors and that the data
link may be relatively slow, at around 10Kbps. However, with GPRS, EDGE, and UMTS, this
may not be the case for long, depending on where you are located.
The following are general design tips that you should keep in mind when designing a service:
 Keep the WML decks and images to less than 1.5KB.
 Keep text brief and meaningful, and as far as possible try to precode options to minimize
the rather painful experience of user data entry.
 Keep URLs brief and easy to recall.
 Minimize menu levels to prevent users from getting lost and the system from slowing down.
 Use standard layout tags such as <big> and <b>, and logically structure your information.
 Don't go overboard with the use of graphics, as many target devices may not support them.

XSLT

XSL stands for EXtensible Stylesheet Language. XSLT is for Transformation of XML document
to other formats.

What is XSLT

Before XSLT, first we should learn about XSL. XSL stands for Extensible Stylesheet Language.
It is a styling language for XML just like CSS is a styling language for HTML.

XSLT stands for XSL Transformation. It is used to transform XML documents into other formats
(like transforming XML into HTML).

What is XSL

In HTML documents, tags are predefined but in XML documents, tags are not predefined. World
Wide Web Consortium (W3C) developed XSL to understand and style an XML document, which
can act as XML based Stylesheet Language.

An XSL document specifies how a browser should render an XML document.

Main parts of XSL Document


o XSLT: It is a language for transforming XML documents into various other types of
documents.
o XPath: It is a language for navigating in XML documents.
o XQuery: It is a language for querying XML documents.
o XSL-FO: It is a language for formatting XML documents.

How XSLT Works

The XSLT stylesheet is written in XML format. It is used to define the transformation rules to be
applied on the target XML document. The XSLT processor takes the XSLT stylesheet and applies
the transformation rules on the target XML document and then it generates a formatted document
in the form of XML, HTML, or text format. At the end it is used by XSLT formatter to generate
the actual output and displayed on the end-user.

Image representation:

Advantage of XSLT

A list of advantages of using XSLT:


o XSLT provides an easy way to merge XML data into presentation because it applies user
defined transformations to an XML document and the output can be HTML, XML, or any
other structured document.
o XSLT provides Xpath to locate elements/attribute within an XML document. So it is more
convenient way to traverse an XML document rather than a traditional way, by using
scripting language.
o XSLT is template based. So it is more resilient to changes in documents than low level
DOM and SAX.
o By using XML and XSLT, the application UI script will look clean and will be easier to
maintain.
o XSLT templates are based on XPath pattern which is very powerful in terms of
performance to process the XML document.
o XSLT can be used as a validation language as it uses tree-pattern-matching approach.
o You can change the output simply modifying the transformations in XSL files.

HTTP - Overview

The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed,


collaborative, hypermedia information systems. This is the foundation for data communication for
the World Wide Web (i.e. internet) since 1990. HTTP is a generic and stateless protocol which can
be used for other purposes as well using extensions of its request methods, error codes, and
headers.

Basically, HTTP is a TCP/IP based communication protocol, that is used to deliver data (HTML
files, image files, query results, etc.) on the World Wide Web. The default port is TCP 80, but
other ports can be used as well. It provides a standardized way for computers to communicate with
each other. HTTP specification specifies how clients' request data will be constructed and sent to
the server, and how the servers respond to these requests.

Basic Features

There are three basic features that make HTTP a simple but powerful protocol:

 HTTP is connectionless: The HTTP client, i.e., a browser initiates an HTTP request and
after a request is made, the client waits for the response. The server processes the request
and sends a response back after which client disconnect the connection. So client and
server knows about each other during current request and response only. Further requests
are made on new connection like client and server are new to each other.
 HTTP is media independent: It means, any type of data can be sent by HTTP as long as
both the client and the server know how to handle the data content. It is required for the
client as well as the server to specify the content type using appropriate MIME-type.
 HTTP is stateless: As mentioned above, HTTP is connectionless and it is a direct result
of HTTP being a stateless protocol. The server and client are aware of each other only
during a current request. Afterwards, both of them forget about each other. Due to this
nature of the protocol, neither the client nor the browser can retain information between
different requests across the web pages.

Basic Architecture

The following diagram shows a very basic architecture of a web application and depicts where
HTTP sits:

The HTTP protocol is a request/response protocol based on the client/server based architecture
where web browsers, robots and search engines, etc. act like HTTP clients, and the Web server
acts as a server.

Client
The HTTP client sends a request to the server in the form of a request method, URI, and protocol
version, followed by a MIME-like message containing request modifiers, client information, and
possible body content over a TCP/IP connection.

Server

The HTTP server responds with a status line, including the message's protocol version and a
success or error code, followed by a MIME-like message containing server information, entity
meta information, and possible entity-body content.

HTTP - Messages

HTTP is based on the client-server architecture model and a stateless request/response protocol
that operates by exchanging messages across a reliable TCP/IP connection.

An HTTP "client" is a program (Web browser or any other client) that establishes a connection
to a server for the purpose of sending one or more HTTP request messages. An HTTP "server" is
a program ( generally a web server like Apache Web Server or Internet Information Services IIS,
etc. ) that accepts connections in order to serve HTTP requests by sending HTTP response
messages.

HTTP makes use of the Uniform Resource Identifier (URI) to identify a given resource and to
establish a connection. Once the connection is established, HTTP messages are passed in a
format similar to that used by the Internet mail [RFC5322] and the Multipurpose Internet Mail
Extensions (MIME) [RFC2045]. These messages include requests from client to server
and responses from server to client which will have the following format:

HTTP-message = <Request> | <Response> ; HTTP/1.1 messages

HTTP requests and HTTP responses use a generic message format of RFC 822 for transferring
the required data. This generic message format consists of the following four items.

 A Start-line
 Zero or more header fields followed by CRLF(carriage return & line feed)
 An empty line (i.e., a line with nothing preceding the CRLF)
 indicating the end of the header fields
 Optionally a message-body

In the following sections, we will explain each of the entities used in an HTTP message.

Message Start-Line
A start-line will have the following generic syntax:

start-line = Request-Line | Status-Line

We will discuss Request-Line and Status-Line while discussing HTTP Request and HTTP
Response messages respectively. For now, let's see the examples of start line in case of request
and response:

GET /hello.htm HTTP/1.1 (This is Request-Line sent by the client)

HTTP/1.1 200 OK (This is Status-Line sent by the server)

Header Fields

HTTP header fields provide required information about the request or response, or about the
object sent in the message body. There are four types of HTTP message headers:

 General-header: These header fields have general applicability for both request and
response messages.
 Request-header: These header fields have applicability only for request messages.
 Response-header: These header fields have applicability only for response messages.
 Entity-header: These header fields define meta information about the entity-body or, if
no body is present, about the resource identified by the request.

All the above mentioned headers follow the same generic format and each of the header field
consists of a name followed by a colon (:) and the field value as follows:

message-header = field-name ":" [ field-value ]

Message Body

The message body part is optional for an HTTP message but if it is available, then it is used to
carry the entity-body associated with the request or response. If entity body is associated, then
usually Content-Type and Content-Length headers lines specify the nature of the body
associated.

A message body is the one which carries the actual HTTP request data (including form data and
uploaded, etc.) and HTTP response data from the server ( including files, images, etc.). Shown
below is the simple content of a message body:

<html>
<body>

<h1>Hello, World!</h1>

</body>
</html>

Next two chapters will make use of above explained concepts to prepare HTTP Requests and
HTTP Responses.

HTTP - Requests

An HTTP client sends an HTTP request to a server in the form of a request message which
includes following format:

 A Request-line
 Zero or more header (General|Request|Entity) fields followed by CRLF(carriage return &
line feed)
 An empty line (i.e., a line with nothing preceding the CRLF)
 indicating the end of the header fields
 Optionally a message-body

The following sections explain each of the entities used in an HTTP request message.

Request-Line

The Request-Line begins with a method token, followed by the Request-URI and the protocol
version, and ending with CRLF. The elements are separated by space SP characters.

Request-Line = Method SP Request-URI SP HTTP-Version CRLF

Let's discuss each of the parts mentioned in the Request-Line.

Request Method

The request method indicates the method to be performed on the resource identified by the
given Request-URI. The method is case-sensitive and should always be mentioned in uppercase.
The following table lists all the supported methods in HTTP/1.1.

S.N. Method and Description

GET
1
The GET method is used to retrieve information from the given server using a given URI.
Requests using GET should only retrieve data and should have no other effect on the data.

HEAD
2
Same as GET, but it transfers the status line and the header section only.
POST
3
A POST request is used to send data to the server, for example, customer information, file
upload, etc. using HTML forms.

PUT
4
Replaces all the current representations of the target resource with the uploaded content.

DELETE
5
Removes all the current representations of the target resource given by URI.

CONNECT
6
Establishes a tunnel to the server identified by a given URI.

OPTIONS
7
Describe the communication options for the target resource.

TRACE
8
Performs a message loop back test along with the path to the target resource.

Request-URI

The Request-URI is a Uniform Resource Identifier and identifies the resource upon which to
apply the request. Following are the most commonly used forms to specify an URI:

Request-URI = "*" | absoluteURI | abs_path | authority

S.N. Method and Description

The asterisk * is used when an HTTP request does not apply to a particular resource, but to
the server itself, and is only allowed when the method used does not necessarily apply to a
1
resource. For example:
OPTIONS * HTTP/1.1

The absoluteURI is used when an HTTP request is being made to a proxy. The proxy is
requested to forward the request or service from a valid cache, and return the response. For
2
example:
GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1
The most common form of Request-URI is that used to identify a resource on an origin
server or gateway. For example, a client wishing to retrieve a resource directly from the
origin server would create a TCP connection to port 80 of the host "www.w3.org" and send
3 the following lines:
GET /pub/WWW/TheProject.html HTTP/1.1
Host: www.w3.org
Note that the absolute path cannot be empty; if none is present in the original URI, it
MUST be given as "/" (the server root).

Request Header Fields

We will study General-header and Entity-header in a separate chapter when we will learn HTTP
header fields. For now, let's check what Request header fields are.

The request-header fields allow the client to pass additional information about the request, and
about the client itself, to the server. These fields act as request modifiers.Here is a list of some
important Request-header fields that can be used based on the requirement:

 Accept-Charset
 Accept-Encoding
 Accept-Language
 Authorization
 Expect
 From
 Host
 If-Match
 If-Modified-Since
 If-None-Match
 If-Range
 If-Unmodified-Since
 Max-Forwards
 Proxy-Authorization
 Range
 Referer
 TE
 User-Agent

You can introduce your custom fields in case you are going to write your own custom Client and
Web Server.

Examples of Request Message

Now let's put it all together to form an HTTP request to fetch hello.html page from the web
server running on xyz.com
GET /hello.html HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.xyz.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Here we are not sending any request data to the server because we are fetching a plain HTML
page from the server. Connection is a general-header, and the rest of the headers are request
headers. The following example shows how to send form data to the server using request
message body.(cgi stands for computer-generated imagery)

POST /cgi-bin/process.cgi HTTP/1.1


User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.xyz.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

licenseID=string&content=string&/paramsXML=string

Here the given URL /cgi-bin/process.cgi will be used to process the passed data and accordingly,
a response will be returned. Here content-type tells the server that the passed data is a simple
web form data and length will be the actual length of the data put in the message body. The
following example shows how you can pass plain XML to your web server:

POST /cgi-bin/process.cgi HTTP/1.1


User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.xyz.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

<?xml version="1.0" encoding="utf-8"?>


<string xmlns="http://clearforest.com/">string</string>

HTTP - Responses

After receiving and interpreting a request message, a server responds with an HTTP response
message:

 A Status-line
 Zero or more header (General|Response|Entity) fields followed by CRLF
 An empty line (i.e., a line with nothing preceding the CRLF)
 indicating the end of the header fields
 Optionally a message-body

The following sections explain each of the entities used in an HTTP response message.

Message Status-Line

A Status-Line consists of the protocol version followed by a numeric status code and its
associated textual phrase. The elements are separated by space SP characters.

Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF

HTTP Version

A server supporting HTTP version 1.1 will return the following version information:

HTTP-Version = HTTP/1.1

Status Code

The Status-Code element is a 3-digit integer where first digit of the Status-Code defines the class
of response and the last two digits do not have any categorization role. There are 5 values for the
first digit:

S.N. Code and Description

1xx: Informational
1
It means the request was received and the process is continuing.

2xx: Success
2
It means the action was successfully received, understood, and accepted.

3xx: Redirection
3
It means further action must be taken in order to complete the request.

4xx: Client Error


4
It means the request contains incorrect syntax or cannot be fulfilled.

5xx: Server Error


5
It means the server failed to fulfill an apparently valid request.
HTTP status codes are extensible and HTTP applications are not required to understand the
meaning of all registered status codes. A list of all the status codes has been given in a separate
chapter for your reference.

Response Header Fields

The response-header fields allow the server to pass additional information about the response
which cannot be placed in the Status- Line. These header fields give information about the server
and about further access to the resource identified by the Request-URI.

 Accept-Ranges
 Age
 ETag
 Location
 Proxy-Authenticate
 Retry-After
 Server
 Vary
 WWW-Authenticate

You can introduce your custom fields in case you are going to write your own custom Web
Client and Server.

Examples of Response Message

Now let's put it all together to form an HTTP response for a request to fetch the hello.html page
from the web server running on xyz.com

HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
Content-Length: 88
Content-Type: text/html
Connection: Closed
<html>
<body>
<h1>Hello, World!</h1>
</body>
</html>

The following example shows an HTTP response message displaying error condition when the
web server could not find the requested page:

HTTP/1.1 404 Not Found


Date: Sun, 18 Oct 2012 10:36:20 GMT
Server: Apache/2.2.14 (Win32)
Content-Length: 230
Connection: Closed
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>Not Found</h1>
<p>The requested URL /t.html was not found on this server.</p>
</body>
</html>

What are Cookies

A cookie is a part of data from a website that is saved inside a web browser that the website can
fetch at a later time. Cookies are used to communicate the server that users have restored to a
specific website. When users restore to a website, a cookie provides data and enables the site to
show selected settings and targeted content.

Cookies also store data including shopping cart contents, registration or login credentials, and
client preferences. This is completed so that when users revisit sites, any data that was supported
in an earlier session or any set preferences can be simply retrieved.

Organizers use cookies to track customer activity across sites so they can superior target ads. While
this specific practice is generally offered to support a more personalized customer experience,
some people also view this as a privacy issue.

Types of Cookies

There are various types of cookies which are as follows −

Session cookies

Session cookies are also defined as temporary cookies. They are generated for an individual
session and disappear once it can close the browser. They are first-party cookies and all the
management authority concerning session cookies deception with the website and the user can’t
ruin session cookies from its browser. Session cookies are used by administration websites and
online banks. They maintain track of your browsing session while you actively operate the site.
Once you close the browser, the cookies will automatically terminate. This avoids some malicious
users from calling those websites later using your stored session data.

Third-party cookies

Third-party cookies are referred to as marketing or tracking cookies. These are the cookies fixed
by third-party websites. For instance, advertisements and banners displayed on a website you stay
on are generally shown by a third party.

These third parties store cookies on your computer to be able to collect as much information about
you as possible to be able to display more relevant ads. This can consist of your search queries,
behaviours, interests, etc.

Persistent cookie

Persistent cookies are saved for a definite length of time. These cookies continue on your device
just before they expire or are eliminated. Persistent cookies are referred to as tracking cookies
because they can assemble user data such as browsing habits and options.

Supercookie

Supercookies are equivalent to session cookies. They also mark the user behavior and browsing
history. Supercookies are also saved in multiple places than standard cookies. This creates
detecting and eliminating them more complex for the normal user. Supercookies are referred to as
"zombie cookies" or "ever cookies."

Types of cookies

There are multiple types of cookies that run in modern web browsers. Different types of cookies
have specific use cases to enable certain capabilities.

 HTTP cookies. This is the overall category of computer cookies used with modern web
browsers to enable specific capabilities. All the cookies in this list -- except for flash cookies
-- are forms of HTTP cookies.

 Flash cookies. These are not browser or HTTP cookies but, rather, a specific type of cookie
that works with Adobe Flash. With the decline in the use of Flash, these cookies are no
longer widely used.
 Secure cookies. These are first- and third-party cookies that can only be sent over encrypted
HTTPS connections.

Are cookies safe?

Cookies have been part of daily internet operations for decades and are generally safe. However,
third-party cookies are sometimes seen as intrusive.

Third-party cookies enable entities to track user behavior in a way the user might not be aware of
-- and they may infringe upon the user's privacy. Advertisers often use third-party cookies to
track user activity to provide targeted ads to the user. This is a privacy concern for many who
don't want to be tracked or have their browsing habits shared. Cookies that can identify users are
now subject to General Data Protection Regulation and California Consumer Privacy
Act regulations.

There is also the potential for threat actors to hijack third-party cookies. This would give them
access to user information and enable them to launch other attacks. These attacks include session
hijacking, cross-site scripting and cross-site request forgery.

Unsecured cookies can also be a potential security risk for users and website operators. An
unsecured cookie is transmitted unencrypted over HTTP to the origin website or to a third party.
If the information is something simple -- such as whether the user has visited the site before --
that's a minimal risk. But some sites may use cookies to store user information -- including
personally identifiable information such as authentication credentials and payment card
information. If that type of information is sent unencrypted, it can be intercepted and used by a
criminal. A secure cookie only enables cookie information to be sent via HTTPS and does not
have the same risk.

What is the Platform for Privacy Preferences Project (P3P)?

The Platform for Privacy Preferences Project (P3P) is an emerging industry standard that enables
web sites to express their privacy practices in a standardized format that can be automatically
retrieved and interpreted by user agents. The goal is to help users be informed about web site
practices by simplifying the process of reading privacy policies. With P3P, users need not read the
privacy policies at every site they visit; instead, key information about what data is collected by a
web site can be automatically conveyed to a user, and discrepencies between a site's practices and
the user's preferences can be automatically flagged. The goal of P3P is to increase user trust and
confidence in the Web.

Although P3P provides a technical mechanism for helping inform users about privacy policies
before they release personal information, it does not provide a mechanism for ensuring sites act
according to their policies. Products implementing the P3P specification may provide assistance
in that regard, but that is up to specific implementations and beyond the scope of the specification.
P3P is intended to be complementary to both legislative and self-regulatory programs that can help
enforce web site policies. In addition, while P3P does not include mechanisms for transferring or
securing personal data, it can be built into tools designed to facilitate data transfer.

P3P is an activity of the World Wide Web Consortium (W3C). For brevity, we often refer to
activities, specifications, and products related to the Platform for Privacy Preferences Project as
"P3P."*

2. What is the Status of P3P?

The P3P specification is currently a W3C proposed recommendation. The W3C membership has
until February 25 to vote on this specification.

3. Who is working on P3P?

A large number of W3C member organizations have been involved with P3P efforts, including:
Akamai, America Online, AT&T, Center for Democracy and Technology, Citigroup, Crystaliz,
Direct Marketing Association, Electronic Network Consortium, GMD, Hewlett Packard, IBM,
IDcide, Independent Centre for Privacy Protection Schleswig-Holstein, International Security,
Trust, and Privacy Alliance, Internet Alliance, Jotter Technologies Inc., Microsoft, NCR, NEC,
Netscape, Nokia, Phone.com, TRUSTe. In addition, a number of parties from outside the
consortium have been involved in P3P. Several data commissioner offices have contributed time
and energy to the P3P project, including the Office of the Information and Privacy Commissioner
of Ontario. A list of participants can be found in the contributors section of P3P specification. In
addition, many individuals provided feedback on the P3P public mailing-list.

4. Who has implemented P3P?

A list of known implementations and services related to P3P is available at the W3C web site.

5. What is the status of the patent claims on P3P?

In the summer of 1998, the P3P working groups were informed that Intermind, Inc., claimed to
hold a patent that directly related to P3P. At that time, Intermind proposed licensing terms that
would have required users of P3P-related technolgies to pay royalties to the company. Work on
P3P slowed during this period while the merits of Intermind's claim was investigated. W3C asked
a major patent-law firm to analyze the claim. On 27 October 1999, Barry Rein et al. from Pennie
& Edmonds law firm released their assessment of the patent claim. Their analysis concluded that
there was no risk of patent infringement. Since then, Intermind, which has changed its name to
OneName, has indicated that even if P3P-related technologies were to overlap with their patent,
no royalties would be assessed. In a letter to Lorrie Cranor, chair of the P3P specification WG,
OneName wrote:

As a result of these changes [to our business plan], we can now assure you that, in spite of positions
that Intermind may have taken in the past, OneName has no intention of charging a royalty or
preventing the use of this technology by the P3P project.

Thus, no patent conflicts are currently faced by or expected for P3P.

Evaluating Complex Interaction

Introduction

HTML and CSS provide limited interactivity outside of form elements. But with JavaScript, user
interfaces can provide more complex interactions. Examples of complex interactions include:

 expandable sections of content


 custom input elements
 hover or animations
 overlays or dialogs
 single page apps
 using AJAX(Asynchronous JavaScript And XML) for dynamic updates

Complex interactions present particular accessibility challenges to mobile, keyboard, and screen
reader users, and validating complex interaction accessibility can be time consuming. Projects
should budget enough research, design, and QA time for complex interaction. To mitigate risk,
consider avoiding complex interactions for important functionality.

Below is a checklist for validating complex interactivity.

General Complex Interaction Guidelines

1. Updating, animating, or moving content:


o Avoid having content move or update automatically. If content must update or
move automatically, provide a way to pause, stop, or hide the motion or updates.
o Do not change the user agent, viewport, focus, or page content when an element
receives focus or when changing the value or setting of any element.
o When content is updated or a status message is otherwise presented to the user, it
is presented using an ARIA(Accessible Rich Internet Application) live region.
o Content must not flash or flicker more than three times per second.
2. Touch guidelines:
o Drag, swipe, multi-finger gestures, or other gestures are not required to complete
interactions. When the ability to use such gestures are present, non-gesture
alternatives are also present.
o Targets should be at least 44px wide and 22px tall.
3. Keyboard guidelines:
o All functionality is operable through a keyboard alone, without requiring specific
timings for the individual keystrokes, on all devices, including mobile devices.
o Keyboard focus can move to and away from elements using a keyboard only,
using conventional keyboard techniques (tab, arrow keys, escape, etc). The
keyboard focus is never trapped on an interface.
o Access keys are not necessary and are generally avoided. When implemented,
access keys do not conflict with conventional operating system or browser
keyboard shortcuts.
o If non-conventional, keyboard-specific interactions are implemented, instructions
are available.
o The tab order for all focusable elements is intuitive and sensible.
o Avoid setting tabindex to be greater than 0.
o Keyboard focus is always on a visible element, and keyboard focus styles are
designed to be more salient than browser defaults.
o JavaScript manages keyboard focus in intuitive ways, especially when content is
added to or removed from the page. Focus must not be lost during the interaction.
4. Content triggered by hover or keyboard focus:
o Content triggered by a hover should also be triggerable by a keyboard.
o The triggered content can be dismissed without moving the mouse or keyboard
focus.
o The triggered content can be hovered over without disappearing.
o The triggered content remains visible until the hover or focus are moved, the
content is dismissed, or the information is no longer valid.
5. Screen reader guidelines:
o If the interaction has a corresponding WAI-ARIA Authoring Practices design
pattern(link is external), the implementation adheres to the design pattern.

What is a Dynamic Website?

A website can be static or dynamic. A static website's information does not change automatically,
which means it remains static or the same for all visitors of the site. A dynamic website or webpage
has information, which is generated in real-time and altered on the basis of the viewer, the time
zone, time of the day, and other aspects. For example, the xyz website's home page changes daily
to provide visitors latest content as it is a dynamic web page. However, this page that you are
visiting currently, its information will not be changed until it is not updated as it is a static page.

The dynamic web pages have Web scripting code like ASP or PHP. The code within the dynamic
web pages is analyzed at the time they are accessed by the users; consequently, HTML is
forwarded to the client's Web browser. A dynamic website can be client-side scripting or server-
side scripting or can be both kinds of scripting in order to generate the changing content. In
dynamic websites, HTML programming is also involved for the basic structure. The page can use
any scripting language like JavaScript with client-side HTML scripting to alter the content of the
page. Scripts are run on the server, which hosts the page; it is done with server-side scripting.

In server-side scripting, the parameters are defined that provide a way the process for how the page
is built. While comparing with static websites, dynamic websites are easier to maintain; therefore,
most large websites are dynamic type. This is because, with static websites, whenever a change is
made, they must be opened, edited, and published manually, and these site's each page has unique
content. On the other hand, the information is accessed from a database by dynamic pages.
Therefore, with dynamic websites, webmasters may only need to update a database record at the
time of they want to change the content. Especially, the dynamic concept is much ideal for large
sites as they have hundreds or thousands of pages.

Why do you choose a dynamic page over a static page?

Why a company may require a dynamic page as compared to a static page, there are various
reasons, which are discussed below:

Need to access a database or external file

A page needs to be dynamic, which needs to access an external file or a database to get information.
For case, whenever you visit Google and search any query, Google sends your search for any query
to multiple systems and combines all information into a search result page.

Information is updated frequently

When you update information on dynamic websites, they make it easier to update information and
faster to get information online. For instance, many different reporters can submit stories on a
website. The company can update the home page automatically with the help of scripts to have
those stories. Also, the company does not need to depend on someone to modify a static HTML
page.

Dynamic sites make it easier for everyone to contribute

Anyone who has much knowledge about programming or HTML also may make a website with
the help of WordPress sites and other CMS solutions. Once they have created a site, they can create
pages with the help of using an online editor as well a post them through th CMS. In contrast, with
the static website, the pages have to create in an HTML editor by the user and upload with the help
of using FTP.

Features of Dynamic Website

There are various features of a dynamic website, which are discussed below:
o Page Management: The software of page management or content management offers
users the tools that allow them to manage their websites as they want. For adding and
updating information on the site, they offer forms and templates that make it easy.
o Guestbook: A guestbook is a paper or electronic way for visitors, also known as a visitor
log, which is a way to acknowledge user visitation to place in the web-based form or
physical form. Generally, one leaves any comment, their postal address, name, or note if
required.
o Search Facility: This is the most important factor for a website because it helps to explore
your website. And, end-users will not be aware of the size of your Web site; they will really
want to use it. One of the widest tools is search engines used by end-users.
o User Management: One of the most critical parts of maintaining a secure system is user
management, which describes how you can protect your server with the help of using
simple and effective user account management techniques.
o Contact Forms Management: It supports a wide range of contact form elements allows
you to create and manage different customized contact forms for your website. Shortcodes
are generated, which allow you to change contact form element properties, and shortcodes
do not need to replace every time.
o Header Banner Management: This allows extensive management of advertising banner
presentation as well as clickstream tracking. Through the URL (uniform resource locator)
of the GIF banner image file, banners can be stored on the remote server, the exchange host
server, or your server.
o Multimedia File Management: You can upload new multimedia files on your website by
using Inigo's built-in multimedia manager, which you can use at any time needed. You can
also add custom filters that enable you to manipulate images automatically to fit according
to the site guidelines

Benefits of Dynamic Website

There are numerous benefits to choose a dynamic website design, which are given below:

Easy Updating

One of the best benefits of choosing a dynamic website design is that it allows you to update
content easily based on your requirements. In changing the dynamic website, there is not a lot of
computer knowledge is needed. In the template file, when you perform a single change, it will
affect all the pages with that specific file. While comparing with the static page, the dynamic page
will be quickly updated to become responsive for different screen sizes.

User Friendly

The dynamic design of a website is very user-friendly, which allows users to make changes to the
website easily based on their requirements.

Interactive

You can make a better user interface by using CSS (Cascading Style Sheet), which makes the site
more attractive. Also, on the sites, visitors can leave a reply or comment on the basis of their real-
time experience that helps the owner to know about the reviews of the customers through which
site owners can change their site accordingly. Furthermore, if users have any questions, they can
ask on the site that would be reverted by the website's owner. Therefore, a dynamic website is
much ideal, even it is only possible with a dynamic website.

Content Management System

A dynamic website allows you to update information easily and quickly. For example, you have a
site that contains more than 50 pages, and you need to modify one menu on your site. It can be
changed by anyone who knows about the HTML coding for the same. If you do this every time, it
may be difficult to do so. But with the dynamic website, the website's owner can change only the
portion of a particular section of the site through CMS service.

Professional Look

As compared to static websites, the looks of dynamic websites are more professional. Static
Websites are usually ideal for showcasing your products on the website as well as allows users to
call and book orders; therefore, these websites often look unprofessional. Hence, the looks of
dynamic websites are more preferred.

Easily Manageable

Dynamic sites can be built with an admin panel, and like PHP, MVC languages are used by them
to interact with information. These sites are built with an admin panel that makes it capable for the
website's owner to make changes in the website in a blink without the need for knowledge about
any programming language or coding.

Disadvantages of Dynamic website

Although dynamic websites have various benefits, they also have some difficulties; such are as
follows:
o One of the main limitations of the dynamic website is that it needs changes in a certain
period.
o Automation technology is required by developers that are not easy to get.
o To add to developers' budget for marketing, brand journalist or content marketing are
required to find or hire.

Why should you choose a static page over a dynamic page?

There are some reasons why a company may need to choose a static page as compared to a dynamic
page or site, which are as follows:

Speed

While comparing with the dynamic page generated server-side, a static HTML page loads faster
every time because it does not need an external resource. On the other hand, at least one request is
needed for dynamic server-side sites that increase the load time.

Portability

Like a database, an external resource is not required by a static page, which allows the page to
work anywhere. For case, with the help of using a CDN, the page can be cached across multiple
servers and viewed offline.

Lower server requirements

A static HTML page needs a lot of fewer system resources as it does not need any server-side
script or database to load the page. As compared to a server serving dynamic web pages, a static
page serves more visitors and performs a lot faster as it needs less from a server.

Web Browser

web Browser is an application software that allows us to view and explore information on the
web. User can request for any web page by just entering a URL into address bar.

Web browser can show text, audio, video, animation and more. It is the responsibility of a web
browser to interpret text and commands contained in the web page.

Earlier the web browsers were text-based while now a days graphical-based or voice-based web
browsers are also available. Following are the most common web browser available today:
Browser Vendor

Internet Explorer Microsoft

Google Chrome Google

Mozilla Firefox Mozilla

Netscape Navigator Netscape Communications Corp.

Opera Opera Software

Safari Apple

Sea Monkey Mozilla Foundation

K-meleon K-meleon

Architecture

There are a lot of web browser available in the market. All of them interpret and display
information on the screen however their capabilities and structure varies depending upon
implementation. But the most basic component that all web browser must exhibit are listed
below:

 Controller/Dispatcher
 Interpreter
 Client Programs

Controller works as a control unit in CPU. It takes input from the keyboard or mouse, interpret
it and make other services to work on the basis of input it receives.

Interpreter receives the information from the controller and execute the instruction line by line.
Some interpreter are mandatory while some are optional For example, HTML interpreter
program is mandatory and java interpreter is optional.

Client Program describes the specific protocol that will be used to access a particular service.
Following are the client programs tat are commonly used:

 HTTP
 SMTP
 FTP
 NNTP
 POP
Features and Functions of Web Browser

 Giving users access to all sorts of information is the primary function of a web browser that
includes retrieval, display, and navigation.
 The new browsers are very minimal with an easy user interface with support of HTML
opening all file formats and protocols in one place.
 There are internet suites to support email, Usenet news, and Internet Relay Chat and they
are often not the same as web browsers.
 Users can open several information resources at the same time in the same window or
different windows.
 They also block the redirect to prevent users from reaching unwanted windows and websites
without their consent.
 There are options for users to bookmark the web pages so it’s easier and quicker to access in
the future. These bookmarks are the user’s “favorites” and most of the browsers have this as
an inbuilt feature.
 The user interface is mostly similar in all browsers with a refresh or reload button, stop
button, an address bar, a search bar, a status bar, a viewport, and other incremental find
features on the web page.
 There are a few devices with photos of LG Smart TV on-screen keyboard with a magic
motion remote.
 There is an option to delete web history, cookies, and cache ensuring security as well as
privacy of the user.
 Before there was only HTML support but the new browsers have HTML and XHTML
making the process smoother.
 There is a browser extension as well for extending the web browser’s functionality.
 The web browsers have a user interface, layout engine, scripting, interpreter, user interface
backend, networking, and data.
Protocols and Standards

The main protocol of the web browser is hypertext transfer protocol to get on web pages. This
protocol enables browsers to get info and access the web pages on request using a URL that
always begins with HTTP:/. This is the reason why file formation of web pages is mostly HTML
because it supports all sorts of content and the designers to experiment for user-friendliness.
Some Key Points

 Click the back button when you want to move back to the previous page and forward button
to go to the next page.
 A new page can open in the same tab or in a new one.
 To save a web page – Click File > Save As and a saved box will appear that you can save in
any folder of your PC.
 To save Web Elements like images and links – right-click on what you want to save >
choose to save picture as > name the folder and save.
 To bookmark favorites – click on the star on the search on right-left > save the bookmark.
Save as many you want and open from the bookmark list.
 To change the order – Click the Favourites menu > Organize Favourites. You can also
delete the one you no longer need.
 There is a stop button to the page from loading.
 A Refresh button to reload the page.
 A Home Button taking users to selected homepage.
 The URL is the address of the website which users can enter in the search bar to access
them.
Popular Web Browsers
A process can be described as an application’s executing program. A thread is the one that lives

inside of a process and executes any part of its process’s program. When you start an application, a

process is created. The program might create thread(s) to help it do work, but that’s optional.

A process can ask the Operating System to spin up another process to run different tasks. When this

happens, different parts of the memory are allocated for the new process. If two processes need to

talk, they can do so by using Inter Process Communication (IPC). Many applications are designed
to work this way so that if a worker process get unresponsive, it can be restarted without stopping

other processes which are running different parts of the application.

Which process controls what?

Browser: Controls the applications including address bar, bookmarks, back and forward buttons.

Also handles the invisible, privileged parts of a web browser such as network requests and file

access.

Renderer: Controls anything inside of the tab where a website is displayed.

Plugin: Controls any plugins used by the website, for example, flash.

GPU: Handles GPU tasks in isolation from other processes. it is separated into different process

because GPUs handles requests from multiple apps and draw them in the same surface.
Different processes pointing to different parts of browser UI

How google chrome use Processes and Threads

Chrome has a multi-process architecture and each process is heavily multi-threaded. The main goal

is to keep the main thread (“UI” thread in the browser process) and IO thread (each process’ thread

for handling IPC) responsive. This means offloading any blocking I/O or other expensive operations

to other threads.

Multi-process on the Web: The Browser Process Model

While Web Applications are granted a single thread, the Main Thread, to run most of their
application and UI logic, Web Browsers are absolutely not a single threaded (or single-process)
environment.

Web Application

Web Applications are authored in HTML, JavaScript, and CSS. They are delivered to the user
over the network from a remote server.

Once this remote code is loaded and presented, a user may interact with the application within
the browser tab or window.
Browsers

A Web Browser is a compiled C++ binary (i.e. chrome.exe) that is installed on and launched
from a user's device.

It's responsible for interfacing with a variety of sources. Some examples include:

 The device's filesystem, for loading user preferences, history, favorites, etc.
 The network, to load and deliver remote data
 The OS's input events, such as clicking and typing
 The GPU and display, to present pixels on-screen
 Remote code loaded for a web application, such as HTML, JavaScript, and CSS files
defined by a web application

The Web Browser must also support simultaneous instances of multiple disparate Web
Applications across Browser Tabs or Windows.
Processes vs. Threads

Web Developers rarely interface with systems level concepts of processes and threads. For a
quick refresher, consider the diagram below:

Processes are where software executes on the OS. They have dedicated access to a block of
memory to use while executing to store runtime state. A process cannot access the memory utilized
by another executing process on the OS.

A process may have one or more threads for programs to execute instructions on. Threads share
access to the memory block dedicated to their containing process.

Since processes require a dedicated memory block, creating a new process consumes more
memory than creating a new thread.

Process Communication
Processes can communicate with each other through Inter-Process Communication (abbreviated
as IPC). Threads can communicate with each other within their containing process as well, but not
directly with threads in other processes.

Communicating between processes is, in general, slower than communicating across threads
within a process.

Process Security

Processes can be granted various levels of access to system resources. For example, a process
can be run at a Low permission level, excluding it from access to the Filesystem or Registry.

Similarly, a process can be run at a High permission level, and it is able to update sensitive parts
of the host system. These processes are powerful and dangerous if exploited or compromised.

Processes and the Browser

While each browser (i.e. WebKit, Chromium, Firefox) will differ in their exact implementation
of their process model, they follow a similar pattern.
In general, browsers will:

 Allocate low-privilege, sandboxed WebContent Processes for running Web


Applications
 Have a single Browser Process for high-privilege actions. Examples include:
o Accepting User Input
o Accessing Saved Passwords
o Updating Bookmarks and Favorites
 Have a single Network Process for interfacing with the Network and Browser Cache
 Other dedicated processes, for interfacing with Audio, Graphics / GPU, etc.

The exact amount of dedicated processes and their responsibilities / privileges will vary by
browser implementation.

Note: the WebContent Process will have different names depending on the browser.

For example, in Chromium, it's called the Renderer Process. In WebKit, it's called
the WebProcess.

Multi-Process Model Motivation

This process model is intentional; its design facilitates a reliable, performant, and secure web
browser experience.

Security Benefits

From a security perspective, restricting access to high privilege actions reduces the surface area
for a malicious actor to exploit.
In the case of the WebContent Process, the code executing in this process is unknown, remote
code acquired from an arbitrary third party. The only way to securely execute this code on a
user's device is with the lowest possible privilege.

Could you imagine if JavaScript loaded from any website could write to your filesystem! 😱

Reliability Benefits

From a reliability perspective, by allocating separate processes for roughly* each Web Application
in a Browser Tab, Web Applications are insulated from crashing each other.

For example, if there are two tabs open to different web applications, a crash / segfault in one
process will not affect the other tab or browser-processes.

Furthermore, if a browser-internal process like the Network process crashes, the browser can
restart it without the user noticing a crash even occurred!
Note: I said roughly* because different browsers have different algorithms for determining when
to create a process. Behaviors tend to diverge among scenarios like <iframe> elements and
opening links to new tabs.

Performance Benefits

Similar to reliability, from a performance perspective, moving web applications and browser
related work into their own dedicated processes helps mitigate competition for thread time.

For example, if all processes shared the same Main UI Thread, any heavy work in one web
application could degrade speed and responsiveness of the entire browser!

Browser Process Communication

While Web Applications and core browser internal work (like Networking) are encapsulated
across process boundaries with properly scoped privileges, they frequently communicate with each
other via IPC.

IPC channels allow processes to expose functionality for other processes to utilize. This maintains
the benefits of being multi-process described earlier, while exposing core functionality to other
processes in the system.
For example, a Web Application in a WebContent Process may request Network data by using
IPC channels to notify the Network Process of the desired URL and Method. The Network Process
can use an IPC channel to notify the WebContent Process when the data has returned.

For another example, the Browser Process may notify the WebContent Process that a user typed a
character from their keyboard. The WebContent Process may handle this input and dispatch
a keypress event to its JavaScript Event Listener.

Performance Trade-offs

While we've discussed the performance benefits of the browser's multi-process model, there are
costs and trade-offs associated as well.

Memory Overhead

While processes provide a powerful security boundary, spinning up new processes requires
additional memory allocation.

This means that the more tabs a user opens, the more processes must be created, and more memory
must be consumed by the browser.

While the browser has mitigations in place to help alleviate this cost in memory constrained
environments, the general trend of increased memory consumption holds.

Example mitigations the browser incorporates to help with memory utilization include:

 Draining stale tabs' memory onto disk


 Combining processes in highly memory constrained environments (like low-end Android
devices)

Process Creation Overhead

Creating a new process isn't necessarily expensive, but for low-end devices under intense load, it
will be more expensive to create a new process rather than simply a new thread in an existing
process.

The browser has mitigations in place to help with this as well, including:

 Keeping a spare WebContent Process available for a New Tab or Window to use
 Parallelizing navigation requests with process creation to parallelize network and CPU
activity when creating a new Tab or Window

IPC Overhead
Communicating across processes is slower than keeping communication completely localized
within a single process.

Furthermore, if communication channels get clogged up, IPC messages can be delayed and
degrade user experience.

In order to mitigate this, each process in the browser usually has a dedicated thread strictly for IPC
messaging that's designed to be as lightweight and responsive as possible. Message formats are
also optimized for minimal transfer time between processes.

This is described in detail in my next tip on examining the inner workings of a process in
Chromium.

Real Examples

Chromium

Have you ever opened up the Task Manager and noticed how many processes and how much
memory Chrome is utilizing? Well, now you know why! You probably have a lot of tabs open!

Chromium utilizes the most processes out of all the browsers, in the name of security and
stability.

One area to view the amount of processes you are using is in your device's Task Manager (or
Activity Monitor for Mac):

For more more detailed process information, you can use the Browser Task Manager:
In this view, you can see each process for each tab, and the internal browser processes for
Network and GPU. Each PID is available as well as each process's resource consumption:

Try creating and closing tabs and observe the processes in this monitor!

WebKit / Safari

While Safari isn't available on Windows, I am able to run a WebKit instance (the browser engine
for Safari) via Playwright

Opening multiple windows in a WebKit browser will spawn a WebProcess for each. WebKit
utilizes a shared WebkitNetworkProcess and Browser process, but doesn't spawn quite as many
other processes as Chromium:
In Safari on Mac, you would see something similar, though the names of the processes will look
different in the Activity Monitor.

Conclusion

We discussed how the browser utilizes processes to improve stability, security, and performance.
We discussed the trade-offs of the multi-process model and how you can observe the processes
created by your browser yourself.

Understanding the browser process model and its motivation is important as it will define the
constraints your web application must operate within as it executes.

Active browser web page


As you said, dynamic is what's being executed on the server and then the result is being sent
back to the client (browser). So for example when using PHP, your browser isn't able to execute
PHP, so the server executes the PHP file and performs all logic in your code. The result will be
an HTML file, which is then sent back to the client. The important thing to understand is that
when the result is served to the client, the information in it won't change.
An active web page is a page where the browser performs the logic instead of the server. So for
example when you've got a page where you're showing share prices, then you want it to update
e.g. every 5 seconds. A solution would be to use AJAX with JavaScript. In contrast to PHP, your
browser is able to execute JavaScript, so it is happening without reloading the page. So with an
active page, everything is happening inside your browser without the need to reload the page
every time you want new information.
An applet is an embedded application, like Flash or Java (not to be confused with JavaScript). To
execute an applet, you most likely need a browser plugin. Because the applet is executed by the
plugin and your browser, it is active and not dynamic (you don't need to request a new applet for
information in it to change). The advantages of using an applet is that the programming language
(like Java) has more possibilities than HTML. A lot of browser games are made with applets, but
nowedays it is used less and less because we can achieve the same with techniques like
JavaScript, HTML5 and WebGL.

What is search engine optimization?

Search engine optimization is the science of improving a website to increase its visibility when
people search for products or services. The more visibility a website has on search engines, the
more likely it is that brand captures business.

Website visibility is commonly measured by the placement -- or ranking -- of the site on search
engine results pages (SERPs). And companies always vie for the first page, where they are most
likely to garner the most attention.

Using Google as an example, SERPs often feature ads at the top of the page. These are positions
that businesses are willing to pay for to ensure placement on that first page. Following ads are
the regular search listings, which marketers and search engines refer to as organic search results.
The SEO process aims to increase a business's organic search results, driving organic search
traffic to the site. This enables data marketers to distinguish between traffic that comes to a
website from other channels -- such as paid search, social media, referrals and direct -- and the
organic search traffic.

Organic search traffic is usually higher-quality traffic because users are actively searching for a
specific topic, product or service for which a site might rank. If a user finds that site through the
search engine, it can lead to better brand engagement.

How does SEO work?

While there is a way to maximize results, it is almost impossible to fully manipulate search
algorithms. Businesses often look to the shortest path toward ideal results with the least amount
of effort, but SEO requires a lot of action and time. There is no SEO strategy where something
can be changed today with the expectation of clear results tomorrow. SEO is a long-term project,
with daily action and constant activity.
Search engines use bots to crawl all website pages, downloading and storing that information
into a collection known as an index. This index is like a library and when someone searches for
something in it, the search engine acts as the librarian. The search engine pulls and displays
relevant information from the search query and shows users content related to what they were
looking for. Search engine algorithms analyze webpages in the index to determine the order
those pages should be displayed on the SERP.

Here is a brief description of how search engine optimization works.

What algorithms evaluate for search engine optimization?

There are hundreds of factors that go into what content from the index gets displayed into a
SERP. However, they bubble up into five key factors that help determine which results are
returned for a search query.

1. Meaning of the query. To return relevant results, the algorithm needs to first establish what
information the user is searching for. This is known as intent. To understand intent, the
algorithm is looking to understand language. Interpreting spelling mistakes, synonyms and
that some words mean different things in different contexts all play into the algorithm
understanding searcher intent. For example, search engines would need to be able to
distinguish between "bass" as a fish and "bass" as an instrument. Intent would be based on
additional search terms, historical search, location search and more to display the correct
information.
2. Relevance of webpages. The algorithm analyzes webpage content to assess whether the sites
contain information relevant to what a user is looking for. This comes after intent is
established. A basic signal for relevance would be if the webpage includes the keywords
used in the search. This includes showing up in the body copy or page headings. But beyond
keyword matching, search engines use aggregated interaction data to determine if the page is
relevant to the search query. This looks at anonymized data from previous searches to match
the page with the query.

3. Quality of the content. Search engines' aim is to prioritize the most reliable sources
available. The intelligence built into the algorithms can identify which pages demonstrate
expertise, authoritativeness and trustworthiness in relation to the intent.

4. Usability of webpages. Web design and accessibility play a big part in search rankings. The
algorithm looks for how the site appears in different browsers, if it's designed for different
device types -- such as desktops, tablets and phones -- and if the page loading times work
well for users with slower internet connections.

5. Context and settings. Search engines and their algorithms use information from past search
history and search settings to help determine which results are most useful to a user at that
moment. Country and location can be used to deliver content relevant to the area from which
someone is searching. For example, someone searching for "football" in New England would
get different results than someone entering for the same query in England.

SEO benefits

Search engine optimization is an essential marketing activity to make a website or business


visible on the web. But it also provides several other benefits to companies.

Builds trust and credibility

Sites that rank high on SERPs are considered to be of the highest quality and most trustworthy.
Results shown on the first page are the most relevant, resulting in more credibility for the
business or website. Having the right content on the site and a good user experience will help the
website rank higher.

Provides a competitive advantage


When good SEO is deployed consistently, those that do it more and better will outrank the
competition. Many businesses feel they cannot afford to not be on the first page of a search
result. But if a team works toward that goal and shows ahead of the competition, they will have a
competitive edge.

Reaches more people

SEO helps attract any user with intent at any time, regardless of phase of the customer
journey that user is in. It relies on keywords and phrases to attract audiences to specific products
and services. Businesses can create a list of keywords for which they would like to rank, then
build content around those keywords.

Supports content marketing

By having a list of keywords to rank for and building content around those keywords, users are
more likely to find the information they seek. Content and SEO work in harmony with each
other. A site will rank better by creating useful, high-quality content that is optimized for those
keywords. Ensuring the keywords are present in headings, meta descriptions and the body of the
content will improve rankings for those terms.

Here are some tips for creating a content marketing SEO strategy.

Ranks better in local searches

The use of local searches are becoming more common, with users looking for products or
services "near me." To improve listings in these searches, a company can create a Google My
Business account and optimize the listing for local searches. Along with that and the localized
content on the website, a user will be more likely to see local search results in their queries.

Understand web environment

Users that stay up to date on the everchanging internet will be better able to execute the ongoing
SEO needs for a website. By staying up to date, businesses can better understand how search
works and make more informed decisions on how to change and adapt their strategies.
Relatively inexpensive

To have an effective SEO strategy, companies need to invest in the time and resources to be
effective. There are companies that can be hired as SEO experts to manage the strategies, but
companies with the right team in place can do it themselves.

Get quantifiable results

There are tools and analytics data that can be tapped into to measure the effectiveness of SEO
efforts. Google Analytics can provide comprehensive data around organic traffic. Data includes
pages that customers engaged with and keywords used in search. That data can then be cross-
referenced with intended actions taken to see how SEO played a role in customer engagement or
acquisition.

SEO techniques

There are three main components -- or pillars -- to SEO that go into building effective SEO
strategies:

1. Technical optimization. This is the process of completing activities when building or


maintaining a website to improve SEO. It often has nothing to do with the content that is on
the page itself. Some ways to manipulate technical optimization include having an XML
sitemap, structuring content in a way that is intuitive to user experience and improving site
performance -- such as page load times, correct image sizing and hosting environment.

2. On-page optimization. This is the process for ensuring the content on a website is relevant
to the users. This content includes the right keywords or phrases in the headings and body of
the copy; and ensuring that each page includes meta descriptions, internal links within the
site and external links to other reputable sites, and a good URL with the focus keyword.
Website administrators use content management systems (CMS) to maintain on-page
content.

3. Off-page optimization. This technique is deployed to enhance a site's rankings through


activities outside of the website. This type of activity is driven largely by backlinks.
Businesses can generate these from partnerships, social media marketing and guest blogging
on other sites.

These three components help marketers focus on the activities and techniques to build strong
rankings for their websites.

Here are some additional techniques to use within each of the three pillars:

 Keyword research and selection. Perform keyword research on the terms for which are
most desirable to rank. Businesses should focus on keywords that receive high search volume
to be relevant for search engines. Looking at competitors' top performing keywords also
gives an opportunity to build a strategy to compete with them.

 Create quality content. When the keyword strategy is in place, the content strategy follows.
Pages are more likely to appear higher on SERPs by creating quality content that is relevant
to the readers and their search queries.

 Develop unique page titles and meta descriptions. Page titles should include the page's
focus keyword. And meta descriptions should be brief summaries of what a user should
expect to learn on the page. These elements are displayed in SERPs and will likely be what
people use to inform their clicks.

 Use pay per click to supplement organic traffic. Paid advertising can help improve organic
click-through rates by giving marketers an outlet to test title tags and meta descriptions that
are shown in SERPs. Ensuring a first-page placement, these ads mimic organic search results
to see what copy entices users to click. That can be used to adjust page titles and meta
descriptions with organic results.

 Use alt text with images. Alt text is used to describe an image on a webpage. This is critical
for bots crawling the site to understand what the image represents. It also verbally describes
what the image is to people who are visually impaired. This is also another opportunity to
input keywords.
 URL slug. A URL slug is the portion of the URL that is unique to a specific page. This is
also an area where it is important to put the focus keyword as it relates to what is on the
page.

SEO tools

There are hundreds of tools to improve, manage and report on the effectiveness of SEO. Some
are free and some aren't. But they all help marketers research keywords, develop strategies and
measure the results of ranking higher on SERPs. Here are some common SEO tools used by
marketers today:

 Semrush. This platform is used for keyword research and online ranking data. It gives
marketers insight into developing and maintaining keyword strategies. Semrush also can be
used to measure SEO performance over time.

 Google Analytics and Search Console. This platform provides real-time data on the
effectiveness of SEO. Combined with Google's Search Console, marketers can monitor
website traffic, optimize rankings and make informed decisions about the appearance of a
site's search results.

 Yoast SEO. For websites using WordPress as their CMS, Yoast SEO is a plugin used to
improve on-page optimization. Users can define the URL slug, meta description and page
title. They can also see how the content on their page may perform in searches. A checklist
of items is available so users can ensure their page is as optimized as possible.

 Ahrefs. This tool is used to audit websites and provide keyword, link and ranking profiles. It
can also identify which pages perform the best and which ones need improvement.

 SpyFu. This is a competitor keyword research tool for Google Ads. In addition to the
keyword research and data it can produce, it gives detailed insight into competitor SEO and
pay per click data.

 HubSpot Website Grader. This is a free tool that delivers report cards with actionable
insights about SEO performance. It can show if a website is optimized for mobile, measures
website performance and gives security recommendations.
 Google Trends. This tool looks for content trends in countries or regions of the world. It
finds popular topics and long-tail keywords related to them. It also compares those trends
over time.

 Bing Webmaster. This tool enables marketers to see backlink profiles and keyword
research. It also has a built-in site scanning feature.

 Consultants. While not exactly a tool to purchase or use for free, consultants have the SEO
expertise that some teams lack internally. Good consultants can help develop the right
strategies, execute or recommend the long-term plan. They can also report on the metrics to
determine success.

What is XQuery

XQuery is a functional query language used to retrieve information stored in XML format. It is
same as for XML what SQL is for databases. It was designed to query XML data.

XQuery is built on XPath expressions. It is a W3C recommendation which is supported by all


major databases.

The as it is definition of XQuery given by its official documentation is as follows:

"XQuery is a standardized language for combining documents, databases, Web pages and almost
anything else. It is very widely implemented. It is powerful and easy to learn. XQuery is replacing
proprietary middleware languages and Web Application development languages. XQuery is
replacing complex Java or C++ programs with a few lines of code. XQuery is simpler to work with
and easier to maintain than many other alternatives."
What does it do

XQuery is a functional language which is responsible for finding and extracting elements and
attributes from XML documents.

It can be used for following things:

o To extract information to use in a web service.


o To generates summary reports.
o To transform XML data to XHTML.
o Search Web documents for relevant information.

History

XQuery was designed by W3C and first appeared in 2007. It became the W3C recommendation
on January 23, 2007. XQuery 3.0 is a W3C recommendation from April 8, 2014.

XQuery Features

There are many features of XQuery query language. A list of top features are given below:

o XQuery is a functional language. It is used to retrieve and query XML based data.
o XQuery is expression-oriented programming language with a simple type system.
o XQuery is analogous to SQL. For example: As SQL is query language for databases, same
as XQuery is query language for XML.
o XQuery is XPath based and uses XPath expressions to navigate through XML documents.
o XQuery is a W3C standard and universally supported by all major databases.

Advantages of XQuery

o XQuery can be used to retrieve both hierarchal and tabular data.


o XQuery can also be used to query tree and graphical structures.
o XQUery can used to build web pages.
o XQuery can be used to query web pages.
o XQuery is best for XML-based databases and object-based databases. Object databases are
much more flexible and powerful than purely tabular databases.
o XQuery can be used to transform XML documents into XHTML documents.

XQuery vs XPath

Index XQuery XPath

1) XQuery is a functional programming and query XPath is a xml path language


language that is used to query a group of XML that is used to select nodes
data. from an xml document using
queries.

2) XQuery is used to extract and manipulate data XPath is used to compute


from either xml documents or relational values like strings, numbers
databases and ms office documents that support and boolean types from
an xml data source. another xml documents.

3) xquery is represented in the form of a tree model xpath is represented as tree


with seven nodes, namely processing structure, navigate it by
instructions, elements, document nodes, selecting different nodes.
attributes, namespaces, text nodes, and
comments.

4) xquery supports xpath and extended relational xpath is still a component of


models. query language.

5) xquery language helps to create syntax for new xpath was created to define a
xml documents. common syntax and behavior
model for xpointer and xslt.

XQuery Environment Setup

Let's see how to create a local development environment. Here we are using the jar file of Saxon
XQuery processor. The Java-based Saxon XQuery processor is used to test the ".xqy" file, a file
containing XQuery expression against our sample XML document.
You need to load Saxon XQuery processor jar files to run the java application.

For eclipse project, add build-path to these jar files. Or, if you are running java using command
prompt, you need to set classpath to these jar files or put these jar files inside JRE/lib/ext directory.

XQuery First Example

Here, the XML document is named as courses.xml and xqy file is named as courses.xqy

courses.xml

1. <?xml version="1.0" encoding="UTF-8"?>


2. <courses>
3. <course category="JAVA">
4. <title lang="en">Learn Java in 3 Months.</title>
5. <trainer>Sonoo Jaiswal</trainer>
6. <year>2008</year>
7. <fees>10000.00</fees>
8. </course>
9. <course category="Dot Net">
10. <title lang="en">Learn Dot Net in 3 Months.</title>
11. <trainer>Vicky Kaushal</trainer>
12. <year>2008</year>
13. <fees>10000.00</fees>
14. </course>
15. <course category="C">
16. <title lang="en">Learn C in 2 Months.</title>
17. <trainer>Ramesh Kumar</trainer>
18. <year>2014</year>
19. <fees>3000.00</fees>
20. </course>
21. <course category="XML">
22. <title lang="en">Learn XML in 2 Months.</title>
23. <trainer>Ajeet Kumar</trainer>
24. <year>2015</year>
25. <fees>4000.00</fees>
26. </course>
27. </courses>

courses.xqy

1. for $x in doc("courses.xml")/courses/course
2. where $x/fees>5000
3. return $x/title

This example will display the title elements of the courses whose fees are greater than 5000.

Semantic Web

The Semantic Web is a vision for linking data across webpages, applications and files. Some
people consider it part of the natural evolution of the web, in which Web 1.0 was about linked
webpages, Web 2.0 was about linked apps and Web 3.0 is about linked data. It was actually part
of computer scientist Tim Berners-Lee's original plan for the World Wide Web but was not
practical to implement at scale at the time.

The grand vision is that all data will someday be connected in a single Semantic Web. In
practice, today's semantic webs are fractured across specialized uses, including search engine
optimization (SEO), business knowledge management and controlled data sharing.

In SEO, all major search engines now support Semantic Web capabilities for connecting
information using specialized schemas about common categories of entities, such as products,
books, movies, recipes and businesses that a person might query. These schemas help generate
the summaries that appear in Google search results.

In the case of business knowledge management, companies can use various tools to curate
a semantic network (knowledge graph), a graphical representation of entities and their
relationships, from information scraped from corporate documents, business services and the
public web. This can improve planning, analysis and collaboration in the organization.
Controlled data sharing is more aspirational and experimental. The core idea is that individuals
and businesses could create a secure data repository about themselves and their interests and then
share links to this data with trusted parties, such as businesses, doctors or government agencies.

Elements of the Semantic Web framework

Berners-Lee proposed an illustration or model called the Semantic Web Stack to help visualize
the different kinds of tools and operations that must come together to enable the Semantic Web.
The stack can help developers explore ways to go from simply linking to other webpages to
linking data and information across webpages, documents, applications and data sources.

World Wide Web creator Tim Berners-Lee offered this 'layer cake' model for the tools and
operations needed to enable the Semantic Web.

The following is a breakdown:

 At the bottom of the stack, raw data can be expressed using Unicode text characters. Uniform
Resource Identifiers (URIs) can provide links to data within a given page.

 Next up, the Extensible Markup Language (XML) is often used to structure information in
pages in a machine-readable format.
 Above that, the Resource Description Framework (RDF) provides a standard way for
describing entities, properties and the relationships between them for data exchange.

 The Web Ontology Language (OWL) formalizes a way to represent knowledge about and
between entities. It works with the W3C's Rule Interchange Format (RIF) to describe things
that are harder to formalize.

 The SPARQL query language can search data stored across different sources and work with
OWL and RDF to find information.

 Other technologies also need to work with these core semantic processing services to secure
data, create an audit trail to enforce trust and provide a user experience.

Potential Semantic Web uses

There are several actual and potential applications of the Semantic Web, including the following:

SEO is the most common use today. A website owner or content creator adds linked data tags
according to standard search engine schemas, which makes it easier for search engines to
automatically extract data about, for example, store hours, product types, addresses and third-
party reviews. The Rotten Tomatoes website enhanced click-through by 25% when it added
structured data.

Auto summarization. Websites and third-party apps can use tagged data to automatically pull
specific types of information from various sites into summary cards. For example, movie theaters
can list showtimes, movie reviews, theater locations and discount pricing that shows up in
searches.

Sharing product details across the supply chain using GS1 Web Vocabulary. This allows
manufacturers and wholesalers to automatically transmit information about foods, beverages and
other consumer products in a computer-accessible manner. It makes it easier for websites to list
nutrition labels, sizes, allergy information, awards, expiration dates and availability dates with
grocery stores and online shops that may sell a product.
Standardizing skill taxonomies. Learning platforms, job websites and HR teams may all use
different terms to describe job skills. Increasingly, enterprises use Semantic Web technologies to
translate different ways of describing skills into a standard taxonomy. This can help teams
broaden their applicant search and improve the training programs they develop for employees.

Provide controlled data access. Consumers often fill out dozens of forms containing the same
information, such as name, address, Social Security number and preferences with dozens of
different companies. If these organizations are breached, the data is lost to hackers. To address
these problems, Berners-Lee's company, Inrupt, is working with various communities, hospitals
and governments to roll out secured data pods built on the Solid open source protocol that allows
consumers to share access to their data.

Digital twin data sharing. Several vendors, including Bentley and Siemens, are developing
connected semantic webs for industry and infrastructure that they call the industrial metaverse.
These next-generation digital twin platforms combine industry-specific ontologies, controlled
access and data connectivity to let users view and edit the same data about buildings, roads and
factories from various applications and perspectives.
Early developers of the World Wide Web intended to employ semantic web concepts, but their
use has been piecemeal so far.
How is the Semantic Web related to Web 3.0?

The Semantic Web is often called Web 3.0. Berners-Lee started describing something like the
Semantic Web in the earliest days of his work on the World Wide Web starting in 1989. At the
time, he was developing sophisticated applications for creating, editing and viewing connected
data. But these all required expensive NeXT workstations, and the software was not ready for
mass consumption.

The popularity of the Mosaic browser helped build a critical mass of enthusiasm and support for
web formats. The later development of programmable content in JavaScript, which soon became
the standard for browser-based programming, opened opportunities for content creation and
interactive apps.

Then Tim O'Reilly, founder and CEO of O'Reilly Media, popularized the term Web 2.0 with a
conference of the same name. However, Web 2.0 still did not formalize a way to describe the
data on a page, the defining capability of the Semantic Web. Meanwhile, Berners-Lee continued
his quest to connect data through his work at the World Wide Web Consortium.

The convention of referring to the Semantic Web as Web 3.0 later began to take hold among
influential observers. In 2006, journalist John Markoff wrote in The New York Times that a Web
3.0 built on a semantic web represented the future of the internet. In 2007, futurist and inventor
Nova Spivak suggested that Web 2.0 was about collective intelligence, while the new Web 3.0
would be about connective intelligence. Spivak predicted that Web 3.0 would start with a data
web and evolve into a full-blown Semantic Web over the next decade.

Gavin Wood coined the term Web3 in 2014 to describe a decentralized online ecosystem based
on blockchain. Inrupt, which has continued some of Berners-Lee's pioneering work, argues that
the Semantic Web is about building Web 3.0, which is distinct from the term Web3. The main
point of contention is that Web3's focus on blockchain adds considerable overhead. In contrast,
Inrupt's approach focuses on secure centralized storage that is controlled by data owners to
enforce identity and access control, simplify application interoperability and ensure data
governance. Proponents claim that these mechanisms add the missing ingredients required for
the Semantic Web to evolve from a platform for better searches to a more connected web of
trusted data.
Semantic Web limitations and criticisms

The first generation of Semantic Web tools required deep expertise in ontologies and knowledge
representation. As a result, the primary use has been adding better metadata to websites to
describe the things on a page. It requires the extra step of filling in the metadata when adding or
changing a page. Content management systems are getting better at it.

However, this only really simplifies the challenges for SEO. Building more sophisticated
Semantic Web applications for combining data from multiple sites is still a difficult problem
made more complex by using different schemas to describe data and creative differences in how
individuals describe the world.

Semantic analysis for identifying a sentence's subject, predicate and object is great for learning
English, but it is not always consistent when analyzing sentences written by different people,
which can vary enormously. Things can get more convoluted when it comes to popular
buzzwords that can mean different and sometimes contradictory things. For example, while
scientists all seem to agree a quantum leap is the smallest change in energy an atom can make,
marketers all seem to think it is pretty big.

The other major challenge is building trust in the data represented in a semantic web. It is
becoming increasingly important to know not only what is written on a page but who said it and
what their biases might be. A recommendation from a highly respected site like Consumer
Reports will likely have a different weight than one from SpamBob432 on Amazon. Efforts to
provide an audit trail for the Semantic Web could help not only connect the data but also help
understand data quality and the level of trustworthiness as well.

The future of the Semantic Web

An increasing number of websites automatically add semantic data to their pages to boost search
engine results. But there is still a long way to go before data about things is fully linked across
webpages. Translating the meaning of data across different applications is a complex problem to
solve.
Innovations in AI and natural language processing might help bridge some of these gaps,
particularly in specific domains like skill taxonomies, contract intelligence or building digital
twins. Increasingly, the future may involve a hybrid approach combining better governance of
the schemas an organization or industry uses to describe data and AI and statistical techniques to
fill in the gaps. Getting closer to the original vision of a web of connected data will require a
combination of better structure, better tools and a chain of trust.

You might also like