3-Tier

Hello,

I want to know about 3-Tier Architecture,

I know that it has,
User Interface Layer
Business Logic Layer
Database Layer.

How can i explain that to somebody in effective and simple way about each layer,

and how i can expain about each layer

can u guys give me an example please (maybe from your previous development and experience)

Guide me




Answer this question

3-Tier

  • c_shah

    Good stuff, Arnon!!

    Really appreciate it :-)



  • heimdaloz

    Hi guys,

       just a matter of conventions. Actually the architecture style you mention is known as "three-layer", and you can find a very useful intro at Three-Layered Services Application:
    http://msdn.microsoft.com/architecture/default.aspx pull=/library/en-us/dnpatterns/html/ArcThreeLayeredSvcsApp.asp

       While Three-layered applications is intended to address requirements such as maintainability, reusability, scalability, robustness, and security and can be co-located in the same infrastructure. That is, layers are logical

       Three-tier applications is a style of distributed application: Three-Tiered Distribution:
    http://msdn.microsoft.com/architecture/default.aspx pull=/library/en-us/dnpatterns/html/ArcThreeTieredDistribution.asp

       While layers are logical, tiers are physical. As a special case, we can architect applications in such a way that every layer goes to a different tier

     

       Regards



  • Simon Gittins

    Diego Dagum wrote:

    Good stuff, Arnon!!

    Really appreciate it :-)

    I am glad you like it - I have a few more papers/presentations at www.rgoarchitects.com/Papers

    Arnon



  • Giedrius Banaitis

    Hi Diego,

    I read your information you posted and would like to know if we could speak (via email and/or telephone) so that you can help me get a better understanding. I'm working on a school project, due the end of Nov. and am a little confused about the entire project. I'm trying to get anyone to do the project for me, as I'm REALLY interested in learning it myself, but I'm just so confused.

    Basically the project is to implement a model multi-tier E-Commerce solution (Client, Web Server, Application Server, and Database Server). It's other instructions, but this is the project in a nutshell. I read the information from the link you provided, and would just like to know if you'd be able to offer any additional assistance.

    Thanks so much,

    Keyia



  • netshade

    Hi;

    Nice posts Arnon & Diego. Well, I was little confused about 3-tier distribution and 3-tier services application. I think the goal of having Multi-tiered architecture is to de-couple independent modules from each other into a separation of layers. Which promotes extensibility and allow for distributed processing when needed (which I basically call: a way to scale your application).

    A good designer for the 3-tier/N-tier application should have in mind the possible future need of this physical separation. For example, You have logically separated the business and data access layer into logical tiers and cobined them into a single Windows DLL. Here, you gain the extensibility of having this logical separation and you loose the Scalability by cobining physically those 2 tiers. Now under load of users, your application need to scale and you're in a problem and you have to do 2 things: first, separate your tiers physically from each other and second is to expose your layers in a way that can be called remotely. the first thing to do should be fairly easy, for the second thing you need to decide how will you expose your layer in a way that can be called remotely which could be COM interfaces, remoting or web-services.

    As a best practice we used to have the physical and logical separation mapped as 1 to 1 or sometime 1 logical layer mapps to more than one physical component due to technology constraints. In some situations or driven by more scalability requirements.

    Let me know what you think as I see the terminologies are sometime not very clear and manytimes overlapping.

    I've obtained some definitions that I'd like to share...

    "In software engineering, multi-tier architecture (often referred to as n-tier architecture) is a client-server architecture in which an application is executed by more than one distinct software agent. For example, an application that uses middleware to service data requests between a user and a database employs multi-tier architecture. The most widespread use of "multi-tier architecture" refers to three-tier architecture. "...en.wikipedia.org/wiki/N-tier_architecture

    "In computing, Three-tier is a client-server architecture in which the user interface, functional process logic ("business rules"), data storage and data access are developed and maintained as independent modules, most often on separate platforms. "...en.wikipedia.org/wiki/N-tier_architecture_(computing)



  • WXS123

    I agree with Diego. Although the difference is subtle, it is still there. However, the meaning has been blurred since the concept was first introduced.

    The standard 3-Tier architecture is a thin-client (desktop or web-based) accessing a central server application that uses a database. So the three tiers are server, client, and dbms.



  • Blader

    ivolved_Mike_Brown wrote:

    I agree with Diego. Although the difference is subtle, it is still there. However, the meaning has been blurred since the concept was first introduced.

    The standard 3-Tier architecture is a thin-client (desktop or web-based) accessing a central server application that uses a database. So the three tiers are server, client, and dbms.

    I agree that,somehow, the meaning has been blurred but the difference is far from being subtle - crossing a tier is must more problematic than crossing a layer. Distributed systems are much more complicated see for example my paper explaining the fallacies of distributed computing http://www.rgoarchitects.com/Files/fallacies.pdf and a recent post I made on tiers : http://www.ddj.com/blog/architectblog/archives/2006/08/tier_is_a_natur.html

    Arnon



  • Anant Badgujar

    Dear All,

    Thanks for discussing about n-tier architecture.

    Though I get the flavor of this architecture, but still cannot visualize it enough for implementation. Let us think of a simple database access problem.

    Let there be a simple 'login form'. Which has 2 textbox for user input. (One for user name, and one for password--obviously) and a submit button.
    A database table having three columns: userId (primary key), userName, password.

    If the user inputs the correct user name and password a messagebox appears telling 'congratulations' (or whatever!!). Otherwise another messagebox-- telling login failed.

    Now how can one code this problem using 3 tier methodology
    Can anyone provide an article that talks the solution using step-by-step approach to this problem

    Any article that is simple enough to understand the actual coding mechanism will be of great help.

    Thanks in advance,
    regards.

    -Ishtiaque

  • mobigital

    Hi;

    n-tier architecture avoids the problems that were presented in earlier models like terminals and client-server architecture. N-tier architecture basically promotes the distribution of processing between several servers and client machines. Having this approach also make your application both extensible and scalable.

    The user of your application have a thin client application that only requires processing user interaction ith the application and communicate with the business layer to perform the actual work. This means that you do not have to buy expensive machines for your clients.

    For the business layer, you have your business components encapsulates only the business logic and if some business logic change like some calculations need to be performed in a different way, you do not have to worry about your clients.

    For the Data Access layer, it hides the database engine that's working behind the scens. So, if you decide to change the database engine you are working with, you only have to worry about your data access layer. This increases the protability of your application to support mutiple database engines.

    This was about why basically having those 3-tiers. People are going beyond those 3-tiers and start slicing their applications into more tiers to isolate the functionality of each tier and promote the re-usability of their components.

    Working with interfaces is a key to properly design your n-tier application. Interfaces work as contracts between layers, so when the contract changes the layers in touch need to change.

    I hope you find this useful.



  • Mark Guenault

    Hi Diego,

    Thanks for providing useful links.

    Thanks to MSDN.

    RAMU



  • 3-Tier