Contribute Media
A thank you to everyone who makes this possible: Read More

Taming Complexity with Django

Description

In the influential paper "Out of the Tarpit", Moseley and Marks argues that "complexity is the single major difficulty in the successful development of large scale software systems". In this talk, we will analyze the major sources of "accidental" complexity a Django project faces over time, and what the major methods to deal with them are. The major tools we have in reducing complexity are reducing state and increasing abstraction skills.

The talk will start with generally accepted methods in Django software development and touch on separating a project into multiple apps, relying on managers to implement collection level functionality, making use of decorators for cross-cutting concerns and adding methods to models (but bewaring the perils of fat models). We will discuss how to separate the roles of models with mixins so that functionality can be reused across models. We will discuss how functional programming techniques can be employed in a Django project to reduce complexity.

In the second part of the talk, we will continue with another major source of complexity in Django applications: The JavaScript problem. No longer can we ignore JavaScript when discussing web projects and that covers Django too. We will briefly see how popular tools such as jQuery, Backbone and Angular try to solve this with increasing degrees of success, but do not attack the "state" problem as the major source of complexity. We will introduce Facebook's React library as the solution and how its functional programming inspired philosophy helps us to cope with this problem. We will show how this library can be used within Django in conjunction with a node.js renderer, whereby duplication of templates on server and client-side, a major source of complexity is reduced.

Details

Improve this page