Welcome to MSDN Blogs Sign in | Join | Help

Michael Yeager's MSDN Blog

A stigmergic trail of SharePoint, asp.net and Silverlight Solutions
N-Fractal Architecture

I have to confess that since the very beginning of my software development career, I have chaffed under the yoke of N-Tier Architecture. It’s not the architecture itself that causes those big sore spots on my neck and shoulders; the problem is the way it is typically projected into the development arena. Let me explain.*

In its simplest form, N-Tier Architecture looks like a two-story building with a basement. The building can have as many stories as you like, but truth be told, the N in N-Tier is pretty much always equal to 3, 4 or 5. In this case: 2 stories + 1 basement = 3 tiers.

In the basement of our two-story building you have all the utilities that provide water, electricity and heat (the data layer). On the first floor you have a store that provides your commodities: your bread, eggs, milk, butter and juice (the business logic layer). And on the top floor is the apartment where life really goes on - where the eggs get cracked, the bread toasted and the juice poured (the user interface layer).

And that’s perfectly logical, and it works great, and software is all the better for having this underlying structure. But the problem comes when you are the one working on the UI layer trying to install the refrigerator or… the toaster.

In many projects, the way N-Tier is projected onto the build process, a toaster is not a whole toaster. It’s just the UI of the toaster. So you have that sliding lever for lowering the bread into the toaster, and a sliding switch for setting the brown level of your toast, and that’s it. If you want the rest of the toaster -- the grid that actually toasts the toast and the spring that pops the toast out at the end -- for those you have to go talk to the Business Logic woman.

So you go down to the first floor and you lay out your crazy and wild idea for a toaster to the Business Logic woman. And maybe she buys into it. Maybe she thinks toast is a good thing, and she agrees to build you your nichrome wire/mica thingy that toasts the toast. But then she explains that it’s going to have to live on the first floor. And why is that? First of all, all Business Logic lives on the Business Logic layer, not on the UI layer. And second, you can only plug into the power in the basement from the Business Logic layer, not from the UI layer. So the toaster can’t be in the apartment, it has to be on the first floor.

Ok… Alright. Well, that’s not what I had in mind. I just want a toaster. But I’m sure I can figure out some way to get the toast back up to the apartment - maybe a hole in the floor with some really big springs!

What I’m trying to get at here, is that N-Tier may look like a building, but quite often we don’t make it work like a building.

The reality that N-Tier ignores is that a toaster is an N-Tier Appliance in its own right. N-Tier Appliance? And there are a whole lot of N-Tier Appliances on all of the floors of the building. The furnace in the basement is an N-Tier Appliance: with it’s own UI, it’s own business logic, and it’s own data layer; as is the cash register in the store on the first floor; as is the toaster and the refrigerator in the second floor apartment.

And if you look inside each of the tiers of the N-Tier Appliances that are inside each tier of your building, you’ll find a whole new set of N-Tier Appliances. And inside the tiers of those Appliances, you’ll find other N-Tier Appliances**. And that’s how our simple picture of an N-Tier building summersaults right before our eyes into a fractal; and why, if we take software development to that next level beyond N-Tier, we arrive at this notion of N-Fractal Architecture.

It’s really not all that exotic. We do it already with buildings and toasters without even thinking about it.

So how does one go about implementing an N-Fractal software architecture? I'm working on it.

michael


* Some of you may be wondering why I’m talking about N-Tier architecture rather than SOA. Isn’t N-Tier so yesterday? I don’t think so. SOA is a bunch of N-Tier applications that talk to each other. N-Tier hasn’t gone away, it’s just been super-setted.

** Within the N-Fractal paradigm these are modeled as "N-Fractal Appliances".

Posted: Thursday, January 12, 2006 12:40 PM by mty
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker