0

I've always heard about the 3 layer approach (Presentation + Business logic + Data access) and that's the way I've always worked (adding a "4" layerif I count the database itself), but I'm wondering if this is all about layer and tier architecture (I already know the difference between layer and tier), is there a 5+ tier approach?, I've also heard about the controller, service and the application tier, how does this fit on the context?

Thank you,

Juan Jimenez
  • 5,812
  • 6
  • 28
  • 37

1 Answers1

3

There can be several layers. Do not confuse layers with tiers. Article explaining the difference: http://davidhayden.com/blog/dave/archive/2005/07/22/2401.aspx

Five layers:

RIA -> ASP.Net MVC -> WebService -> Business layer -> ORM.

It simply boils down to what you need and how you implement those requirements. I would not stare me blind on layers but to make sure that everything follows Single Responsiblity principle and Don't Repeat yourself. Doing so will often lead to different layers naturally.

jgauffin
  • 99,844
  • 45
  • 235
  • 372
  • +1. To answer one of your specific questions: a service tier is much like a data access tier except that what your dealing with are services belonging to different systems rather than a database. Also, what you've called the "Business Logic" is usually implemented within the "Application Tier" as it's not UI specific: rather than just putting BL into it's own classes you're going further and putting them in their own Tier (or maybe just it's own layer - depending on how far you want to take it). – Adrian K May 04 '11 at 04:07