Web Application Development
Web Application Development
Web Application Development
Ms Swapnil Shrivastava
CDAC Bangalore
Content
Web Application: An Overview
Web Application Architecture : The Building
Blocks
Scripting Languages
Client Side Scripting
Server Side Scripting
Web Application
A web application or web app is any software
that is rendered in a web browser.
It is created in a browser-supported
programming language (such as the
combination of JavaScript, HTML and CSS).
Common web applications include webmail,
online retail sales, online auctions, wikis and
many other functions.
3
Word
Spreadsheet Wikis Databases
Processing Webmail
Games Social MediaGraphicsOnline Retail
Communication
System Software
Assembler
Debugger
Compiler
Utilities
File System
Drivers
Operating System
Hardware Infrastructure
4
What is an Application?
Presentation Logic
Business Logic
Data Logic
Monolithic
User Interface Layer
Business Rules
File/Database Access
Client-Server Application
Presentation Logic
Business Logic
Client
Business Logic
Data Logic
2-tier
Client
Server
FTP Server
Web Server
Database Server
FTP Client
Web Browser
Mobile
Desktop Application
Client
Client
Technology Breakthrough
Low-cost, high speed bandwidth on wide area
network.
Network enabled desktop operating system.
Component-oriented distributed
infrastructure.
Global Client/Server
1000 Clients
1000 Connections
1000 Processes
500 MB of RAM
10, 000 open Files
OS Dies
Scalability
No of clients
No of servers
Geography
Server-Server
interaction
Transaction
updates
Client Front
End
C/S Arch.
Local C/S
< 100
1
homogeneous
Campus
No
Very infrequent
PB/VB
2-tier
Global C/S
Millions
100 +
heterogeneous
Global
Yes
Pervasive
Web Browser
3-tier
Business Logic
Web Browser
Data Logic
3-tier
Web Browser
Database
Web Browser
Web Server
HTML
file
12
Evolution
1987 - Perl
Early 1990s static Web documents
1995 Javascript
1996 Macromedia Flash
1999 Servlet Specification, XML
2005 Ajax
2011 HTML5
13
What is HTML?
HTML = HyperText Markup Language
A set of markup tags for creation of web pages
viewable in a browser.
These html tags describes different document
content.
<html> and </html> describes an HTML document
<p> and </p> describes a paragraph
15
HTML Example
hello.html
<!DOCTYPE html>
<html>
<head>
<title>This is My Page Title</title>
</head>
<body>
<h1>This is My Heading</h1>
<p>This is My Paragraph.</p>
</body>
</html>
16
CSS
CSS=Cascading Style Sheets
CSS is a way to style HTML.
Tag Property
p { color:
Value
red;}
18
20
Query
Web Browser
UI
http response
(html, css, Client Side Script))
Database
Data
Script
Interpreter
21
HTML+CSS+JavaScript Example
<button type="button"
onclick="document.getElementById('demo').innerHTML = Date()">
Click me to display Date and Time.</button>
<p id="demo"></p>
22
Web Browser
Http Request
Query
Database
HTML, Images,
CSS, Javscript
Data
23
Ajax
AJAX = Asynchronous JavaScript and XML.
A technique for creating better, faster, and more
interactive web applications.
AJAX is a browser technology independent of web
server software.
AJAX is a new way to use existing standards viz.
JavaScript ,XML, HTML and CSS.
It is about updating parts of a web page, without
reloading the whole page.
24
Http
Request
Javscript,
Call
Web Browser
User
Interface
Query
Ajax
Engine
HTML,CSS
Database
Data
Data
25
26
Web Browser
UI
Query
Script
Interpreter
http response
(html page)
Database
Data
27
PHP Example
hello.php
<!DOCTYPE html>
<html>
<body>
<?php
echo "My first PHP script!";
?>
</body>
</html>
28
XML
XML = Extensible Markup Language.
It was designed to describe data.
XML tags are not predefined. You must define
your own tags.
XML uses a Document Type Definition (DTD)
or an XML Schema to describe the data.
XML is a W3C Recommendation.
29
JSON
JSON is a lightweight, text-based, languageindependent data interchange format.
It is built on two structures:
A collection of name/value pairs.
An ordered list of values.
30
XML vs HTML
XML is about describing
information
<?xml version="1.0"
encoding="ISO-8859-1" ?>
<note>
<to>Tove</to>
<from>Jani</from>
<header>Reminder</header>
<body>Don't forget me this
weekend!</body>
</note>
<html>
<head>
Data exchange
describe content
31
XML vs JSON
Extended Markup
Language
Heavyweight
JavaScript Object
Notation
Lightweight
<employee>
<name> Ameeta Sharma </name>
<salary> 50000 </salary>
<age> 32 </age>
</employee>
{
name : "Ameeta Sharma",
salary : 50000,
age : 32
}
32
Web Service
interoperable machine-to-machine interaction over a
network.
REST, SOAP protocol
Benefits
35
HTTP
It is an application-level protocol for
distributed, collaborative, hypermedia
information systems.
Foundation for data communication for the
World Wide Web (i.e. internet) since 1990.
Basic features
Connectionless
Media independent
Stateless
36
sp
url
sp
sp
version
Cr
value
cr
lf
value
cr
lf
lf
Header Line
sp
lf
Blank Line
Entity body
37
www.tutorialspoint.com
38
sp
status code
sp
sp
phrase
cr
value
cr
lf
value
cr
lf
lf
Header Line
sp
lf
Blank Line
Entity body
39
40
Request Methods
Method
Description
GET
HEAD
PUT
POST
DELETE
TRACE
CONNECT
OPTIONS
41
Status Code
Status Code
Allocated Meaning
1xx
Informational
2xx
Successful
3xx
Redirection
4xx
Bad Request
5xx
42
Header Fields
General-header: These header fields have general
applicability for both request and response
messages.
Client Request-header: These header fields are
applicability only for request messages.
Server Response-header: These header fields are
applicability only for response messages.
Entity-header: These header fields define meta
information about the entity-body or, if no body
is present.
43
org server
edu server
ucl.edu server
gov server
com server
virginia.edu server
46
Web Server
HTTP Request
Web Servers
Apache HTTP Server
Most popular open source web server.
Available for a range of operating system.
DNS
IP address
http request
Web Browser
UI
Query
Plugins
http response
Database
Data
Script
Interpreter
51
Summary
Most Web pages are a combination of those
technologies
Raw content, placed inside
HTML tags, formatted with
CSS rules, interactivity produced by
JavaScript scripts on Clients sides and
PHP scripts on server sides
Newer technologies like DHTML, XHTML, and AJAX
are based on combination of these.
52
53