This blog is part 2 of our series on getting started with web frameworks. If you haven’t already, check out Part 1: What are Web Frameworks Used For?
You can also learn more and dive deeper in our intensive Django Course.
Video: Why Use Django?
While there are many programming languages and even more web frameworks that can help you to achieve your goal of developing for the web, this video presents you a couple of reasons why Django is a great choice:
If you prefer to read, you can see the video transcript below, and a concise conclusion at the end!
Why use Django: to build great Python web apps!
So why use Django out of all the web frameworks that exist out there?
I think that one of the main reasons really is that Django is a Python web framework, and Python is a great language to write because it’s so easily understandable and so widely used.
Maybe you already know some Python from doing data science, or maybe you’ve just started your programming journey with Python because it’s a great language to get started. But it’s also a great language to keep developing.
And Django is one of those examples. You can build very, very stable Python web apps using Django. Let’s look at a couple of points in more detail.
Strong community support
One big reason to use Django is that there is a great community around Django. Lots and lots of people use the framework for lots and lots of different websites and there’s community support, great docs, there’s answers to questions.
One of the reasons being also that it’s been around for a very long time. Django was first released in 2005. So it’s time and battle-tested. There are lots and lots of people who have developed with it and who have been using it in production web apps for a long time.
Django has “batteries included”
Another reason is that Django comes with “batteries included” – a metaphor which essentially means that everything that you need to build a complete web application already comes with the Django framework. So you don’t have to go out and buy batteries 🙂
And on the opposite spectrum of web frameworks, you would find something that’s called MicroFrameworks, with Flask being the most prominent one in the Python ecosystem. MicroFrameworks don’t have all of the bells and whistles that Django does, but they offer greater flexibility in choosing the application components you want to include. You can think of MicroFrameworks like a Lego base plate, on top of which you can put different pieces and assemble your web framework as you choose.
Django is great for beginners and experienced coders
Some people like Django’s batteries-included approach, while some prefer the MicroFramework approach. It’s a matter of taste, but I personally think that it’s a good way to get started with batteries included because there’s already so much going on when developing for the web. Having all of the necessary components and interactions cast into one framework makes it easier for beginners, because you essentially just need to learn one thing – Django – and all the other components fall into place. Django takes care of a variety of tasks, such as database interactions, for example.
Django packages & pluggable apps
In addition to all of the components already included in Django, it also has a very rich third-party ecosystem of packages built by others that you can reuse. The structure of a Django project allows you to incorporate pluggable apps, which can help reduce your workload and build projects faster. We go into deeper detail of this in our Django Course, but at a high level this means you can build an app once and reuse it in different projects, or reuse an app that someone else built in your project.
Another great reason to use Django is the Django ORM. ORM stands for object-relational mapper. This allows you to interact with a database, any database, through very understandable Python syntax, without needing to go into depth with a specific database language. You can just write Python and interact with the database.
Conclusion – Why Use Django?
As mentioned at the beginning, one of the main reasons for using Django is that it is built in Python, and Python is just all around a great language for many use cases. If you already know Python, then Django is a great way to extend the knowledge that you have in programming in general, and add web development to the list of things you know. Or if you’re getting started with web development, learning Python and Django will have a lot of use in a lot of different places!
Here’s the recap in writing on why Django is a great choice for learning web development:
- Python: First and foremost, Django is built in Python, your friendly neighborhood programming language that is easy to get started with and scales very well. It also has many applications ranging across data science, scripting, devops, web development into machine learning. It’s a useful language, not just for web development
- Community: Django has a large, active, and welcoming community, which helps to find answers more quickly and stay engaged
- Time- and battle-tested: Django has been around and in use since 2005. There are many large projects that use the framework successfully and have done so for many years
- Batteries included: Django comes with everything you need already installed, making it a great framework to learn for beginners and advanced coders
- Third-party packages: If your project is special and you need something more specific than Django’s batteries, there’s a huge ecosystem of mature third-party packages to choose from
- Pluggable Apps: Django’s structure relies on pluggable apps, which means that you can build an app for one project, and reuse it in another one
- Django ORM: You don’t need to interact with your database using SQL but can instead use Django’s in-built Object-Relational Mapper (ORM). This makes it possible to easily switch database backends without having to change your code
Want to learn more?
If you’d like to learn more about Django, click below to see our comprehensive Django online course.