In this post you will know how to make website by using python programming language. Firstly you need to understand that a website/ web application consists of two major parts.
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:
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/byluckysir, a request is sent to the Facebook’s server stating that we want data related to a person who has a username byluckysir.
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 byluckysir and will send the data back to us.
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.
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
If you are a beginner, I would highly recommend learning Python first and only then begin with Django.
No comments:
Post a Comment