WEB Development basics
By: Hritu Raj Mishra
Tags: Python, Django, Web Development, Framework

WEB Development basics

The front end: Client side.

The back end: Server side.

Front-end / Client side is nothing but what you see as a user on the browser, i.e the webpage, the layout, images and the small widgets like buttons and badges.

To design the front end of any website/ web application we need

HTML: To add elements like headings, text, paragraphs to our webpage.

This is how a normal website with just plain HTML would look like:

Pretty plain and boring, isn’t it?

To make things better looking and to add colours we use something called as CSS or Cascading Style Sheets which style up out HTML page.

Here is how a HTML & CSS Website looks like:

That looks neat, but what if you want to add interactivity to your site?

How do you make your website perform some action when you click a button?

That is where JavaScript comes into picture, with JavaScript, you can interact with your website by keyboard inputs, mouse movements, clicks etc.

Once you learn HTML, CSS & JS you will be able to build an application like this:

You may accept user input, process the data from the input and give out a certain result.

Now lets talk about the backend:

Let’s assume you want to build something complex, maybe a social networking application like Facebook.

With basic knowledge of HTML, CSS & JavaScript you will be able to design a layout which looks like the Facebook homepage.

Thats all cool and fine, but where exactly would you store the user data?

Here is where database comes into picture, a database is nothing but a central repository which stores all your website data.

Database not only is used to store the data but it should also be able to retrieve the data.

For example, when you type in the URL as https://www.facebook.com/zuck, a request is sent to the Facebook’s server stating that we want data related to a person who has a username zuck.

This is what technically happens, when you type in a URL on your browser, that URL request gets sent to the server. The server then send back and appropriate response, in our case it will query the database and look for data of the said profile i.e Zuck and will send the data back to us.

When you query some other URL i.e let’s assume facebook.com/medium , it understands that we have requested for another different webpage and hence returns us back a different set of information.

But how exactly does the server know what to do with the user request?

Thats because the server is program med to handle incoming client request.

How do we program the server so that it can add and retrieve data/ communicate with the database?

Here is where Python comes into picture, with Python you can make sure that you are able to query the database for certain results and also update, delete and add data from the database.

This is called as server side programming/ backend programming.

But wait, isn’t programming a server right from scratch is a it tedious task?

It is and here is where Python frameworks like Django & Flask come into picture.

Django is a high-level Python framework which promotes rapid development.

With Django, the time taken to build a scalable web app is highly reduced and this is the reason why Django is mostly used by startups these days to build their products/prototypes.

Django not only allows you to build database oriented online web applications but also allows you to handle authentication of users, it also comes with a built in admin panel as well.

How should you start learning about making websites using Python?

Here is what I suggest, if you are already familiar with HTML, CSS & JS you may start learning Python.

Even before you jump directly into Django, you must first learn and understand Python in depth as the Django framework is based on Python.

I hope this article will make your web development journey easier