Lecture-6 Internet and Web Applications Architectures
Lecture-6 Internet and Web Applications Architectures
Lecture-6
Internet and Web Applications
Architectures
Web Application Development
(Large) Applications cannot be developed in ad-hoc
manner
We need design & architecture (SW engineering)
Concept separation, Component, Relations, …
There are so many architectural patterns
Common architectures in web applications
Multi-layer (Multi-tier), Microservices, …
MVC, MVP,MVVM, …
Layering Approach
Common layering in web applications
Presentation Layer
Business logic (Functional) Layer
Persistence Layer
Data (management/resource) Layer
These layers are purely abstractions
Not correspond to physical distribution
All layers may or may not be on the same machine
Multilayer Architecture
Presentation Layer
User interface of the application
GUI
HTML based browser
Displays information (processing output) which are
get from the business logic layer
Gets user’s requests and pass them (with required
data) to the business logic layer
Note that the user interface of web applications can
be made up client side & server side codes
Presentation Layer
Component:
View elements such as text, images, layouts, blocks, and
templates. These are basically built by HTML & CSS.
Interactive elements, which handle user input and
coordinate actions to help users complete tasks. These
are basically built by JavaScript.
Business Logic Layer
Implements the core functionality and rules that
drive the business processes and operations.
The work that the application needs to do
Processing/Computing/Calculations
Receives requests from presentation layer
Fetches required data from data layer
Process the request & data
Output is sent back to the presentation layer
Business Logic Layer
Component
Business entities/models: Objects that represent key
concepts and data in the business domain.
Business rules/validation: Enforcement of rules and
constraints to ensure data integrity.
Workflow/Process Management: Define the steps and
actions involved in executing business processes.
Business Logic/Operations: Implementing rules and
operations that drive the core functionality.
Integration with External Systems: Communication
and integration with external systems or services.
Persistence Layer
Implements activities to store and retrieve data
from database.
Its typical operations encompass writing,
reading, updating & deleting data.
Persistence Layer
Component
Data Access Objects (DAOs): For interacting with
databases and performing CRUD (Create, Read,
Update, Delete) operations.
Query Language: Allows the definition and execution of
database queries to retrieve and manipulate data.
Caching Mechanism: In-memory caching of frequently
accessed data to optimize performance.
Object-Relational Mapping (ORM) frameworks: Helps
in mapping database records to object-oriented models
and simplifies database interactions.
Data Layer
Provides data access interface to business logic
Hide data storage details
Hide heterogeneity of underlining systems
Stores, maintains, and manages data structurally
and organizationally
Communicating with data store systems
Database server
Messaging system
…
Data Layer
Components
Schema: Defines the structure and organization
of the database, including tables, columns, data
types, relationships, and constraints.
Tables: Containers that hold the actual data in
rows and columns.
Indexes: Data structures that enhance query
performance by enabling faster data retrieval
based on specific columns.
Backup and Recovery mechanisms
What is a “Tier”?
A "tier" can be referred to as a "layer".
Web Validation/
browser/ Processing/ Get
XML parser Content Update/
Display Database
or other Providing Delete
client modules modules modules
Design Problems & Decisions
Construction and testing
how do we build a web application?
what technology should we choose?
Re-use
can we use standard components?
Scalability
how will our web application cope with large numbers of requests?
Security
how do we protect against attack, viruses, malicious data access, denial of
service?
Different data views
user types, individual accounts, data protection
model
controller updates
view view controller
model
2
controller
1
3
browser view
4
Client Server
MVC for Web Application
Service-1
Presentation
Layer
web Server DB Service
C
V M
Service-n
Service-2
Client Side
(Browser)
Server Side
HTML + CSS +
Ajax, REST, …
JS + …