Confident Asset Deployments with Webpack & Django, Part 1

Confident Asset Deployments with Webpack & Django, Part 1

Django

 

A few weeks ago I had the pleasure to present to DjangoCon US 2016 about how the technology team at Stratasan delivers front-end assets. We've honed this process over the course of a year and are happy with the flexibility and simplicity it allows us. We believe providing concrete examples taken from our codebase will benefit the community.

You can find my slides here.

 

A brief primer

Any modern, interactive web application is built in two parts: the back-end and front-end. The back-end runs on invisible servers and implements the majority of the business logic. Back-ends can be written in a variety of languages. At Stratasan we proudly use Python and Django as our web framework. Django provides a large number of tools around building websites and lets us focus on our business.

The front-end consists of code that is executed in the browser when a user visits the application (we'll call this “making a request”). The back-end generates a response (usually in HTML) that includes it in directives telling the browser to download various other files that implement everything a user sees, hears and interacts with. These files are primarily the CSS and Javascript assets of the application.

CSS is used to control the appearance and style of the application and defines the look and feel of everything from page backgrounds to the shading of buttons. Javascript is the primary means to adding interactivity to web applications and is used increasingly more to deliver rich experiences for users.

Playing nicely together

The purpose of the talk is two-fold. First, as Django developers, we must adapt to communities that provide powerful tools for developing web applications. Django, having just celebrated its 10th birthday, is a relatively stable technology. The Javascript community is in a period of explosive growth with new frameworks and ideas forming seemingly every day. Instead of layering these tools beneath Django, we believe they should coexist separately and communicate through simple bridges.

 Second, technology teams no longer are only comprised of back-end developers but also include front-end developers and depending on the size of the application, operations engineers who focus on the stability of the application and invisible tooling that makes everything happen. Given this, we should strive for workflows that make sense to everyone, minimize the chance for downtime and make it as easy as possible for all team members to deploy new features.

Coming up...

In the next few posts, we'll describe (in full technical glory) our process for bundling assets, how we tie that into our main Django application and a few little niceties we've built into our deployment process to help our team be as confident as possible we deploy new features to our customers.

Article by Scott Burns, VP of Engineering for Stratasan

Connect with Stratasan on LinkedIn or follow Stratasan on Twitter and Facebook.

app application Blog code coding CSS developer devolopers Django DjangoCon engineer Engineering health care healthcare interactive Javascript technology web