SlideShare uma empresa Scribd logo
1 de 23
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
3-Tier Architecture
3-Tier Architecture
1-Tier Architecture
1-Tier Architecture

• In 1-Tier Architecture the file you want to work with must be accessible
  from a local or shared drive
• This is the simplest of all the architectures, but also the least secure
• Since users have direct access to the files, they could accidentally modify,
  delete the file by accident or on purpose
• So 1-tier architecture is simple and cheap, but usually unsecured and data
  can easily be lost if you are not careful
2-Tier Architecture
2-Tier Architecture

• This architecture is also called Client-Server architecture because of the
  two components
• The client that runs the application and the server that handles the database
  back-end
• The client computer usually can’t see the database directly and can only
  access the data by starting the client
• This means that the data on the server is much more secure
• Now users are unable to change or delete data unless they have specific
  user rights to do so
2-Tier Architecture

• The client-server solution also allows multiple users to access the database
  at the same time
• One other huge benefit is that the server is processing data that allows the
  client to work on the presentation and business logic only
• This mean that the client and the server is sharing the workload and by
  scaling the server to be more powerful than the client
• you are usually able to load many clients to the server allowing more users
  to work on the system at the same time.
3-Tier Architecture
• This involves one more layer called the business logic tier, service tier or
  middle tier (layer)
• In the client-server solution the client was handling the business logic
  and that makes the client “thick”
• A thick client means that it requires heavy traffic with the server, thus
  making it difficult to use over slower network connections like Internet and
  Wireless
• This means that only little communication is needed between the client and
  the middle tier making the client “thin” or “thinner”
• An example of a thin client is an Internet browser that allows you to see
  and provide information fast and almost with no delay
3-Tier Architecture

• As more users access the system a three-tier solution is more scalable than
  the other solutions because you can add as many middle tiers (running on
  each own server) as needed to ensure good performance (N-tier or
  multiple-tier).
3-Tier Architecture

• Security is also the best in the three-tier architecture because the middle
  layer protects the database tier
• There is one major drawback to the N-tier architecture and that is that the
  additional tiers increase the complexity and cost of the installation
Differences among 1-Tier,2-Tier,3-Tier Architecture


           1-Tier             2-Tier          Multi-Tier
Benefits      Very simple Good security     Exceptional
             Inexpensive   More scalable security Fastest
              No server   Faster execution execution
               needed                      “Thin” client
                                           Very scalable

 Issues     Poor security     More costly       Very costly
           Multi user issues More complex      Very complex
                             “Thick” client

 Users      Usually 1 (or a        2-100        50-2000 (+)
                few)
3-Tier Architecture
from transferobj import tobj                UI
from Blogic import Blogic
class gui:
 def userip(self):
   print 'enter the Airline code'
   self.int_Airline_Code=raw_input()
   print 'enter the Airline Name'
   self.vchr_Airline_Name=raw_input()
   print 'enter the Airline Numeric Code'
   self.int_Airline_Numeric_Code=raw_input()
   tob=tobj()
   tob._init_(self.int_Airline_Code,self.vchr_Airline_Name,self.int_Airline_Numeric_Code)
   b=Blogic()
   b.getdata(tob)
3-Tier Architecture
                      UI
def main():
 g=gui()
 g.userip()



main()
3-Tier Architecture
                            Logic
from transferobj import tobj
from Database2 import Data
class Blogic:
   def getdata(self,tob):
         self.int_Airline_Code=tob.int_Airline_Code
         self.vchr_Airline_Name=tob.vchr_Airline_Name
         self.int_Airline_Numeric_Code=tob.int_Airline_Numeric_Code
         obj3=Data()
         obj3.getdetails(tob)
3-Tier Architecture
                                    DataBase
from transferobj import tobj
import psycopg2
import sys
#Define our connection string
conn_string = " dbname='firstdb'"


# print the connection string we will use to connect
print "Connecting to databasen ->%s" % (conn_string)


# get a connection, if a connect cannot be made an exception will be raised here
conn = psycopg2.connect(conn_string)


# conn.cursor will return a cursor object, you can use this cursor to perform queries
cursor = conn.cursor()
print "Connected!n"
3-Tier Architecture
                                   DataBase
class Data:
  def getdetails(self,tob):
          self.int_Airline_Code=tob.int_Airline_Code
          self.vchr_Airline_Name=tob.vchr_Airline_Name
          self.int_Airline_Numeric_Code=tob.int_Airline_Numeric_Code
cursor.execute("insert into tbl_Airlines values(%s,%s,%s)",
(self.int_Airline_Code,self.vchr_Airline_Name,self.int_Airline_Numeric_Code))
cursor.execute("select * from tbl_Airlines");
result=cursor.fetchall()
print result
conn.commit()
Reference
    http://blog.simcrest.com/what-is-3-tier-architecture-and-why-do-you-need-it
http://www.c-sharpcorner.com/uploadfile/gowth/two-tier-and-three-tier-architecture-
                                  with-example/
If this presentation helped you, please visit our
           page facebook.com/baabtra and like it.
                 Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us

Mais conteúdo relacionado

Mais procurados

Introduction to Web Programming
Introduction to Web ProgrammingIntroduction to Web Programming
Introduction to Web ProgrammingYnon Perek
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPTAjay Chimmani
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns pptAman Jain
 
Files and Directories in PHP
Files and Directories in PHPFiles and Directories in PHP
Files and Directories in PHPNicole Ryan
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showThe complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showSubhas Malik
 
ANSI-SPARC Architecture - (3-Tier Architecture)
ANSI-SPARC Architecture - (3-Tier Architecture)ANSI-SPARC Architecture - (3-Tier Architecture)
ANSI-SPARC Architecture - (3-Tier Architecture)Yaksh Jethva
 
Linux Basic commands and VI Editor
Linux Basic commands and VI EditorLinux Basic commands and VI Editor
Linux Basic commands and VI Editorshanmuga rajan
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to DjangoJames Casey
 
Distributed databases,types of database
Distributed databases,types of databaseDistributed databases,types of database
Distributed databases,types of databaseBoomadevi Shanmugam
 
Java Exception Handling and Applets
Java Exception Handling and AppletsJava Exception Handling and Applets
Java Exception Handling and AppletsTanmoy Roy
 
Builder Design Pattern (Generic Construction -Different Representation)
Builder Design Pattern (Generic Construction -Different Representation)Builder Design Pattern (Generic Construction -Different Representation)
Builder Design Pattern (Generic Construction -Different Representation)Sameer Rathoud
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management SystemAAKANKSHA JAIN
 

Mais procurados (20)

Introduction to Web Programming
Introduction to Web ProgrammingIntroduction to Web Programming
Introduction to Web Programming
 
Vectors in Java
Vectors in JavaVectors in Java
Vectors in Java
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
Servlets
ServletsServlets
Servlets
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
 
Files and Directories in PHP
Files and Directories in PHPFiles and Directories in PHP
Files and Directories in PHP
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showThe complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
 
ANSI-SPARC Architecture - (3-Tier Architecture)
ANSI-SPARC Architecture - (3-Tier Architecture)ANSI-SPARC Architecture - (3-Tier Architecture)
ANSI-SPARC Architecture - (3-Tier Architecture)
 
Linux Basic commands and VI Editor
Linux Basic commands and VI EditorLinux Basic commands and VI Editor
Linux Basic commands and VI Editor
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
TypeScript Overview
TypeScript OverviewTypeScript Overview
TypeScript Overview
 
File handling in c++
File handling in c++File handling in c++
File handling in c++
 
Distributed databases,types of database
Distributed databases,types of databaseDistributed databases,types of database
Distributed databases,types of database
 
Java Exception Handling and Applets
Java Exception Handling and AppletsJava Exception Handling and Applets
Java Exception Handling and Applets
 
Delegates and events in C#
Delegates and events in C#Delegates and events in C#
Delegates and events in C#
 
Builder Design Pattern (Generic Construction -Different Representation)
Builder Design Pattern (Generic Construction -Different Representation)Builder Design Pattern (Generic Construction -Different Representation)
Builder Design Pattern (Generic Construction -Different Representation)
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management System
 

Destaque (20)

2 tier and 3 tier architecture
2 tier and 3 tier architecture2 tier and 3 tier architecture
2 tier and 3 tier architecture
 
Ektron 3-Tier Architecture
Ektron 3-Tier ArchitectureEktron 3-Tier Architecture
Ektron 3-Tier Architecture
 
Logix erp air, surface, railways management system
Logix erp air, surface, railways management systemLogix erp air, surface, railways management system
Logix erp air, surface, railways management system
 
2 tier erp
2 tier erp2 tier erp
2 tier erp
 
Erp
ErpErp
Erp
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
Erp
ErpErp
Erp
 
MIS-Web 2.0
MIS-Web 2.0MIS-Web 2.0
MIS-Web 2.0
 
SAP Overview and Architecture
SAP Overview and ArchitectureSAP Overview and Architecture
SAP Overview and Architecture
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
Vb.net session 01
Vb.net session 01Vb.net session 01
Vb.net session 01
 
IRCTC projects
IRCTC  projects IRCTC  projects
IRCTC projects
 
Quick Walk Through -SAP Transportation Management.How It Is Beneficial?
Quick Walk Through -SAP Transportation Management.How It Is Beneficial?Quick Walk Through -SAP Transportation Management.How It Is Beneficial?
Quick Walk Through -SAP Transportation Management.How It Is Beneficial?
 
Sap Implementation Presentation
Sap Implementation PresentationSap Implementation Presentation
Sap Implementation Presentation
 
What is ERP
What is ERPWhat is ERP
What is ERP
 
Erp Enterprise Resource Planning
Erp   Enterprise Resource PlanningErp   Enterprise Resource Planning
Erp Enterprise Resource Planning
 
Transportation management
Transportation managementTransportation management
Transportation management
 
Transportation Management Ppt
Transportation Management PptTransportation Management Ppt
Transportation Management Ppt
 
ERP Implementation Life Cycle
ERP Implementation Life CycleERP Implementation Life Cycle
ERP Implementation Life Cycle
 
Basics of ERP
Basics of ERPBasics of ERP
Basics of ERP
 

Semelhante a 3 Tier Architecture

3 Tier Architecture
3 Tier Architecture3 Tier Architecture
3 Tier Architectureguestd0cc01
 
3 Tier Architecture
3  Tier Architecture3  Tier Architecture
3 Tier ArchitectureWebx
 
Project: Designing a Secure Network
Project: Designing a Secure NetworkProject: Designing a Secure Network
Project: Designing a Secure Networkvictor okoth
 
Term Paper Project Designing a Secure NetworkThis term paper .docx
Term Paper Project Designing a Secure NetworkThis term paper .docxTerm Paper Project Designing a Secure NetworkThis term paper .docx
Term Paper Project Designing a Secure NetworkThis term paper .docxmehek4
 
Cloud computing security from single to multiple
Cloud computing security from single to multipleCloud computing security from single to multiple
Cloud computing security from single to multipleKiran Kumar
 
Cis 534 Teaching Effectively--tutorialrank.com
Cis 534  Teaching Effectively--tutorialrank.comCis 534  Teaching Effectively--tutorialrank.com
Cis 534 Teaching Effectively--tutorialrank.comSoaps82
 
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGEPRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGEEditor IJCTER
 
Week 10 Term Paper SubmissionIf you are using the Blackboard Mobil.docx
Week 10 Term Paper SubmissionIf you are using the Blackboard Mobil.docxWeek 10 Term Paper SubmissionIf you are using the Blackboard Mobil.docx
Week 10 Term Paper SubmissionIf you are using the Blackboard Mobil.docxsheronlewthwaite
 
Tcp performance Final Report
Tcp performance Final Report Tcp performance Final Report
Tcp performance Final Report ambitlick
 
This term paper involves putting together the various concepts l
This term paper involves putting together the various concepts lThis term paper involves putting together the various concepts l
This term paper involves putting together the various concepts lrochellwa9f
 
two tier and three tier
two tier and three tiertwo tier and three tier
two tier and three tierKashafnaz2
 
CIS 534 Life of the Mind/newtonhelp.com   
CIS 534 Life of the Mind/newtonhelp.com   CIS 534 Life of the Mind/newtonhelp.com   
CIS 534 Life of the Mind/newtonhelp.com   bellflower9
 
2-Tier and 3-Tier Architecture of Enterprise Resource Planning
2-Tier and 3-Tier Architecture of Enterprise Resource Planning2-Tier and 3-Tier Architecture of Enterprise Resource Planning
2-Tier and 3-Tier Architecture of Enterprise Resource PlanningS M Qamar Abbas
 
Term Paper Project Designing a Secure NetworkDue Week 10 and wo.docx
Term Paper Project Designing a Secure NetworkDue Week 10 and wo.docxTerm Paper Project Designing a Secure NetworkDue Week 10 and wo.docx
Term Paper Project Designing a Secure NetworkDue Week 10 and wo.docxmanningchassidy
 
reposting due to tutor not being able to complete.,This term .docx
reposting due to tutor not being able to complete.,This term .docxreposting due to tutor not being able to complete.,This term .docx
reposting due to tutor not being able to complete.,This term .docxlaurieellan
 
Migration of application schema to windows azure
Migration of application schema to windows azureMigration of application schema to windows azure
Migration of application schema to windows azureeSAT Publishing House
 
Need help writing term paper.  Posted previously with different due .docx
Need help writing term paper.  Posted previously with different due .docxNeed help writing term paper.  Posted previously with different due .docx
Need help writing term paper.  Posted previously with different due .docxdarwinming1
 
3-Tier Architecture Step By Step Exercises
3-Tier Architecture Step By Step Exercises3-Tier Architecture Step By Step Exercises
3-Tier Architecture Step By Step ExercisesMiranda Anderson
 

Semelhante a 3 Tier Architecture (20)

3 Tier Architecture
3 Tier Architecture3 Tier Architecture
3 Tier Architecture
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
3 Tier Architecture
3  Tier Architecture3  Tier Architecture
3 Tier Architecture
 
Project: Designing a Secure Network
Project: Designing a Secure NetworkProject: Designing a Secure Network
Project: Designing a Secure Network
 
Term Paper Project Designing a Secure NetworkThis term paper .docx
Term Paper Project Designing a Secure NetworkThis term paper .docxTerm Paper Project Designing a Secure NetworkThis term paper .docx
Term Paper Project Designing a Secure NetworkThis term paper .docx
 
Cloud computing security from single to multiple
Cloud computing security from single to multipleCloud computing security from single to multiple
Cloud computing security from single to multiple
 
Cis 534 Teaching Effectively--tutorialrank.com
Cis 534  Teaching Effectively--tutorialrank.comCis 534  Teaching Effectively--tutorialrank.com
Cis 534 Teaching Effectively--tutorialrank.com
 
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGEPRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
 
Week 10 Term Paper SubmissionIf you are using the Blackboard Mobil.docx
Week 10 Term Paper SubmissionIf you are using the Blackboard Mobil.docxWeek 10 Term Paper SubmissionIf you are using the Blackboard Mobil.docx
Week 10 Term Paper SubmissionIf you are using the Blackboard Mobil.docx
 
Tcp performance Final Report
Tcp performance Final Report Tcp performance Final Report
Tcp performance Final Report
 
This term paper involves putting together the various concepts l
This term paper involves putting together the various concepts lThis term paper involves putting together the various concepts l
This term paper involves putting together the various concepts l
 
two tier and three tier
two tier and three tiertwo tier and three tier
two tier and three tier
 
CIS 534 Life of the Mind/newtonhelp.com   
CIS 534 Life of the Mind/newtonhelp.com   CIS 534 Life of the Mind/newtonhelp.com   
CIS 534 Life of the Mind/newtonhelp.com   
 
2-Tier and 3-Tier Architecture of Enterprise Resource Planning
2-Tier and 3-Tier Architecture of Enterprise Resource Planning2-Tier and 3-Tier Architecture of Enterprise Resource Planning
2-Tier and 3-Tier Architecture of Enterprise Resource Planning
 
Term Paper Project Designing a Secure NetworkDue Week 10 and wo.docx
Term Paper Project Designing a Secure NetworkDue Week 10 and wo.docxTerm Paper Project Designing a Secure NetworkDue Week 10 and wo.docx
Term Paper Project Designing a Secure NetworkDue Week 10 and wo.docx
 
reposting due to tutor not being able to complete.,This term .docx
reposting due to tutor not being able to complete.,This term .docxreposting due to tutor not being able to complete.,This term .docx
reposting due to tutor not being able to complete.,This term .docx
 
Technical Architectures
Technical ArchitecturesTechnical Architectures
Technical Architectures
 
Migration of application schema to windows azure
Migration of application schema to windows azureMigration of application schema to windows azure
Migration of application schema to windows azure
 
Need help writing term paper.  Posted previously with different due .docx
Need help writing term paper.  Posted previously with different due .docxNeed help writing term paper.  Posted previously with different due .docx
Need help writing term paper.  Posted previously with different due .docx
 
3-Tier Architecture Step By Step Exercises
3-Tier Architecture Step By Step Exercises3-Tier Architecture Step By Step Exercises
3-Tier Architecture Step By Step Exercises
 

Mais de baabtra.com - No. 1 supplier of quality freshers

Mais de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

3 Tier Architecture

  • 1.
  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 6. 1-Tier Architecture • In 1-Tier Architecture the file you want to work with must be accessible from a local or shared drive • This is the simplest of all the architectures, but also the least secure • Since users have direct access to the files, they could accidentally modify, delete the file by accident or on purpose • So 1-tier architecture is simple and cheap, but usually unsecured and data can easily be lost if you are not careful
  • 8. 2-Tier Architecture • This architecture is also called Client-Server architecture because of the two components • The client that runs the application and the server that handles the database back-end • The client computer usually can’t see the database directly and can only access the data by starting the client • This means that the data on the server is much more secure • Now users are unable to change or delete data unless they have specific user rights to do so
  • 9. 2-Tier Architecture • The client-server solution also allows multiple users to access the database at the same time • One other huge benefit is that the server is processing data that allows the client to work on the presentation and business logic only • This mean that the client and the server is sharing the workload and by scaling the server to be more powerful than the client • you are usually able to load many clients to the server allowing more users to work on the system at the same time.
  • 10. 3-Tier Architecture • This involves one more layer called the business logic tier, service tier or middle tier (layer) • In the client-server solution the client was handling the business logic and that makes the client “thick” • A thick client means that it requires heavy traffic with the server, thus making it difficult to use over slower network connections like Internet and Wireless • This means that only little communication is needed between the client and the middle tier making the client “thin” or “thinner” • An example of a thin client is an Internet browser that allows you to see and provide information fast and almost with no delay
  • 11. 3-Tier Architecture • As more users access the system a three-tier solution is more scalable than the other solutions because you can add as many middle tiers (running on each own server) as needed to ensure good performance (N-tier or multiple-tier).
  • 12. 3-Tier Architecture • Security is also the best in the three-tier architecture because the middle layer protects the database tier • There is one major drawback to the N-tier architecture and that is that the additional tiers increase the complexity and cost of the installation
  • 13. Differences among 1-Tier,2-Tier,3-Tier Architecture 1-Tier 2-Tier Multi-Tier Benefits Very simple Good security Exceptional Inexpensive More scalable security Fastest No server Faster execution execution needed “Thin” client Very scalable Issues Poor security More costly Very costly Multi user issues More complex Very complex “Thick” client Users Usually 1 (or a 2-100 50-2000 (+) few)
  • 14. 3-Tier Architecture from transferobj import tobj UI from Blogic import Blogic class gui: def userip(self): print 'enter the Airline code' self.int_Airline_Code=raw_input() print 'enter the Airline Name' self.vchr_Airline_Name=raw_input() print 'enter the Airline Numeric Code' self.int_Airline_Numeric_Code=raw_input() tob=tobj() tob._init_(self.int_Airline_Code,self.vchr_Airline_Name,self.int_Airline_Numeric_Code) b=Blogic() b.getdata(tob)
  • 15. 3-Tier Architecture UI def main(): g=gui() g.userip() main()
  • 16. 3-Tier Architecture Logic from transferobj import tobj from Database2 import Data class Blogic: def getdata(self,tob): self.int_Airline_Code=tob.int_Airline_Code self.vchr_Airline_Name=tob.vchr_Airline_Name self.int_Airline_Numeric_Code=tob.int_Airline_Numeric_Code obj3=Data() obj3.getdetails(tob)
  • 17. 3-Tier Architecture DataBase from transferobj import tobj import psycopg2 import sys #Define our connection string conn_string = " dbname='firstdb'" # print the connection string we will use to connect print "Connecting to databasen ->%s" % (conn_string) # get a connection, if a connect cannot be made an exception will be raised here conn = psycopg2.connect(conn_string) # conn.cursor will return a cursor object, you can use this cursor to perform queries cursor = conn.cursor() print "Connected!n"
  • 18. 3-Tier Architecture DataBase class Data: def getdetails(self,tob): self.int_Airline_Code=tob.int_Airline_Code self.vchr_Airline_Name=tob.vchr_Airline_Name self.int_Airline_Numeric_Code=tob.int_Airline_Numeric_Code cursor.execute("insert into tbl_Airlines values(%s,%s,%s)", (self.int_Airline_Code,self.vchr_Airline_Name,self.int_Airline_Numeric_Code)) cursor.execute("select * from tbl_Airlines"); result=cursor.fetchall() print result conn.commit()
  • 19.
  • 20.
  • 21. Reference http://blog.simcrest.com/what-is-3-tier-architecture-and-why-do-you-need-it http://www.c-sharpcorner.com/uploadfile/gowth/two-tier-and-three-tier-architecture- with-example/
  • 22. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com