1. Python

Myth busting – Is Python Enough For Web Development

Python is a super easy language to learn and also it’s dynamically interpreted so it could be easily debugged. Not only it’s easy rather it comes up with a lot of libraries using which some functionalities(of a software) could be implemented with just a click.

Owing to Python being super easy to write and read as well, a lot of people have advocated it for using in Web Development.

But there are many things which need to be kept in mind, before just jumping into and start writing scripts for Websites in Python.

When I personally started learning Python, I was just jumping around from one learning milestone to another learning milestones. Having aaahh aahhh movements whenever I finished learning a concept(like Object Oriented Python Programming). In that wave of just jumping around from one topic to another, I stumbled upon “Using Python for Web Development” and tried to use it for developing some basic websites(kind of ‘Hello World’ type). But I failed terribly because I didn’t even completely understand Web Development at that time.

So for helping you to not be in same kind of situation as I was. I have made a checklist to ensure that you have enough required knowledge to jump into ‘Using Python for Web Development’.

  • Basic Syntax of Python
  • Python Functions
  • Using or importing external modules in Python workflow
  • Object-Oriented Programming in Python
  • JSON structured data
  • Structured Query language(SQL)

I would strongly recommend learning at least basics of these concepts before moving on to Web Development using Python.

What is Web Development?

Web Development is the process of building/maintaining websites, it involves writing code for website, making it faster and user friendly.

Typically in the industry since back in old days, websites are developed using HTML, CSS, javaScript and PHP. But nowadays it’s changing many people have shifted from these simple languages to more complex/easy to use frameworks provided by these languages. For example – javaScript framework NodeJS could be used for developing websites as it already comes up with some built in functionality(for Web Development), so everything need not to be done from scratch(reduced time for Website to go live on Internet).

Server Side Code 
Client Side Code
Developing Websites Using Python Programming Language
Server/Client Side Web Development

For Websites to be able to show up on a browser, there are two types of code scripts which come into play.

  • Server-Side Code – Runs on a server where the Website is hosted
  • Client Side Code – Executed/Run by Browser itself on the User side

So for a website to be fully functional we need a combination of Server Side + Client Side code.

There exists certain languages which just run on Server SIide(like PHP) and some only on Client Side(like javaScript).

Most importantly Python is a Server side language, so what it does in most common scenario is either generate HTML code then sends it to browser(client side) or just create a javaScript file and sends it to browser which then executes(process of converting javaScript into HTML by browser) it and show a HTML rendered page.

Python for Web Development

Yes, Python could be used for developing websites, but there’s a trick – This could only be used on Server Side, the reason being most browsers don’t have capability to just execute Python Code.

Using Python Frameworks like Django for Website Development
Python for Website Development Architecture

Whilst most of browsers can execute/render javaScript or HTML code. That’s why Python code on server side could be used for generating JS/HTML code and then that code is sent to browser using HTTP requests.

Be Cautious Python is not the ‘Bread and Butter’ for Web Development.But there’s one most important scenario where Python can prove as building block for Website i.e. Dealing With Data.

If your just retrieving data or writing data to a Database quite frequently then Python could serve as a bridge between Client Side and Data base. Moreover it’s quite easy to do data manipulation using Python with help of different libraries.

Python on it’s own is very difficult to be configured on a server and is time consuming as well. So Software Developers have designed certain packages of code, which could be just imported in a workflow and their functionalities could be used. Some of these Python frameworks are –

  • Django
  • Flask
  • Web2py
  • CherryPy

Comments to: Myth busting – Is Python Enough For Web Development

Your email address will not be published.