The rise and rise of Python

By Hagen - June 2019

While Python might get less overt hype than other programming languages, it is an under the radar, valuable workhorse for many companies, big and small.

It has also in the past few years gained a lot of traction in the scientific community, where Matlab and the like is being increasingly replaced by Python.

When it comes to systems development in Python, one typically has two choices (maybe a few more but bear with me), Flask or Django.

Flask requires you to do a lot of the setup, heavy lifting and leaves you to your own devices.

Django comes with "batteries included". I.e it is extremely opinionated in terms of how the project should be setup, how code should be written, where it should be placed and provides a lot of built in features that can be leveraged with a few lines of code. A little bit of Django code, typically give you a lot of "bang for buck".

As a systems development company that will have numerous people working on the same project, this notion of "my way or the highway" is one we value.

It "forces" developers, often of different experience and competence, to toe the line and do things in a consistent manner; moreover, this "Django way" was conceptualised by people with a lot of development and Python experience, never mind the massive community that watches the Django core code (and contributes to it) like a hawk.

Django also really prefers that you work with a traditional relational database. The way its admin system is setup requires you to build a normalised relational database - something I have advocated in numerous blog posts - and if you do, you get magic.

The better your data model, the better your Django setup will be; and this is right up our systems development alley.

With a few lines of code, you will have a fully functional administration system, letting your admins CRUD (create, read, update, delete) data to their heart's content, leveraging the built in authentication system; all with almost no time / effort from the developers point of view.

Django has also not remained idle and has very much kept up with the trends.

Trend: Using single page JavaScript apps that interface with an API

Enter Django REST Framework. Once the database is setup correctly, you get a huge amount of power (REST endpoints, Django Admin), without having to write much code at all

Trend: We all love sockets

Web Sockets are all the rage. Essentially, by using sockets, you can have data appear on the page without the page refreshing or any background polling taking place. At Lima Bean, we have had a lot of success with Django Channels, Django’s implementation of Web Sockets.

In many ways, if you build an information system in Django, you will have a high probability of a quality system

- as opposed to an un-opinionated framework, where things are much more hit and miss and more dependent on the capabilities of the individuals on the team.

And at the end of the day, time/cost is transient. Quality is what remains.