Some more options have popped up these days but the workflow still used in 99% of apps is:
- Client makes HTTP request to server
- Server receives request and does something with it
- Server responds to the request
- Client receives response
Remember that your backend and frontend are 2 separately running programs on different machines.
The 2 most used ways to make your front-end communicate with the backend are:
- To communicate you could make an AJAX call (an HTTP request from your javascript)
- Complete a form (a form submission send a request to where the Action attribute points)
There are quite a few more possibilities these days but these are the ones you should probably look at first :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…