I recently took up a new project that is written entirely using OO concept with perl. the project has a 3-tier design that breaks the whole application into the following: 1. interface (html template) 2. businese logic (processes) 3. Action (Database interaction)

any read/write to the Db is done via the action objects. the business logic objects handle the functionalities and generates output to or accept input from the interface objects that present data to the user as well as provide input forms.

i found this a fantastic design structure as is clearly defined the scope of different layers of a web applications.

i recently learned that there are much more complex and superior design structure out there... an N-tier design.

i would like to hear the opinions of you guys on this area. Does anyone has anything/tots/resources/advices/discussion to share?

More complex doesn't necessarily mean superior - on the contrary. :) The reason you might have more than 3 tiers is mostly pragmatic. For instance, you already have some other application or busines logic that you want to rely on in your own environment, so from your own 'business logic tier', you call another business logic tier, which itself relies on a separate data tier, and you end up with a 4-tier application. Or you might need to go through some application gateway to reach the other application first, so you end up with a 5-tier application. Or you have some common request broker already (with 3 or more tiers of its own), and you want to access it from your own (interface+logic) application, and you end up with a 5-tier architecture again.

That's the kind of architecture you can end up with if you have lots of existing applications working in different environments, and you want to start linking them together for your own application. Solving stability or performance problems in this kind of environments can be quite challenging because you easily end up with 'domino effects', where a glitch in one sub-component can have totally unexpected side-effects on other components 2 or 3 tiers away.