O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

3 Tier Architecture

49.059 visualizações

Publicada em

Publicada em: Tecnologia

3 Tier Architecture

  1. 1. 3- tier Architecture Sanjeev Sarma, Webx
  2. 2. Topics Covered <ul><li>What is 3-tier Architecture? </li></ul><ul><li>Evolution of 3-tier Architecture Development. </li></ul><ul><li>What does 3-tier Architecture Offer You? </li></ul><ul><ul><li>Advantages & Disadvantages </li></ul></ul><ul><li>An Example of how to implement 3-tier Architecture in .Net Platform Using C# </li></ul>
  3. 3. What is 3-tier Architecture? <ul><li>A three-way interaction in a client/Server environment </li></ul><ul><ul><li>The User Interface is stored in the Client. </li></ul></ul><ul><ul><li>The Business Application Logic is Stored in one or more Servers. </li></ul></ul><ul><ul><li>The Data is Stored in a Database Server. </li></ul></ul>
  4. 4.
  5. 5. Evolution to the 3-tier Architecture Tiers we are going to study
  6. 6. Single Tier Architecture <ul><li>Time of Huge “Mainframe” </li></ul><ul><li>All Processing in Single Computer </li></ul><ul><li>All Resources Attached to the same Computer </li></ul><ul><li>Access Via Dumb Terminals </li></ul>
  7. 7. Single Tier – Advantages & Disadvantages <ul><li>Advantages </li></ul><ul><ul><li>Simple </li></ul></ul><ul><ul><li>Efficient </li></ul></ul><ul><ul><li>Uncomplicated </li></ul></ul><ul><li>Disadvantages </li></ul><ul><ul><li>Very Expensive </li></ul></ul>
  8. 8. Dual Tier Architecture <ul><li>The Personal Computer </li></ul><ul><li>Necessity of Providing Personal Software </li></ul><ul><li>The Client Server Model was Born!! </li></ul><ul><li>Logical System Components – Most of which are on the Client </li></ul>
  9. 9. Dual Tier – Advantages & Disadvantages <ul><li>Advantages </li></ul><ul><ul><li>Less Expensive than Mainframe </li></ul></ul><ul><li>Disadvantages </li></ul><ul><ul><li>The Connections to the Database Server are very Expensive </li></ul></ul><ul><ul><li>One can only connects a limited number of users to a server before Database Server spends more time managing connections than processing requests </li></ul></ul><ul><ul><li>Cost-ineffective. Many users only use their connections 2-3% of the time. </li></ul></ul>
  10. 10. 3-Tier Architecture <ul><li>These Applications runs on the Traditional Client/Server Model But from a Application server. </li></ul><ul><li>Client only Displays the GUI and data, but has no part in producing results </li></ul><ul><li>Database Server Serves to few Connections </li></ul>
  11. 11. 3-Tier Advantages <ul><li>Scalability </li></ul><ul><ul><li>The Application Servers can be deployed on many machines </li></ul></ul><ul><ul><li>The Database no longer requires a connection from every client. </li></ul></ul><ul><li>Reusability </li></ul><ul><ul><li>If a standard object is employed, the specific language of implementation of middle tier can be made transparent. </li></ul></ul><ul><li>Data Integrity </li></ul><ul><ul><li>The middle tier can ensure that only valid data is allowed to be updated in the database. </li></ul></ul>
  12. 12. 3-Tier Advantages <ul><li>Improved Security </li></ul><ul><ul><li>Since the client doesn’t have direct access to the database, Data layer is more secure. </li></ul></ul><ul><ul><li>Business Logic is generally more secure since it is placed on a secured central server. </li></ul></ul><ul><li>Reduced Distribution </li></ul><ul><ul><li>Changes to business logic only need to be updated on application servers and need not to distributed on clients </li></ul></ul><ul><li>Improved Availability </li></ul><ul><ul><li>Mission Critical Applications can make use of redundant application servers and redundant application servers, so it can recover from network of server failures. </li></ul></ul>
  13. 13. 3-Tier Disadvantages <ul><li>Increased Complexity / Effort </li></ul><ul><ul><li>In General 3-tier Architecture is more complex to build compared to 2-tier Architecture. </li></ul></ul><ul><ul><li>Point of Communication are doubled. </li></ul></ul>
  14. 14. Conclusions <ul><li>Complex business rules easy to implement in application server layer. </li></ul><ul><li>Business Logic off-loaded from database server and client, which improve performance </li></ul><ul><li>Changes to business logic automatically enforce by server. </li></ul><ul><li>All tiers can be platform independent. </li></ul><ul><li>Superior Performance for medium to High Volume Environments </li></ul>
  15. 15. 3-Tier Application in ASP.NET <ul><li>The Program is organised into three major distinctive tiers or layers: </li></ul><ul><ul><li>Presentation Layer (User Interface) </li></ul></ul><ul><ul><li>Business Layer (Business Access Layer) </li></ul></ul><ul><ul><li>Data Layer (Data Access Layer) </li></ul></ul>
  16. 16. User Interface Layer
  17. 17. Presentation Layer
  18. 18. Business Access Layer - Properties
  19. 19. Business Access Layer
  20. 20. Data Access Layer
  21. 21. Presentation Layer Creating an Object of Property Layer
  22. 22. Presentation Layer Creating an Object of Business Layer
  23. 23. Presentation Layer Data Object to Receive Data sent by Business Layer
  24. 24. Presentation Layer Obtaining ID from Property Layer
  25. 25. Presentation Layer Calling Business Layer Function
  26. 26. Business Access Layer Calling Data Layer Function
  27. 27. Data Access Layer Result Object Declaration
  28. 28. Data Access Layer SQL Query Definition
  29. 29. Data Access Layer Creating Object to receive data
  30. 30. Data Access Layer Query Execution
  31. 31. Data Access Layer Returning the Information of the Database
  32. 32. Business Access Layer Retuning the Information of Data Layer
  33. 33. Presentation Layer Returning Data From Business Layer
  34. 34. Presentation Layer Displaying Result
  35. 35. Questions & Answers If Any?
  36. 36. Thank You!