[Django] Developing isolated frontend and backend components

abhinavsingh


Description:

Django is the most powerful web framework for perfectionists with deadline. A typical Django project contains multiple Django applications. By design, each Django application is a monolith python module which contains all the components that an application may need e.g. frontend templates, frontend CSS & Javascript, database models, REST API, background tasks etc. A Django project is also governed by a single global settings.py file with no clear isolation between different app settings.

Django's default project and app structure works well for smaller teams but can soon become a management overhead as the team grows. A monolithic app makes it hard to develop different components of the app in isolation and can often lead to a tightly coupled codebase. In this talk, I will walk you through the above problems and then present a solution that allows for isolated app component development with isolated settings per component.

Prerequisites:

Familiarity with Django and zeal to develop decoupled app components.

Content URLs:

Possible Slides:

  1. PyCon India, Title, Date
  2. About presenter
  3. Take away from the talk:
    1. Ability to develop different components of a Django app in isolation
    2. Finally to achieve a top level Django project with just a requirements.txt and deployment related files
    3. No more messing around with a global “settings.py” file, per component “settings.py” file.
    4. Ability to enforce “Minimum access privilege” within the development team (for large and sensitive Django projects)
    5. A working example with demo app (available on GitHub after the talk)
      1. In this demo app we will build a sample PyCon website
  4. Why are we doing this breakdown of components?
    1. Take audience through our demo app version built using vanilla Django project structure
    2. Surface problems that teams will experience as project gets bigger
    3. Enforces isolation, enforces good coding practices and test coverage
  5. Lets start with a backend APIs
  6. Lets see a frontend with in-built support for SASS, Typescript, Jasmine, Karma integration
    1. Ability to customize individual node frameworks
  7. Lets see how to bring these two components together in development
    1. Possible deployment strategies for production
  8. What about web sockets? Any Django channel fans here?
    1. Let’s add a channel component to our app
    2. Include channel component in top-level project
      1. ASGI deployment strategies
  9. Questions
  10. The End, Thank You, Demo links

Speaker Info:

Abhinav Singh is a seasoned engineer and open-source evangelist. He has worked with Django for over 10+ years and has been part of planet scale projects involving Django. A former Google, Yahoo, Oracle engineer and IIT Guwahati alumni, he is currently working on a startup in stealth mode.

Speaker Links:

GitHub

Twitter

LinkedIn

Website

Section: Web development
Type: Talks
Target Audience: Advanced
Last Updated: