locked
Beginner question III - tier for windows forms application RRS feed

  • Question

  • Hello,

    I'm a client-server programmer new to III tier aproach.

    Ok, i understand benefits of III layer, dividing funtionality in diferenents components that can optionally run in differents servers, i'm learning with GoF and Fowler patterns books.
    But I don't know if i need to run layers in differents servers. The principal reason i've found to III-tier is that in client-server architecture every client hold a connection to the database, and because connection are resource intensive, system doesn't scale.Text talk about thousands of clients is imposible for client-server system.
    But nowadays ram is cheap so with and estimation of even 1mb per client connection, 2000 clients would need 2gb for the server, not much memory.
    Other reason is deployment problems but click once solves this problem.

    How many clients justify the lag of inter-process comunication of adding a new tier?

    Thanks.

    Tuesday, August 22, 2006 4:49 PM

Answers

  • Tiziano,

       just in few words, the move from Client Server to Three layers is justified when you need

    -Enable more than one channel (mobile devices, rich desktops, web access, etc) with different capabilities

    -Apply some degree of resources economy, for instance if your database license is allowed for a definite number of concurrent connections

    -You want to centralize the access of several back-end behind a sort of "Facade" (consider CRM applications that needs to access more than one database, external system). This facade is usually referred as "the middleware"

    The layers are, at least, logical, not necessarily physical. Surely the client front-ends will be in a separated layer, but the middleware usually lives in the same server as the primary database

    This books were really helpful for me:

    Smart Client Architecture and Design Guide
    http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnpag/html/scag.asp

    Application Architecture for .NET: Designing Applications and Services
    http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnbda/html/distapp.asp

     

    Hope it helps

    Saturday, August 26, 2006 8:14 AM

All replies

  • Hi,

    Today, most of the applications I work on require a browser based interface. This is even true for intranet based applications, where we definitely want a rich client for the UI features and possibly integration with outlook client, but we want a browser based view as well for travelling users.

    In such scenarios, having 3- Tier approach helps you define multiple views (browser and rich) on the same business logic with lesser effort.

    Also a 3-Tier approach will help you use HTTP Web services to communicate to server instead of direct DB connection - hence making the application work over proxies and firewalls.

    As you have pointed - when we say 3-Tier we dont necessarily mean seperate physical machine, just logical seperation. So you could still load 2 layers on the client machine and say - In case i need to ever have an App server, I know I can do it without code changes. Having a speration between biz logic layer and Presentation layer definitely makes the application more maintainable.

    I think we talk about 3 tier + thin clients eliverying all the goodness. With rich clients, the installation may go wrong - and hence you need to pay your IT department for the desktop application support. Yes - even with click once- you will find many problems like users not having admin access, they not having some required component or patch-level etc. + your application can work across internet, behind proxies and firewalls.

    Pranshu

    Wednesday, August 23, 2006 7:15 AM
  • It is more about reusability of resources ,control and maintainability.

     Let's say the organization buys 100 database connection license and there are 1000 users for the system. If you have a datatier, the same connection can be reused from the connection pool. If this datatier is hosted on a different server, any data-access related changes can be done at one place.

    It is all about input and output from different tiers.

    You can define standard interfaces for the tier access(for ex.datatier,userprocess validation etc).This can be used by variety of platforms(desktop,mobile,webclient).

    You need not worry about the other tier any more, how the data is retrieved and concentrate and optimize the current tier. These are some of the few from the list of advantages that i can think of.

     

    Friday, August 25, 2006 2:52 PM
  • Tiziano,

       just in few words, the move from Client Server to Three layers is justified when you need

    -Enable more than one channel (mobile devices, rich desktops, web access, etc) with different capabilities

    -Apply some degree of resources economy, for instance if your database license is allowed for a definite number of concurrent connections

    -You want to centralize the access of several back-end behind a sort of "Facade" (consider CRM applications that needs to access more than one database, external system). This facade is usually referred as "the middleware"

    The layers are, at least, logical, not necessarily physical. Surely the client front-ends will be in a separated layer, but the middleware usually lives in the same server as the primary database

    This books were really helpful for me:

    Smart Client Architecture and Design Guide
    http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnpag/html/scag.asp

    Application Architecture for .NET: Designing Applications and Services
    http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnbda/html/distapp.asp

     

    Hope it helps

    Saturday, August 26, 2006 8:14 AM
  • Thank you guys, helpful comments.
    Monday, August 28, 2006 8:24 PM