Just like all of my other courses,
this course is highly practical,
but it does not neglect the theory,
so we'll start with the basics just to make sure
that you really understand what web applications
are and how they work, the technologies used,
and how these technologies work together
to produce these platforms that we love and use every day.
So a website is basically just a web application installed
on a server, and a server is simply just a computer.
So right now we have this computer,
it could be any computer, it could be a personal computer.
And when we say it's a server,
it just has certain applications
on it that allow it to act as a server.
Now, generally, servers on the internet are accessible
from any computer on the internet,
so they're hosted on the cloud as they call them now,
and basically it has a real IP,
and then anybody connected
to the internet is able to communicate
with this computer.
Because this computer has
a specific application that allow it to act as a server,
we call it a server.
But if you strip everything down,
it's basically just a computer
with special programs installed on it.
Then we make that computer accessible over the cloud,
over the internet, which makes it very appropriate to use
as a web server or a server that can be accessed
from other computers or other locations.
Now, a very common application that could make it act
as a server is a web server.
Now, what is a web server?
It's basically an application that you can install
on any computer.
So the computer doesn't even have to be exposed
to the internet.
You can install it on your own local computer,
even if it's not connected to the internet.
It's just an application.
And what that application does,
it specifies a certain location within your file system,
and in that location you can host files.
So anybody connected to the same network as you,
or if this computer is exposed
to the internet and anybody
that is on the internet
will be able to access the files stored
within the web root or the file
that the web server uses to serve files to the users.
Now, web servers usually also contain
the web application files.
So a web application is similar to any application.
The only difference is, it's designed to run
on a web server and designed to be served
over the internet to another computer.
So the web server can execute web application languages
similar to PHP, Python, and Ruby.
So you would have the web application files stored
within the web server, 'cause like I said,
the initial goal of the web server
is to be able to serve files to remote computers
using a web browser using the HTTP protocol.
The web application files contain code,
so the website files could be images,
they could be normal HTML files,
so they don't really contain code,
but the web application files
they actually contain code written in a programming
language that can process information
and manipulate it and do useful tasks.
So it would be written
in languages like PHP, Python, Ruby, and so on.
And most websites that actually do something useful
other than websites just
that just simply display information,
like a shop website, they would actually be written
in a programming language such as these.
Now another very common component
of a website is the database.
So, the web server contains the files,
like images, styling files, HTML files,
these are all just used to display the website
to render the website,
and then you have the web application files
which is the ones run on the server side to process data.
But the data is usually stored in a different application
which is called a database.
Now the database contains a number of tables
and we have in here a sample of a table.
And we're assuming
that this table contains products that are being sold
on a shop website.
So you can see we have the ID of the products,
we have the title,
so this is an iPhone, an iPad, a mouse, and the price,
we have the price in here for each of these products.
So, the web server contains the HTML pages,
the beautiful pages that you actually see.
The ones with the, it contains the images,
so the images for the iPhones, the iPads,
the mouses that this website is selling.
It also contains a web application that interacts
with the database to display all of these products.
So the web application itself doesn't contain the products,
the product information is stored in the database.
Now, the database contains a number of tables.
This is just one example of a table,
but it'll contain tables, for example, for the users
and it'll contain the usernames and the passwords.
And then users, when they log in,
the web application will communicate
with the database to check if the username you
supplied is the same one as the password.
So it's very important to understand the role
of the database.
Web applications stored on the web server,
it just communicates with the database, gets information,
and then displays it or does something useful with it,
but the data itself is not stored on the web server,
it's not stored within the web application.
It's actually stored on the database.