Most Web applications share a basic architecture consisting of three basic tiers:
An Application layer - process business logic, like accepting orders or choosing content to display.
A Back-end data store - that holds persistent information and provides access to it based on privileges and rules.
A good metaphor is to describe these roles in the Café’ scenario.
The Web Server is the Waiter. When a customer places an order, the waiter goes off and returns it. He can return something "static" like a
fork, or he can return something "prepared" on demand, such as a ham and cheese sandwich.
The Application layer is the Cook. He or she accepts requests from the waiter to prepare something on behalf of a diner, and may need to
consult other resources to get information on how to prepare the dish.
The Database serves as the Cookbook. It stores recipes and organizes them by category and index.