Blog

Insights about the app design and development ecosystem.

Test Development Development Back-end

Behavior-driven Development: how to develop tests for a Pokédex using BDD

In this tutorial, I am going to show you how to start using BDD and will use a Pokémon Pokédex search feature as an example. BDD means Behavior-driven Development and it’s a refinement of existing TDD processes. It considers the feature behavior ahead of the development and the test processes. A system can have many behaviors, which are basically how a feature operates input, process and output.

Continue Reading

DevOps Development Back-end

Asynchronous Task Queue with Django, Celery and AWS SQS

When dealing with heavy workload functionalities that can have a big impact on web application performance, you may face the need of running it asynchronously (scheduled or not). These asynchronous background tasks can not only drastically improve the scalability of the application by moving those highly consuming operations to the background, but also improve the functionality usability. Once spread on different components, each with its own responsibility, your code can even look cleaner, more isolated and can be easier to maintain.

Continue Reading

Technical Development Back-end

White label with Django made easy

Django Framework has great out-of-the-box features that when used wisely can become powerful allies to create quick scalable solutions with less code. The Sites Framework is one of these great hidden gems, especially if you are trying to create a solution that handles multiple websites on the same application, such as White Label platforms.

Continue Reading

Development Back-end

A Phoenix Field Guide For Djangonauts

First, let me get this out of the way: this is not a Django vs Phoenix post. We at Cheesecake Labs believe polyglotism is good; it gives us options. Since the beginning, we’ve mostly been a Django shop for backend services and will continue to be for many years to come. It is a stable, fully-fledged and widely adopted framework that’s used to power a shocking amount of large applications, including many client projects that we’ve developed over the years.

Continue Reading

Tools Technical Opinion DevOps Development Back-end

What really annoys me about Django migrations

Automated database migrations have been a convenient way of dealing with schema changes for a long time in Django. It’s been only 3 years since migrations have been incorporated into Django but South had been the de-facto solution since 2008.

The same way an ORM allows us to forget about SQL when writing queries to the database, migrations make sure we don’t write a single ‘ALTER TABLE’ in our schema changes. Some may argue that’s bad: we “lose control” over a critical part of our infrastructure, we don’t know how to write SQL anymore when needed, we’re not sure how that operation is really translated into SQL, etc, etc. Ok, these points are actually valid. However, Django migrations module is more than just a way of automatically generating and applying SQL statements, it’s also a transparent API to write your own database changes in Python. It comes with wheels for those who need it (or trust enough) and tools for those who like to get their hands dirty.

Continue Reading