Some web pages, like Google or Facebook or Salesforce and MailChimp.com,
provide more complex functionality than simply serving static pages.
They will allow the users to store data in their servers and to later fetch that
data and to do whatever the user needs to do and again submit that data back to the
server so it gets stored and saved there. Now let's say we have this web server
here, another web server that does whatever it has to do, and let's imagine that I
have this user using a web browser to access this web application.
This web application will be to store contacts. So the user will access a form with
an input here and another input for the phone number and a button that will allow
the user to create a contact in this application that manages contacts.
When the user clicks the Create button, a web request is done to the server.
A web request is done to the server, and a corresponding web response is generated
by the server to the client. Let's say -- pick another color here -- that when the
user creates a contact, something happens here server side, and then the user will
be directed to another page with the list of contacts. Let's say name and phone.
There are a lot of contacts here. When the user types a certain contact,
the data is sent to the server, and then the server will reply with the list of
contacts that already exists in that server plus the one that was just created by
the server. The point is, and this is perhaps what differentiates a web application
from a static website is that this server is storing these contacts in a database.
There's actually a database table with the contacts, these two that already existed
in the database plus the one that was just created by the user.
Another difference here in this request-response approach is the fact that although
the generated response is HTML -- let me just close the tag HTML -- there's part of
the HTML content that is static, but part of it is dynamic. In this particular case,
the list that is returned, as a consequence of this request,
would be dynamically generated by the server and sent back to the browser.
So the browser doesn't know the difference. It doesn't know if this HTML right here,
if this response is static or dynamic. This is something that the server does.
The server renders, it's called server side render. It generates the HTML and sends
it back to the web browser.