UNIT 5
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.
Web applications are stored on a server and delivered to users over the
Internet. An application is usually a three-tier structure, comparing a
user service tire (allowing user access to the application), and Business
service tier (allowing the user to carry out complex activities) and a data.
Architecture of a Web Application
Persistent
Web server Web Browser
Data store
(Front-end)
HTTP(S)
Back-end
Advantages of web application
1. Requires no disk space.
2. Reduce business costs.
3. Centralized data is secure and easy to backup.
4. Integrate easily with other server side grid procedure.
5. Provides cross platform compatibility.
1 Mobile and Web Application Development Er. RANJEET KUMAR SINGH
Disadvantages of web application
1. Slower and runs over internet.
2. Requires compatible web browsers.
3. Lack of flexibility.
4. Takes longer to develop as more computer.
5. Depends on server delivering the application.
Platform used for web application
Platforms used for web applications are as follows:
1. Angular JS
Developed by Google and released in 2009, Angular.JS is a
powerful java script based web application development
framework.
2. ASP.NET
Microsoft introduced ASP.NET in 2002. It's perfect for building
scalable and dynamic web applications.
3. Node.JS
Based on JavaScript, Node.JS is one of the best Node framework
and offers a perfect java script environment. Node.JS is an open
source server environment.
4. React JS
With a java script library, React.JS is an open source framework
using React.JS developers can build grid web applications that can
change data without reloading the page.
2 Mobile and Web Application Development Er. RANJEET KUMAR SINGH
Components of Web Application
1. Application server
2. Database server
3. Web Browser
1. Application server
Application server is a type of server designed to install,
operate and host application and associated services for end
users, IT services and organization.
An application server consists of server is operating system
(OS) and server hardware that work together to provide
computing intensive operations and services to residing
application.
2. Database server
Database servers are networked computers on a network
dedicated to database storage and data retrievals from the
database.
The database server is a key component in a client/server
computing environment.
It holds the database management system (DBMS) and the
database.
3. Web browser
Web browser is a software or application where we can request
the information and web server provides requested information
through internet. For example: Chrome, Firefox, Internet
Explorer, MS Edge, Opera, etc.
3 Mobile and Web Application Development Er. RANJEET KUMAR SINGH
Connecting Web Application to a Database
The following are the different techniques we can use for database
connection in a web application environment:
1. Application context Database connection:
Only one database connection shared among all request.
2. Database pooling:
Open a fixed number of database connection and share the
connection among all requests.
3. New database connection per request:
- Accessing and retrieving data and values from database:
- To access and retrieving data or values from database, we have to
use SQL commands or statements.
- SELECT query is used to retrieve data from a table. It is the most
used SQL query we can retrieve complete table data, or partial by
specifying conditions using the WHERE clause.
Syntax of SELECT Query
1. SELECT
Column_name1;
Column_name2;
Column_name3;
………..
Column_nameN
FROM table_name;
2. SELECT * FROM table_name;
A special character asterisk (*) is used to address all the data
(belonging to all column) in a query SELECT statement uses*
character to retrieve all records from a table, for all the columns.
4 Mobile and Web Application Development Er. RANJEET KUMAR SINGH
To fill or insert data in a database, we have to use INSERT
command or query.
INSERT: The INSERT statement is a SQL query. It is used to
insert data into the row of a table.
Syntax:
INSERT INTO TABLE_NAME (col1, col2, col3 … colN)
VALUES (value1, value2, value3… valueN);
OR,
INSERT INTO TABLE_NAME
VALUES (value1, value2, value3 … value N);
5 Mobile and Web Application Development Er. RANJEET KUMAR SINGH