Django way

Django way

Django at a glance 😋

Django at a glance 😋

Subscribe to my newsletter and never miss my upcoming articles

Welcome developer, in this tutorial we are going to look into what Django web framework is at a glance. By the end of this tutorial you should be comfortable with the following

  • Websites and Webpages

  • Web frameworks and Type of web frameworks

  • Django as a web framework

  • Advantages and disadvantages of using Django

  • Prerequisites needed to learn Django

Websites and Webpages

When you open your browser and type in an address in the address bar say, your computer will make a request to the address and if successful you are presented with a page, that page is known as webpage which is mostly made with HTML, CSS, JavaScript, bootstrap, and other front end framework like React, Vue, Angular and many more.

Screenshot (27).png

So what is website ❓ This is combinations of web pages which have been linked together in a certain manner through links.

Web framework

This is a piece of software which has been designed to facilitate the development of websites in the standard way with all the resources needed to ensure it's very much ready to be seen on the world wide web.

Web framework can fall into either

  • Frontend framework (React, Vue, Angular etc)

  • Backend framework (Django, Node, Flask, Laravel, Spring Boot etc)

Frontend frameworks are used to design what the site visitors or users can see on their computer while the backend frameworks are used to design the parts which are not visible to the website users/visitors like storing user's information submitted in a database (mysql, PostgreSQL, MongoDB etc).

Django Web Framework

This is a backend web framework which is built with python programming language which according to the survey for 65,000 developers conducted by stack overflow in the year 2020 is the third most loved and first most wanted language by developers.

Screenshot (30).png

Screenshot (29).png

Django web framework is an open source framework which was built in Lawrence Journal-World newsroom by Adrian Holovaty and Simon Willison to ease the creation of complex database-driven websites.

Pros and cons of Django

As with many languages, Django has it strong areas and weak areas as a backend web framework. As a Django web developer, you will enjoy the following cool features

  • Easy to learn

It is built with python programming language which is super easy to learn with its simple syntax and rich library of packages

  • Battery Included

Django comes with many features and functionality i.e a lot of stuff have been added to make development easy and thus external package needed can be incorporated easily if need be.

  • Rich Documentation

This framework has very rich documentation which can get any beginner look like a genius in few dedicated weeks 😋.

  • Admin Interface

Django also come with well packaged admin interface which is super easy to use and edit if not satisfy with the layout and style.

Screenshot (31).png

  • Immerse Scalability

When it is time for you to scale your website, there is no need to worry as Django web framework is very supportive in this area as well because it support up to 400 million+ users.

  • Web Security

Since Django was built in the newsroom, they understand the issue of web security and thus it hides the website source codes and it provides features to protect against CSRF(cross site request forgery) and XSS (Cross-site Scripting) attacks and many more web security features.

  • Template System

Django also allows the use of templates built with jinja and thus it make the development very easy as the combination of source codes of the backend can be easily interact with that of frontend.

  • Community

As an open source framework, it has rich community of volunteers who help to improve the language frequently and also for each other when needed.

  • MVT Structure

Django is structure in MVT structure where M is for model which deals with the database layer of Django, V is for Views which is for the part that connects the frontend to the framework (url routing and views functions) and T is for Template which is visible to the user/visitors of the website (HTML, CSS, JavaScripts, static files)

Did you just say wow? but before you go, these are the weak areas of Django as web framework

  • Speed

Since it is built with python, speed is also an issue with Django as it is with python when compared with other framework like Node JS

  • Monolithic

Django has it's way of ensuring the developer follow certain pattern to build the website which is not that bad when you check out various website like Youtube, Instagram, Pinterest, BitBucket, Mozilla FireFox , NASA which use Django as their main backend framework.

  • single request at a time

Django uses WSGI-based servers which is synchronous protocol and thus it can only handles one request at a time.

Prerequisite to learn Django

To find Django learning very easy and fun the following will be strongly advised to be learnt not to the point of professional

  • HTML

  • CSS

  • JavaScript

  • Python ( Most Important )


I believe you have learnt few things in this tutorial and thus don't forget to follow for more awesome articles on Django.

Share this