locked
3-Tier Architecture - How to implement this type of web applications? RRS feed

  • Question

  • User1372467857 posted

    Hi all,

    Based on my understanding 3-Tier means, we need to create Presentation Layer, which access Business Layer, in turn Business Layer can only access Data Access Layer.  We usually place Presentation Layer (UI) and Business Layer(dll's) in Application Server. And the database in another server. Is this correct??


    OR?

    We need to keep Presentation Layer in one server, then Business Layer in second server and Data Access Layer in third server. If so, how do we connect Presentation Layer with Business Layer?

    Thanks in advance.



    Wednesday, December 16, 2009 5:17 AM

Answers

  • User220959680 posted

    Based on my understanding 3-Tier means, we need to create Presentation Layer, which access Business Layer, in turn Business Layer can only access Data Access Layer.  We usually place Presentation Layer (UI) and Business Layer(dll's) in Application Server. And the database in another server. Is this correct??

    Yes, this is nearly correct. It is more about keeping layers separate for code manageability, reusability and extensibility rather than keeping dlls on servers.

    We need to keep Presentation Layer in one server, then Business Layer in second server and Data Access Layer in third server. If so, how do we connect Presentation Layer with Business Layer?

    No. This is incorrect.

    Refer this video to get your doubt clarified:-

    http://blogs.interfacett.com/dan-wahlins-blog/2007/2/5/video-creating-an-n-layer-aspnet-application.html


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 16, 2009 5:48 AM

All replies

  • User220959680 posted

    Based on my understanding 3-Tier means, we need to create Presentation Layer, which access Business Layer, in turn Business Layer can only access Data Access Layer.  We usually place Presentation Layer (UI) and Business Layer(dll's) in Application Server. And the database in another server. Is this correct??

    Yes, this is nearly correct. It is more about keeping layers separate for code manageability, reusability and extensibility rather than keeping dlls on servers.

    We need to keep Presentation Layer in one server, then Business Layer in second server and Data Access Layer in third server. If so, how do we connect Presentation Layer with Business Layer?

    No. This is incorrect.

    Refer this video to get your doubt clarified:-

    http://blogs.interfacett.com/dan-wahlins-blog/2007/2/5/video-creating-an-n-layer-aspnet-application.html


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 16, 2009 5:48 AM
  • User-1247685454 posted

    Good Tutorial with Source code for 3 tier architecture

    http://www.codeproject.com/KB/architecture/three_tier_architecture.aspx


    Wednesday, December 16, 2009 5:53 AM
  • User-952121411 posted

    Actually either one is fine and IMO neither is incorrect.  The main concept you need to understand is the difference between an n-tier 'logical' structure and an n-tier 'physical' structure.

    An n-tier logical structure is the number of individual logical layers within your architecture.  In your case the UI, BLL, and DAL are all logically separated into their own tiers and have their own responsibilities.

    An n-tier physical structure is the number of physical different tiers or typically servers in which the logical tiers are separated by.  You could have a 'SmartClient' application that may completely reside on the client (including the datasource in some scenarios) thus residing on a single tier, but the logical architecture is still an n-tier design with multiple logical layers.

    Typically an n-tier logical design using common tiers like the UI, BLL, DAL offer a nice separation of concerns and scalable design.  So separating logical tiers is always something I recommend.  However, separating tiers or components into separate physical tiers is something that should only be done when required or needed.  Why?  Well the more physical tiers, the more network hops that will be introduced, and ultimately there will be performance considerations.

    So in your case it is a good idea to have a logical n-tier design using a UI, BLL, and DAL, and probably better to have the UI and BLL on (1) server and the Database reside on a separate server.  It is not incorrect to separate all (3) layers physically, but if it is not required or not needed, then there is no need to separate the tiers physically to that degree. 

    If you would like to read a great explination about this more in depth take a look at Chapter 1 in the book by Rocky Lhotka titled: Expert VB 2005 Business Objects (http://books.google.com/books?id=AS7zAQaKt-oC&dq=rocky+lhotka+Expert+2005+Business+Objects+vb.net&printsec=frontcover&source=bn&hl=en&ei=8OMoS9yjIs2vtgfv0oTRCw&sa=X&oi=book_result&ct=result&resnum=4&ved=0CB4Q6AEwAw#v=onepage&q=&f=false)

    Hope this helps! Smile

    Wednesday, December 16, 2009 8:46 AM
  • User1372467857 posted

    Hi Guys,

    Thanks for all your great explanation. Hope this post will be very useful for others also.

    Wednesday, December 16, 2009 8:55 PM