Why I use Django for developing websites

I’ve always been the PHP-type of programmer and did everything in it. However, the last year I somehow discovered Django web framework and immediately fell in love with it 🙂 I’m going to outline several reasons why I use and prefer it to other web frameworks.Django Website

Why is Django good for me?

1) It is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

It was developed to make creating websites and systems much faster, cleaner and easier. It is really pretty easy to set-up your own simple blog or a site without requiring a deep knowledge of how it works.

2) Django application (website) has a nice folder and file structure.

It is based on the MVC (model-view-controller) programming pattern and so are its files. Models are stored in models.py, views (HTML, CSS files) are stored in template subfolder and controller (in Django, views are actually templates and controller is a view) is stored in a file called views.py. You can, of course, add your own files and change the naming of them but it is recommended to follow the naming convention.

3) It ships with a powerful admin interface.

Has it happened to you that you had written a part of a website and wanted to test it, but couldn’t because of no admin interface? Here are the good news: Django has a built-in admin interface, which can be extended to do many more things that in a default mode. It can serve as a tool for your client to manage his/her posts and other things on the website.

 4) Django is built on Python programming language.

Python has been with us for a long time and has proven to be an excellent programming language for any kind of usage. It runs on Windows, Linux/Unix, Mac OS X and so on and is free to use. Django uses many good Python features which make it so powerful.

5) The community.

When choosing a framework to build websites in, it is vitally important to pick one with a large community around it. If you run in some kind of trouble or are desperately seeking for help, there will always be someone to help you. Just look on stackoverflow.com for questions tagged with the ‘django’ keyword and you’ll instantly notice that more than 31,000 questions are being asked about Django (at the time of writing this post). Another cool website is www.djangosites.org, which lists plenty of projects created with Django Web framework.

On the other hand, it may be sometimes difficult to find a Django programmer in your area. And even if you found one, he would probably want bigger salary than a PHP programmer. However, there is usually a lot of Python coders available and I think it isn’t a huge problem for them to learn the basics and more advanced topics of Django in a short period of time.

 6) Google App Engine supports Django.

Why had Google chosen Django as a Python framework and not some other one? It might be due to the fact that it simply rocks! To find out how to set-up a Django powered website on App Engine, look here.

7) It provides us with a nice console application.

After you have installed Django, django-admin becomes a tool for doing many things. Type it in your favorite shell application and read the help section for all possible commands. The very basic command is to start a new project by writing django-admin startproject project_name. It also ships with a testing server so you don’t have to use Apache or other kind of server application for development and testing purposes.

One final thought

Although Django definitely has many advantages compared to other Web frameworks, the greatest factor in choosing the right framework for you is in my opinion your language preference. Simply said, there are some people who just hate Python and love PHP but also many people who find Python superior to other languages.

I hope it helps you to decide whether or not use Django for your projects. I recommend you to give it a try at least and a week should be enough time to play with it.

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: