KKB_Web Application Development and Software Frameworks-Chapter-I
KKB_Web Application Development and Software Frameworks-Chapter-I
Frameworks (CSEN3071)
PRE-REQUISITES: None.
Course Outcomes:
After successful completion of the course the student will be able to:
1.Understand the fundamentals of web application development
and frameworks.
2.Design interactive web pages with client and server side
scripting.
3.Apply validations on user input using Java script.
4.Compare and analyze XML and JSON documents.
5.Create and deploy Web Applications over web server.
UNIT-I:
Introduction to Web Application Designing
Chapter-I
Introduction:
Building a Web Application
Components – Client Side and Server-side
2 tier
n-tier architectures
Networks
Protocols
MVC Pattern
Reference:
• Programming the World Wide Web, 7th Edition, Robert W
Sebesta, Pearson, 2013.
• Dietel and Nieto, Internet and World Wide Web - How to
program, PHI/Pearson Education, 2006.
[email protected] 4
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 5
Cont..
Uniform Resource Locators
URL Formats
URL Paths
Multipurpose Internet Mail Extensions
Type Specifications
Experimental Document Types
The Hypertext Transfer Protocol
The Request Phase
The Response Phase
Security
[email protected] 6
Cont..
The Web Programmer’s Toolbox
Overview of HTML
Tools for Creating HTML Documents
Plug-ins and Filters
Overview of XML
Overview of JavaScript
Overview of Flash
Overview of PHP
Overview of Ajax
Overview of Servlets, JavaServer Pages, and JavaServer Faces
Overview of Active Server Pages .NET
Overview of Ruby
Overview of Rails
[email protected] 7
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 8
In the 1960s, the U.S. Department of Defense (DoD) became
interested in developing a new large-scale computer network.
Purposes:
• Communications
• Program sharing and
• Remote Computer Access for researchers working on
defense-related contracts.
Fundamental Requirement:
Network be sufficiently robust so that even if some network
nodes were lost to sabotage, war, or some more benign cause,
the network would continue to function.
[email protected] 9
Cont..
[email protected] 11
Cont..
A new national network, NSFnet, was created in 1986 ->
sponsored by the National Science Foundation (NSF).
NSFnet initially connected the NSF-funded supercomputer
centers that were at five universities. Soon after -> available to
other academic institutions and research laboratories.
By 1990, NSFnet had replaced ARPAnet for most nonmilitary uses.
A wide variety of organizations had established nodes on the new
network— by 1992.
NSFnet connected more than 1 million computers around the world.
In 1995, a small part of NSFnet returned to being a research
network.
The rest became known as the Internet, although this term was
used much earlier for both ARPAnet and NSFnet.
[email protected] 12
Cont..
[email protected] 13
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 14
The Internet is a huge collection of computers connected
in a communications network. These computers are of
every imaginable size, configuration, and manufacturer.
some of the devices connected to the Internet—such as
plotters and printers—are not computers at all.
The innovation that allows all of these diverse devices to
communicate with each other is a single, low-level protocol
named Transmission Control Protocol/Internet Protocol
(TCP/IP).
Internet is actually a network of networks, rather than a
network of computers.
Example. Local network -> local network is physically connected
to the Internet.
[email protected] 15
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 16
• For people, Internet nodes are identified by names; for
computers, they are identified by numeric addresses.
Example: Variable name in a program versus address in memory
[email protected] 17
Cont..
For example:
• A small organization may be assigned 256 IP addresses,
such as 191.57.126.0 to 191.57.126.255.
• Very large organizations, such as the Department of
Defense, may be assigned 16 million IP addresses, which
include IP addresses with one particular first 8-bit number,
such as 12.0.0.0 to 12.255.255.255.
[email protected] 18
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 19
[email protected] 20
Cont..
[email protected] 21
Cont..
[email protected] 22
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 23
• In 1989, a small group of people led by Tim Berners-Lee at
CERN (European Organization for Nuclear Research) proposed
a new protocol for the Internet - World Wide Web:
To allow scientists around the world to use the Internet to
exchange documents describing their work.
To search for and retrieve documents from databases on
any number of different document-serving computers
connected to the Internet.
• By late 1990, the basic ideas for the new system had been
fully developed and implemented on a NeXT computer at
CERN.
• In 1991, the system was ported to other computer platforms
and released to the rest of the world.
[email protected] 24
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 25
Web pages are text files containing HTML
HTML – Hyper Text Markup Language
◦ A notation for describing
document structure (semantic markup)
formatting (presentation markup)
26 [email protected]
Cont..
• HTML – HyperText Markup Language – The Language of Web
Pages on the World Wide Web.
• HTML is a text formatting language.
• URL – Uniform Resource Locator.
• Browser – A software program which is used to show web
pages.
Hypertext Markup Language
• Hypertext:
• Allows for non-linear linking to other documents
• Markup Language:
• Content to be displayed is “marked up” or tagged to tell
the browser how to display it.
• In 1980’s, HyperCard information management system from
Apple.
Cont..
HTTP
HTTP
Server response
28 [email protected]
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 29
They are called browsers because they allow the user to
browse the resources available on servers.
[email protected] 30
Cont..
• Although the Web supports a variety of protocols, the most
common one is the Hypertext Transfer Protocol (HTTP).
• HTTP provides a standard form of communication between
browsers and Web servers.
[email protected] 31
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 32
Web servers are programs that provide documents to
requesting browsers.
Servers are slave programs: They act only when requests
are made to them by browsers running on other computers
on the Internet.
Courtesy: IntelliPaat
[email protected] 33
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 34
• Web browsers initiate network communications with servers
by sending them URLs.
[email protected] 35
Cont..
• All the communications between a Web client and a Web
server use the standard Web protocol, Hypertext Transfer
Protocol (HTTP),
[email protected] 36
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 37
The file structure of a Web server has two separate
directories.
1. The root of one of these is called the document root.
• The file hierarchy that grows from the document root stores
the Web documents to which the server has direct
access and normally serves to clients.
[email protected] 38
Cont..
[email protected] 40
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 41
• Apache began as the NCSA server, httpd, with some added
features.
• Apache is the most widely used Web server. The primary
reasons are as follows:
Fast and Reliable
Open-source software
Best available servers for Unix-based systems
Note:
For historical reasons, there are three configuration files in an Apache
server: httpd.conf, srm.conf, and access.conf.
1.Only one of these, httpd.conf, actually stores the directives that control
an Apache server’s behavior.
2.The other two point to httpd.conf, which is the file that contains the list
of directives that specify the server’s operation.
[email protected] 42
@ Glance:
A Brief Introduction to the Internet
Origins
What Is the Internet?
Internet Protocol Addresses
Domain Names
The World Wide Web
Origins
Web or Internet?
Web Browsers
Web Servers
Web Server Operation
General Server Characteristics
Apache
IIS [email protected] 43
• The Microsoft IIS server is supplied as part of Windows—and
because it is a reasonably good server—most Windows based
Web servers use IIS.
• Apache and IIS provide similar varieties of services.
• From the point of view of the site manager: difference
between Apache and IIS is that:
• Apache is controlled by a configuration file that is edited
by the manager to change Apache’s behavior.
• With IIS, server behavior is modified by changes made
through a window-based management program, named the
IIS snap-in, which controls both IIS and ftp. This program
allows the site manager to set parameters for the server.
[email protected] 44
Cont..
@ Glance:
[email protected] 45
• Uniform (or universal) resource locators (URLs) are used to
identify documents (resources) on the Internet.
• There are many different kinds of resources, identified by
different forms of URLs.
URL Formats
•All URLs have the same general format:
scheme:object-address
•The scheme is often a communications protocol. Common
schemes include:
http, ftp, gopher, telnet, file, mailto, and news.
•Different schemes use object addresses that have different
forms.
[email protected] 46
Cont..
[email protected] 47
Cont..
@ Glance:
[email protected] 48
• The path to the document for the HTTP protocol is similar to
a path to a file or directory in the file system of an operating
system and is given by a sequence of directory names and a
file name, all separated by whatever separator character
the operating system uses.
[email protected] 49
Cont..
@ Glance:
[email protected] 50
• Without knowing the form of the document receives from a
Web server, the browser would not be able to render it.
Type Specifications
• MIME was developed to specify the format of different kinds
of documents to be sent via Internet mail.
• These documents could contain various kinds of text, video
data, or sound data.
[email protected] 51
Cont..
[email protected] 52
Cont..
@ Glance:
[email protected] 53
• The name of an experimental subtype begins with x-, as in
video/x-msvideo.
• For example:
A Web provider might have a handcrafted database whose
contents he or she wants to make available to others through the
Web.
Of course, this raises the issue of how the browser can display the
database.
As might be expected, the Web provider must supply a program
that the browser can call when it needs to display the contents of
the database. These programs either are external to the browser,
in which case they are called helper applications, or are
Code modules that are inserted into the browser, in which case
they are called plug-ins.
[email protected] 54
Cont..
@ Glance:
[email protected] 55
• All Web communications transactions use the same protocol:
the Hypertext Transfer Protocol (HTTP).
• RFC 2616 is available at the Web site for the World Wide Web
Consortium (W3C), http://www.w3.org.
[email protected] 56
Cont..
[email protected] 57
Cont..
@ Glance:
[email protected] 58
Cont..
[email protected] 59
Cont..
[email protected] 60
Cont..
There are four categories of header fields:
1.General: For general information, such as the date
2.Request: Included in request headers
3.Response: For response headers
4.Entity: Used in both request and response headers
[email protected] 62
The general form of an HTTP response is as follows:
1. Status line
2. Response header fields
3. Blank line
4. Response body
[email protected] 63
Cont..
[email protected] 64
Cont..
@ Glance:
[email protected] 65
Consider a simple case of transmitting a credit card number to a
company from which a purchase is being made. The security
issues for this transaction are as follows:
1. Privacy—it must not be possible for the credit card number to
be stolen on its way to the company’s server.
2. Integrity—it must not be possible for the credit card number to
be modified on its way to the company’s server.
3. Authentication—it must be possible for both the purchaser
and the seller to be certain of each other’s identity.
4. Nonrepudiation—it must be possible to prove legally that the
message was actually sent and received.
Note:
•The basic tool to support privacy and integrity is encryption.
[email protected] 66
Cont..
@ Glance:
The Web Programmer’s Toolbox
(Students has to tell minimum 3-4 sentences on the following)
Overview of HTML
Tools for Creating HTML Documents
Plug-ins and Filters
Overview of XML
Overview of JavaScript
Overview of Flash
Overview of PHP
Overview of Ajax
Overview of Servlets, JavaServer Pages, and JavaServer Faces
Overview of Active Server Pages .NET
Overview of Ruby
Overview of Rails [email protected] 67
UNIT-I:
Introduction to Web Application Designing
Chapter-I
Introduction:
Building a Web Application
Components – Client Side and Server-side
2 tier
n-tier architectures
Networks
Protocols
MVC Pattern
Reference:
• Programming the World Wide Web, 7th Edition, Robert W
Sebesta, Pearson, 2013.
• Dietel and Nieto, Internet and World Wide Web - How to
program, PHI/Pearson Education, 2006.
Some common terms to remember
1. Distributed Network: It is a network architecture, where
the components located at network computers coordinate and
communicate their actions only by passing messages.
•It is a collection of multiple systems situated at different nodes
but appears to the user as a single system.
It provides a single data communication network which can be
managed separately by different networks.
[email protected] 69
Cont..
[email protected] 70
Cont..
[email protected] 71
Cont..
3. Platform: In computer science or software industry, a platform
is a system on which applications program can run.
It consists of a combination of hardware and software that have a
built-in instruction for a processors/microprocessors to perform
specific operations.
An example of Platform – A personal machine loaded with
Windows 2000 or Mac OS X as examples of 2 different
platforms.
[email protected] 72
• An N-Tier Application program is one that is distributed
among three or more separate computers in a distributed
network.
The most common form of n-tier is the 3-tier Application, and it is
classified into three categories.
Courtesy: https://en.wikipedia.org/wiki/Multitier_architecture 75
Cont..
2-Tier Architecture
•It is like Client-Server architecture, where communication takes
place between client and server.
•In this type of software architecture, the presentation layer or
user interface layer runs on the client side while dataset layer
gets executed and stored on server side.
•There is no Business logic layer or immediate layer in between
client and server.
[email protected] 76
Single Tier or 1-Tier Architecture Cont..
[email protected] 77
UNIT-I:
Introduction to Web Application Designing
Chapter-I
Introduction:
Building a Web Application
Components – Client Side and Server-side
2 tier
n-tier architectures
Networks
Protocols
MVC Pattern
Reference:
• Programming the World Wide Web, 7th Edition, Robert W
Sebesta, Pearson, 2013.
• Dietel and Nieto, Internet and World Wide Web - How to
program, PHI/Pearson Education, 2006.
A collection of computing devices connected in order to
communicate and share resources.
Connections between computing devices can be physical
using wires or cables or wireless using radio waves or infrared
signals.
79
Cont..
Node (host)
The speed with which data is moved from one place to another on a network.
Protocol
A set of rules that defines how data is formatted and processed on a network; i.e., rules that
allow client/server interaction.
8
Cont..
Network Topology
how is hardware (physically) connected?
Addressing
how is a message’s destinations identified?
Message Delivery
should all data be sent in the same fashion?
Routing
what path through the network is taken?
Security
how can strangers pass (private) messages?
81
Cont..
8
Cont..
◦ Ring topology
connects all nodes in a closed loop on which messages travel in
one direction.
◦ Star topology
centers around one node to which all others are connected and
through which all messages are sent.
◦ Bus topology
nodes are connected to a single communication line that carries
messages in both directions.
83
Cont..
85
Cont..
Local-area network (LAN)
The communication infrastructures that have been developed in and around large cities
Gateway
One particular set up to handle all communication going between that LAN and other
networks
86
UNIT-I:
Introduction to Web Application Designing
Chapter-I
Introduction:
Building a Web Application
Components – Client Side and Server-side
2 tier
n-tier architectures
Networks
Protocols
MVC Pattern
Reference:
• Programming the World Wide Web, 7th Edition, Robert W
Sebesta, Pearson, 2013.
• Dietel and Nieto, Internet and World Wide Web - How to
program, PHI/Pearson Education, 2006.
In networking, a protocol is a standardized set of rules for formatting and processing
data
Network protocols are layered such that each one relies on the protocols that underlie it
Sometimes referred to as a protocol stack
88
Cont..
89
Cont..
90
Cont..
91
Cont..
◦ Email messages?
◦ Streaming Audio?
92
Cont..
Ping
A program used to test whether a particular network computer is
active and reachable.
Traceroute
A program that shows the route a packet takes across the Internet.
93
Cont..
94
Cont..
High-Level Protocols
Port
A numeric designation that
corresponds to
a particular high-level protocol
[email protected] 97
Cont..
• The model is not only the data, but any enforced constraints
on the data.
For example, if a part of the data is the age of people, the
model might ensure that no age value outside the usual range
of human ages can be entered into the data storage.
[email protected] 98
Cont..
[email protected] 99
Cont..
[email protected] 10
0
[email protected] 10
1
• Web applications using Java server software can be designed
and implemented with the MVC architecture.
• There are three general approaches to designing Web
applications with the MVC architecture and Java server
software.
• The first of these is the pure JSP approach.
• The second approach to MVC with Java server software is to
use a combination of servlets, JSP, and beans.
• The third approach to MVC with Java server software is to use
servlets to implement the controller, JSP to implement the
view, and Enterprise JavaBeans (EJBs) for the model.
[email protected] 10
2
UNIT-I:
Introduction to Web Application Designing
Chapter-II: HTML-5 and CSS-3:
HTML5:
Basic syntax
HTML document structure
Text formatting
Images, lists, links, tables, forms and frames.
Cascading Style Sheets (CSS3):
Levels of style sheets
Style specification formats
Selector forms
Font properties, list properties, color properties, alignment of
text, background images
The Box Model.