Friday, December 5, 2008

How Our Architecture is Like McDonald's

As Andrew has described, there are three basic layers when it comes to the emerging ProTrans architecture.
  • Data: the database structure and SQL for getting information in and out of the database
  • Business: the smart part of the system in charge of making business decisions (i.e. "what needs to happen when someone tries to save a shipment?")
  • Presentation: the user interface that translates what a user wants to accomplish into actions taken on our system
Imagine a customer walks into a McDonald's. All this customer knows is that he wants a tasty Big Mac in his stomach. The cashier (who represents the Presentation layer) looks the customer in the eye and translates his order into a language that the people in the grill understand. It is the duty of the cashier to provide good customer service and handle any misunderstandings the customer has with the menu.

What the cashier hears:

"Hi, yeah I'd like a number one with a Coke. And I want this 'to go', please."

What the cashier tells the people behind the grill:
  • (1) Big Mac
  • (1) Medium Fry
The people working the grill represent the Business layer. They are smart enough to know that a Big Mac is made by adding two all-beef patties, special sauce, lettuce, cheese, etc...on a sesame seed bun. It isn't their responsibility to know what a "number one" means. Likewise, it isn't their responsibility to collect the customer's money. They simply take business requests and do all of the complicated little details to get the job done.

The freezer in the back of the store and the way it is smartly organized represents the Data layer. Whenever the grill workers need to create a Big Mac, they go to the freezer and can quickly locate the ingredients they need (all-beef patties, special sauce, etc.). This keeps the grill area uncluttered and allows people to restock the freezer as it gets low without any grillers even knowing.

Imagine if instead all of these jobs were performed by one person. It would be chaotic and inefficient as people would be running all over each other. Also new employees would be hard to train as they would have to be specialized in all parts of the system.

Keeping things separate allows you to continually improve each section independently without affecting the other parts of the business. The grill team doesn't need to know that there's a special on cheeseburgers on Wednesdays; they can just concentrate on making sandwiches as fast and as best as they can. And if McDonald's ever changes what a "number one" means, only the cashier team is affected.

2 comments:

Anonymous said...

nice...

Andrew L. Robinson III said...

So are you saying that developers and McDonalds workers are the same?!?! J/k, nicely put...good visuals, good analogy.