A complete guide/tutorial to Django

(Comments)

What is Django?

Django is a Python framework that make developing database driven website that can be set up in mere hours for most simple websites. The elegance of Django is that the actual coding we have to do is very less and many a boilerplate coding that every developer codes in every app is already implemented. However everything is still kept customizable and tweak-able. There is also the obvious advantage of being able to use the enormous list of Python library modules.


Django takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel. And most importantly it's completely free and open source, which means Django has a huge following with thriving and active community.



Why choose Django?

As we discussed earlier, we don't have to reinvent the wheel over and over again, nor do we have to copy paste a lot of boilerplate code that many common application development cycle needs. It already has built in modules ready to be used with just some few lines of code (in some case, as low as 1 line) and you are good to go!


Django helps you write software that is:


Flexible:
Django can be used to build almost any type of website. Be it a Content Management System or an E commerce website, or be it just a blog, or a complex Vehicle tracking web app, Django can handle it all. Also Django can deliver this content in multiple formats, viz, HTML, JSON, XML, RSS Feeds to name some.


Independent:
Although you could use the any python library from the plethora of python packages online, Django in itself is complete. In other words, Django includes everything it needs in one "product". It all works seamlessly together, follows consistent design principles, and has extensive and up-to-date documentation.


Secure:
Django helps developers avoid many common security mistakes by providing a framework that has been engineered to "do the right things" to protect the website automatically. For example, Django provides a secure way to manage user accounts and passwords, avoiding common mistakes like putting session information in cookies where it is vulnerable (instead cookies just contain a key, and the actual data is stored in the database) or directly storing passwords rather than a password hash.


Django enables protection against many vulnerabilities by default, including SQL injection, cross-site scripting, cross-site request forgery and click-jacking (see Website security for more details of such attacks).


Scalable:
Django due to its lack of dependencies on other packages and "shared nothing" architecture (each part of the architecture is independent of the others, and can hence be replaced or changed if needed), can be scaled for increased traffic by just adding hardware at any level: caching servers, database servers, or application servers. This is so due to its clear separation between each part or modules.


Coder Friendly:
Django endorses the Don't Repeat Yourself (DRY) philosophy. Django itself is written that exhibit this principle. It's design principles and patterns encourage the creation of maintainable and reusable code. Thus reducing the overall load on coder and making the maintenance cycle as easy as ABC.


Django is written in Python, which runs on many platforms. That means that you are not tied to any particular server platform, and can run your applications on many flavors of Linux, Windows, and Mac OS X. Furthermore, Django is well-supported by many web hosting providers, who often provide specific infrastructure and documentation for hosting Django sites.


Free & open source:
Django is completely free to use. It's open source too, due to which it has a huge community and active fan following. It also means that you'll never run out of pre-built library which you could append to your app and avoid having to code for every petty little thing and use what's already implemented and get on with stuff that matters.



What next?

In the blogs to come, we will set up and learn Django in-depth; the only prerequisite being that you be familiar with Python syntax. We will understand the structure, coding style and best practices on the way and crush Django to our whim!


As and when any topic is added it will be added to the Index below, from which you could navigate through the whole series of tutorials.



Index

Comments

Recent Posts

Archive

2022
2021
2020
2019
2018
2017
2016
2015
2014

Tags

Authors

Feeds

RSS / Atom