3 tier architecture

36
3- tier Architecture Sanjeev Sarma, Webx 1

Upload: webx

Post on 07-Dec-2014

13.512 views

Category:

Technology


39 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 3  Tier Architecture

3- tier Architecture

Sanjeev Sarma, Webx

1

Page 2: 3  Tier Architecture

Topics Covered

•What is 3-tier Architecture?•Evolution of 3-tier Architecture

Development.•What does 3-tier Architecture Offer You?

▫Advantages & Disadvantages•An Example of how to implement 3-tier

Architecture in .Net Platform Using C#

2

Page 3: 3  Tier Architecture

What is 3-tier Architecture?

•A three-way interaction in a client/Server environment▫The User Interface is stored in the Client.▫The Business Application Logic is Stored in

one or more Servers.▫The Data is Stored in a Database Server.

3

Page 4: 3  Tier Architecture

4

Page 5: 3  Tier Architecture

Evolution to the 3-tier Architecture

Tiers we are going to study

5

Page 6: 3  Tier Architecture

Single Tier Architecture• Time of Huge

“Mainframe”• All Processing in Single

Computer• All Resources Attached

to the same Computer• Access Via Dumb

Terminals

6

Page 7: 3  Tier Architecture

Single Tier – Advantages & Disadvantages•Advantages

▫Simple▫Efficient▫Uncomplicated

•Disadvantages▫Very Expensive

7

Page 8: 3  Tier Architecture

Dual Tier Architecture• The Personal

Computer• Necessity of Providing

Personal Software• The Client Server

Model was Born!!• Logical System

Components – Most of which are on the Client

8

Page 9: 3  Tier Architecture

Dual Tier – Advantages & Disadvantages • Advantages

▫Less Expensive than Mainframe• Disadvantages

▫The Connections to the Database Server are very Expensive

▫One can only connects a limited number of users to a server before Database Server spends more time managing connections than processing requests

▫Cost-ineffective. Many users only use their connections 2-3% of the time.

9

Page 10: 3  Tier Architecture

3-Tier Architecture• These Applications runs

on the Traditional Client/Server Model But from a Application server.

• Client only Displays the GUI and data, but has no part in producing results

• Database Server Serves to few Connections

10

Page 11: 3  Tier Architecture

3-Tier Advantages• Scalability

▫The Application Servers can be deployed on many machines

▫The Database no longer requires a connection from every client.

• Reusability▫If a standard object is employed, the specific

language of implementation of middle tier can be made transparent.

• Data Integrity▫The middle tier can ensure that only valid data

is allowed to be updated in the database.

11

Page 12: 3  Tier Architecture

3-Tier Advantages• Improved Security

▫ Since the client doesn’t have direct access to the database, Data layer is more secure.

▫ Business Logic is generally more secure since it is placed on a secured central server.

• Reduced Distribution▫ Changes to business logic only need to be updated on

application servers and need not to distributed on clients

• Improved Availability▫ Mission Critical Applications can make use of

redundant application servers and redundant application servers, so it can recover from network of server failures.

12

Page 13: 3  Tier Architecture

3-Tier Disadvantages

•Increased Complexity / Effort▫In General 3-tier Architecture is more

complex to build compared to 2-tier Architecture.

▫Point of Communication are doubled.

13

Page 14: 3  Tier Architecture

Conclusions• Complex business rules easy to implement in

application server layer.• Business Logic off-loaded from database server

and client, which improve performance• Changes to business logic automatically enforce

by server.• All tiers can be platform independent.• Superior Performance for medium to High

Volume Environments

14

Page 15: 3  Tier Architecture

3-Tier Application in ASP.NET

•The Program is organised into three major distinctive tiers or layers:▫Presentation Layer (User Interface)▫Business Layer (Business Access Layer)▫Data Layer (Data Access Layer)

15

Page 16: 3  Tier Architecture

User Interface Layer

16

Page 17: 3  Tier Architecture

Presentation Layer

17

Page 18: 3  Tier Architecture

Business Access Layer - Properties

18

Page 19: 3  Tier Architecture

Business Access Layer

19

Page 20: 3  Tier Architecture

Data Access Layer

20

Page 21: 3  Tier Architecture

Presentation Layer

21

Creating an Object of Property Layer

Page 22: 3  Tier Architecture

Presentation Layer

22

Creating an Object of Business Layer

Page 23: 3  Tier Architecture

Presentation Layer

23

Data Object to Receive Data sent by Business

Layer

Page 24: 3  Tier Architecture

Presentation Layer

24

Obtaining ID from Property Layer

Page 25: 3  Tier Architecture

Presentation Layer

25

Calling Business Layer Function

Page 26: 3  Tier Architecture

Business Access Layer

26

Calling Data Layer Function

Page 27: 3  Tier Architecture

Data Access Layer

27

Result Object Declaration

Page 28: 3  Tier Architecture

Data Access Layer

28

SQL Query Definition

Page 29: 3  Tier Architecture

Data Access Layer

29

Creating Object to receive data

Page 30: 3  Tier Architecture

Data Access Layer

30

Query Execution

Page 31: 3  Tier Architecture

Data Access Layer

31

Returning the Information of the

Database

Page 32: 3  Tier Architecture

Business Access Layer

32

Retuning the Information of Data Layer

Page 33: 3  Tier Architecture

Presentation Layer

33

Returning Data From Business Layer

Page 34: 3  Tier Architecture

Presentation Layer

34

Displaying Result

Page 35: 3  Tier Architecture

Questions & AnswersIf Any?

35

Page 36: 3  Tier Architecture

Thank You!

36