Before and after the interaction principle

Before and after the interaction:

  The so-called interactive, refers to the interaction between man and Internet user behavior to make the front page, front-end and behavior based on a request by capturing a series of actions to the background:

    1: Background received request, and returns the data corresponding to the front

    2: Background request is not received, then reception status appears not responding

Actually, this is well understood, give chestnuts:

(Please note that bold font)

  Xiao Ming go to a restaurant for dinner, he first sat in the hotel lobby in a chair, and then a short while there is a waiter holding a menu and asked him what meal points, Xiao Ming ordered sweet & sour cabbage, tofu, fish stew , and then Bob will continue to sit in a chair on waited and waited, the waiter got the menu Xiaoming point, then turned to the Houchu , this menu gives the chef , then turned away (or just wait in place, in short, does not appear in front of Bob to do before), large master to the warehouse where the material took, back into the kitchen ready to cook. While, on the dish well, and then the waiter holding good meals to eat Bob . Xiao Ming eat after a twisting walked out of the restaurant (for dinner you do not give money to feed!)

The story seems simple, but if we try to interact with the front and back together this little story will find interesting:

Xiao Ming actually refers to the user ;

Waiter means responsible for sending reception data received background data ajax / axios like asynchronous objects ;

Chef refers to the backend process request reception program ;

This means that the whole process of eating behavior browsing the web;

Hotel refers to the browser ;

Hall refers to the site front desk ;

Menu refers to a variety of users can issue a request ;

Houchu refers to the background ;

Warehouse refers to a database ;

Do the dishes refers back to the front desk of the rear end of the response data .

We can conclude that: before and after the interaction can be divided into these steps:

  a: users enter the page, and click on a link to the fore

  b: the front desk ajax target to capture this behavior of the user, and sends a corresponding request to the back-end,

  c: the rear end in response ajax request, and returns a response to the data ajax

  d: ajax the data response is returned to the front

  d: users get this link

This is the principle before and after the interaction.

the above.

Guess you like

Origin www.cnblogs.com/hjk1124/p/11422395.html