• Melissa Whiteside

Django: The Perfect Tool for Rapid Web Development


Graham is one of the software developers here at Switch Engineering. We asked him to give us some insight into why Django is such a useful tool for rapid web development. Read the blog to learn more about Django and why you should start utilizing it in your own projects.




There is an abundance of frameworks to choose from in web programming, each with its pros and cons. You can have an excellent ORM (object relation mapping) that handles all your database changes or insane speeds. However, you must implement more basic functionality. I love using Django, a python-based web framework that holds all the heavy lifting.


Django's motto is "the web framework for perfectionists with deadlines", and it holds to that. Django is remarkably straightforward; it only takes a few minutes to get the basics of a program running, making it easy to start on the grittier details of project implementation.


Django comes with a fantastic ORM that makes database changes a breeze; it has a built-in admin web page for managing the database and has all the basic security handled from the start. The built-in admin page and web-based database management tools are essential for quickly editing an entry or checking data.


Database


PostgreSQL, Maria Db, MySQL, Oracle and SQLite are all supported on Django. My preferred development database is SQLite; it is easy to set up and manage and work seamlessly, even when continually editing different components. During the production phase, I use PostgreSQL, which is one of the most modern free, open-source SQL databases while being secure and robust. Django uses SQLite by default; by avoiding any database setups you will be able to start up much faster and get right to developing your product.


Django's ORM and handling of database models is the easiest and quickest way to set up a database out of all the web frameworks I've used.

Here is an example of a database model in Django:

Class MyModel(BaseModel):

username = CharField(max_length=255)

age = IntergerField(default=0)

email = CharField(max_length=255, unique=True)


Following this model's creation, getting it set up in your database, is just two commands; "python manage.py makemigrations" followed by "python manage.py migrate". The addition of the database model example and commands would add a new, ready to use model to the database.


File Structure


The project structure for Django is simple to understand and keeps the project clean. While it can be nice to layout a project to your preferences, having the framework plan aspects for you makes collaborating on projects or joining an existing project much more straightforward.


One of the big time sinks in web development is database setup and management. Maintaining a migration structure to keep track of new models, changed models, and deleted models add up quickly and can extend project timelines. Django simplifies this down to a few commands and a couple "classes", allowing users to focus on their front-end and logic earlier in the project resulting in a better overall end-user product.


If you are looking to develop a web product quicky that is more complicated than a simple shopfront, I would highly recommend Django for your next project.


8 views0 comments

Recent Posts

See All

(780) 664-2221

10160-103 Street, NW
Edmonton, Alberta
T5J 0X6

©2018 Switch Engineering.