A restaurant analogy for how web apps work

in #programming7 years ago (edited)

I frequently come across people who don't really know the layers of technologies that come together to  make a web application work. I explain to them that web apps, at a minimum, are results of the following three major technologies:

  • Client/browser
  • Server
  • Database

I find the 'restaurant analogy' is very effective in demystifying how web apps work. I have come across a couple of articles that tried to use the analogy to explain how web apps work. Here goes the analogy...

A client/customer sitting at a restaurant wants to order a hamburger. He calls the server/waiter and tells him he wants a hamburger. The server/waiter takes the order to the chef in the kitchen. The chef obliges and the burger is prepared. The server receives the burger from the chef and takes it to the client or the customer. The customer enjoys the juicy burger.

In the above story, you can imagine, the client/customer is the browser (can be thought of as chrome, IE or Firefox etc), the server/waiter is the actual server and the kitchen is the database. 

In a normal browser/server interaction, the browser sends a request to the server, the server handles the request, and it gets the requested data from the database and passes it to the browser in a response object.  If the requested data is not available or the request was not made properly the server responds with error messages indicating why it was not able to successfully fulfil the request. 

The interaction is based on the exchange of data among the three layers. The server sits in between to ensure the client's requests are fulfilled by either sending data to the database or forwarding requested data to the client. 


Sort:  

Congratulations @codero! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments
Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.19
TRX 0.13
JST 0.030
BTC 63749.66
ETH 3419.02
USDT 1.00
SBD 2.48