Quick Tip: n-tier actually means n-layer and layer != tier.
August 28, 2005
One of the biggest pet peeves of mine is the way our industry continually misinterprets a specific design pattern (whatever one it is) and ends up producing something much more complex than it needs to be.
Darren Gosbell provides a classic example of this in his discussion about the pros and cons of using web-services, remoting or enterprise services (COM+/DCOM) in a n-tier application.
Microsoft started promoting their DNA application model a number of years ago now and it really stuck in our collective consciousness. But the industry must have been dropping acid that day because instead of understanding and appreciating the concept of layering in application design they came away with this idea that every application should be split across three physical machines.
What the DNA application model really was all about was breaking your applications down into a set of layers, presentation, business logic and data access. The model has been tweaked over the years but thats pretty much what it is. The key difference here is that we are talking about an n-layer application not an n-tier application.
In n-layer DNA applications you still have your presentation, business logic and data access layers but you just don’t physically split them across processes and machines. In fact there is seldom cause to build an n-tier application.
One is if you have a bunch of paranoids running your IT department who have so little faith in their network infrastructure they force you unnatural splits in your application just so bits of it can sit on either side of a mis-configured firewall. Interestingly they will force their internal developers to go through hell but let a vendor walk in and plonk down a solution that doesn’t conform to this model – do I sound bitter?
My comeback for that argument these days is to ask whoever is making the architectural decision to show be the purchase order for the security expert to come in and do penetration testing on the software. Basically a hacker is more likely achieve their goals by exploiting bad code than they are the fact that an application is running all of its layers in the same process on the same physical network segment.
So my question to you Darren is – do you even need to split the application layers across tiers?
September 5, 2005 at 12:00 am
The point of my post was to comment on a recently released Microsoft whitepaper as I had recently been in the situation where I was forced into an n-tier development and I needed to find the method with least overhead for communicating between tiers.
On the question of splitting layers across tiers – I actually agree with you. I have only had to do one n-tier development, because the client was convinced they needed extra processing power and it was painful.
If anyone comes up to me again with an n-tier project they are going to have to do a lot of convincing!
September 5, 2005 at 12:00 am
Hi Darren,
I didn’t mean to be harsh
Just wanted to point out a classic mistake that gets made when designing applications.
Don’t take it personally
September 6, 2005 at 12:00 am
If you did’t want me to take it personally, you should not have quoted me by name as making a classic mistake!
Did you even read my post fully? I was mearly summarizing a Microsoft whitepaper. If you did not want to make your post personal would it not have been better to refer to the original MS whitepaper?
In answer to you question about splitting the application layer across tiers. Yes – I have had to do this when a client asked for a windows forms budgeting and planning application that had to be designed to run on a Citrix farm with an absolute minimum resource footprint. So we shifted all the calculations onto a middle tier.
Can you think of any other design pattern that would reduce the resource footprint on the presentation tier while still giving the rich UI of a thick client?
September 6, 2005 at 12:00 am
I’ll let you have the last word on this one, since my point is still valid
September 6, 2005 at 12:00 am
That is what provoked me to respond in the first place. Let me repeat myself again I AGREE WITH YOU!
I have no problems with your point, I am simply taking issue with the WAY you made your point. Without the second paragraph and the last sentence I think your post makes a perfectly valid point.
I simply fail to see how my discussion on the MS whitepaper is a “classic example” of misinterpreting a design pattern. I would appreciate it if you could enlighten me on this issue as it was not my intent to suggest that everyone should be doing n-tier development, but if did need to do it MS was now offering some direction on performance of the variaous communication options in the form of a whitepaper.
I did originally take your post personally, but I am over that now, but I am intellectually curious as to where you see me making a classic mistake.
PS. Saying that I can have the last word and then stating that your point is still valid does not actually let me have the last word does it?