I have recently started to learn Django, coming from Laravel, this was a very hard turn, the learning curve was pretty steep. It is due to this that I thought, for others coming from Laravel or just starting Django shouldn't have a hard time, and I will take time to explain various concepts.
So let's get in to it, I wouldn't want to waste your time here ☺
Concepts
- Architecture
- Requirements
- Good parts
- Conclusion
1. Architecture
Django is a framework for developing web framework. Technically it is an MVC framework though it has it own naming system.
- [M] It has the Model layer, which through its ORM(Object-Relation Mapper) it is mediated with a relation database(MySQL, SQLite).
- [V] It has a template engine for processing HTTP requests, and return html for the browser.
- [C] It has callable objects which generate HTTP response. Django calls it a VIEW, in other frameworks this is known as "Controller".
Django also comes with it's cli tool, django-admin and shell to help interact with the application.
2. Requirements
The only main requirement to develop Django applications is python3 in your machine. Other requirements are:
- Python package manager(pip)
- A database eg: MySQL. Comes with SQLite database support out of the box
- Linux or windows environment
3. Good parts
What I like about Django is:
- Python of course. The simplicity of the syntax.
- Very few boilerplate. (Coming from Laravel, I was baffled by how small footprint the new project had)
- The database migration system, the simplest and the most efficient of any framework I've used yet
- Apps. The modular nature of Django.
- Django Admin. How easy it makes the management of a simple project
4. Conclusion
Django is has a steep learning curve because of it's opinionated nature, and vastness of features, but once you find your way through, you'll find it was worth every second.