You are on page 1of 41

E-Commerce

Application
Development

Tiered Architectures

System
A group

of interrelated elements forming a collective

entity

Architecture
A style

and method of design and construction

An architectural history of
computing

1 tier architecture

2 tier architecture

monolithic Information Systems


presentation, application logic, and resource management were
merged into a single tier
separation of presentation tier from other 2 tiers (app +
resource)
became popular as 'client/server' systems

3 tier architecture

can be achieved by separating RM (resource management)


from application logic tier

Tiers of an architecture
Client

browser
<html>
...
</html>

Application
logictier

informationsystem

Presentation
tier

Visualise

Calculate

Resource
managementtier

Store

Presentation Tier

Any IS needs to communicate with external entities, human


users or other computers
Allows these entities to interact with the system
Implemented as a GUI interface
Referred to as the client of the IS which is not correct
Example:

Systems accessed by web browsers using plain HTML documents


The client is a web browser that only displays information prepared
by the Web server
The presentation layer in this case is the Web server

How the data should appear to the user and how the user
should interact with the interface
5

Application Logic Tier

IS do more than information delivery, they perform data


processing (Business Logic & calculation) behind the
results being delivered
Example:

A program that implements a withdrawal operation from a bank


This program takes the request, checks whether there is enough
funds, verifies whether withdrawal limits are exceeded, creates a
log entry for the operation, performs the operations against the
current balance and gives approval for handing out the money.
Here the algorithms are implemented

This tier is often referred to as

Services
Business logic
Business rules
Server

Resource Management Layer

IS needs data to work with


Data can reside in databases or other information
repositories
Deals with and implements different data sources of
Information Systems
Also referred to as the data layer, which indicates that it is
implemented using a Database Management System
From the banking example:

The RM layer could be the account database of the bank

Can also be a gateway to recursively using other ISs


7

1 Tier Architectures

Mainframe-based and the system took place through


dumb terminals
Monolithic Information Systems
Presentation, application logic, and resource
management were merged into a single tier
Many of these 'old' Systems are still in use!
Due to its monolithic nature it did not provide an entry
point from the outside except the channel to the dumb
terminals
Considered as black box
8

Design of 1 Tier Architecture


Client

Application
logiclayer

Resource
managementlayer

informationsystem

Presentation
layer

Advantages:
easy to optimise performance
no context switching
no compatibility issues
no client developement, maintainance
and deployment cost
Disadvantages:
monolithic pieces of code (high
maintainance)
hard to modify lack of documentation
and qualified programmers
lack of qualified programmers for
these systems
9

2 - Tier Architectures
Client
Presentationlayer

1.7 p.12

Server

Applicationlogiclayer

Resourcemanagementlayer

10

Informationsystem

fig

2 - Tier Architectures

Coming of PC was the real push to 2-tier architectures


Separation of presentation layer from other 2 layers (app +
resource)

Advantages

Client/server systems with thin clients/fat clients


Use RPC (Remote Procedure Call) to communicate between tiers
Need for standardisation for inter-tier communication
portability
no need for context switches or calls between component for key
operations

Disadvantages

limited scalability
legacy problems (blown up clients)
11

3 - Tier Architectures
client

applicationlogiclayer
middleware

resourcemanagementlayer

12

informationsystem

presentation
layer

3 - Tier Architectures

The former created islands of information where a set of clients


could communicate with a server but not with other servers
3-tier made it technically possible to integrate different servers
Separating RM (resource management) from application logic
layer

Additional middleware layer between client and server

integration logic
application logic

Lead to the introduction of clear RM layer interfaces


Good at dealing with integration of different resources

13

3 - Tier Architectures

Advantages

scalability by running each layer on a different server


scalability by distributing AL (application logic layer) across many
nodes
additional tier for integration logic
Flexibility

Disadvantages

performance loss if distributed over the internet


problem when integrating different 3 tier systems

14

3 - tier Architectures
presentation
layer

GUI clients
C++, VB, Java

Middleware
Server
applicationlogiclayer
middleware

resourcemanagementlayer

Databases

Legacy Systems

15

informationsystem

client

Middleware

Middleware refers to the software which is common to multiple


applications and builds on the network transport services to enable
ready development of new applications and network services.
Middleware typically includes a set of components such as
resources and services that can be utilised by applications either
individually or in various subsets.

Examples of services: Security, Directory and naming, end-to-end


quality of service, support for mobile code.

Examples:

OMGs CORBA
J2EE - Java 2 Enterprise Edition
Microsofts .Net

16

Middleware features

Allows communication

through a standard language


across different platforms
between legacy and modern applications

Takes care of

transactions between servers


data conversion
authentication
communications between computers

17

Middleware features

Provides runtime environment for components in the middletier

Component lifecyle and management


Transaction, event and security services
Provides connections to databases, mainframes and legacy
systems

Separates client-tier from the data source

Clean separation of user-interfaces and presentation logic from


the data source

18

n -tier
client

2 cases of n tier

Webbrowser

Webserver

fig 1.12 p. presentation


20
layer

informationsystem

HTMLfilter

applicationlogiclayer

middleware

resourcemanagementlayer
19

Systems linked with


added connectivity
through the internet
Resource layer is a
full fledged 2 - or 3 tier system

General benefits of adding


With growing number of tiers one gains:
tiers

flexibility
functionality
possibilities for distribution

But:

Each tier increases communication costs


Complexity rises leading to higher cost and risk
Higher complexity of development
Higher complexity of management and tuning

Redundency increases

20

Dedicated Server

A dedicated server is a single computer in a


network reserved for serving the needs of the
network.
Examples of Dedicated Servers are:
File Server
Database Server
Web Server etc.
We shall take an example of a Web Server and
explain it in the following slides.

BROWSER

WEB
SERVER

Operating System

Resources
Servlet
CGI
Program

Files

Web Server
A computer (or software running on a
computer) on the Internet that listens for HTTP
requests, typically on port 80, and responds
with HTTP responses.

Market Share for Top


Servers Across All
Domains, Aug 1995 Aug 2010
Apache : 54.9%
Microsoft IIS:
25.9%
Google: 7.7%
ngnix: 5.6%

How Web Servers Work?


At the most basic level possible, the following diagram
shows the steps that brought that page to your screen:

Your browser formed a connection to a


Web server, requested a page and
received it.

Static Content

Java Script
Used in millions of Web pages to improve the design, validate
forms, detect browsers, create cookies, and much more

HTML DOM
The HTML Document Object Model (HTML DOM) defines a
standard way for accessing and manipulating HTML documents
The DOM presents an HTML document as a tree structure, and
gives access to the structure through a set of objects

DHTML
DHTML is a combination of technologies (HTML, JavaScript, etc)
used to create dynamic and interactive Web sites

VBScript
Visual Basic based script

25

Dynamic Content

Content shaped by program in response


to a request

More processing required

Static content faster

26

Dynamic Content

Dynamic content is nonstatic information constructed in response to


a Web clients request

Using Open DataBase Connectivity (ODBC), the Web server can


assemble information from disparate database systems

Active Server Pages (ASP) is a server-side scripting mechanism to


build dynamic sites and Web applications

Improved support via DreamWeaver MX and Microsoft Visual


Studio .NET

27

Dynamic Content

Server-side scripting
ASP
ASP.NET
JSP
JSFaces
PHP
Servlets

28

Choosing a Web Server


Faster
Scalability
Operating system
Connection speed
Dynamic vs. static pages

29

Web Server Software (1)

Apache HTTP Server


free

and efficient since 1996


Runs on many OS
Password protection
Digital certificates
Authentication systems
Access restrictions
APIs
Allows dynamic content generators (ASP)
30

Web Server Software (2)

Microsoft IIS
Packaged

with Windows Server


Used in many corporate sites
Suitable for small to medium operations
Support for Microsoft languages
Supports SQL and ODBC
Extremely popular on PCs

31

Sun Java System Web Server

Web Server Software (3)

32

Sun Java System Web Server


Connectivity to databases
Powerful development environment
Publishing, link management and uploading
Search engine capable of indexing
PDF
MS Word
PowerPoint
Manage user profiles remotely
Digital certificate authentication

Web Server Hardware


More memory
Larger/faster hard disk drivers
Faster processors
Multiple processors

Exploit

33

GPUs

Web Architecture Model


Buyer/Seller
Client
Logic
Look
Structure

JavaScript
CSS
HTML

Web Architecture Model


Buyer/Seller

HTTP-Response

Client

Server
HTTP-Request

Logic
Look
Structure

JavaScript
CSS
HTML

Web Architecture Model


Buyer/Seller
HTTP-Response
Client

Server
HTTP-Request

Logic
Look
Structure

JavaScript
CSS
HTML

ASP.NET
PHP
JSP
ColdFusion
CGI

Web Architecture Model


Buyer/Seller
HTTP-Response
Client

Server
HTTP-Request

Logic
Look
Structure

JavaScript
CSS
HTML

ASP.NET (VB.NET/C#)
PHP
JSP (Java)
ColdFusion (CFML)
CGI (PERL/C++)

Web Architecture Model


Buyer/Seller
HTTP-Response

ASP.NET (VB.NET/C#)

Server

Client
HTTP-Request
Logic
Look
Structure

PHP
JSP (Java)
ColdFusion (CFML)
CGI (PERL/C++)

JavaScript
CSS
HTML

Access
SQL Server 2000/2005

Data

Oracle
MySQL
XML

Web Architecture Model


Buyer/Seller
HTTP-Response
Client
HTTP-Request
Logic
Look
Structure

JavaScript
CSS
HTML

ASP.NET (VB.NET/C#)

Serve
r

PHP
JSP (Java)
ColdFusion (CFML)
CGI (PERL/C++)

ADO.NET 2.0

Data
Access

Access
SQL Server 2000/2005

Data

Oracle
MySQL
XML

Web Architecture Model


Buyer/Seller
HTTP-Response
Client
HTTP-Request
Logic
Look
Structure

JavaScript
CSS
HTML

ASP.NET (VB.NET/C#)

Serve
r

PHP
JSP (Java)
ColdFusion (CFML)
CGI (PERL/C++)

ADO.NET 2.0 (SQL)

Data
Access

Access
SQL Server 2000/2005

Data

Oracle
MySQL
XML

Web Technologies
HTTP / HTTPS (URL, GET/POST)
Client-side:

HTML / XHTML (Extensible HyperText Markup Language)


JavaScript / VBScript (client-side scripting)
Applets / ActiveX controls

Server-side:
PHP
JSP

(Java Server Pages)


ASP (Active Server Pages)
ASP.NET (next generation of ASP)

You might also like