Curiosum Blog

Context maintainability & guidelines in Elixir & Phoenix

Context maintainability & guidelines in Elixir & Phoenix

The concept of Phoenix Context may appear straightforward, yet its potential for significantly boosting Phoenix app maintainability is profound. However, the truth is many developers grapple with its effective implementation. In this blog post, I will unveil a strategic solution for optimizing context organization, a critical step towards sustainable and efficient Phoenix app development.

Dealing with arrays in PostgreSQL

Dealing with arrays in PostgreSQL

Storing data as an array type is not as popular as for example creating another table with the association. Arrays are useful in case when you are working with array-like data. It allows for a simpler schema for one-to-many relations and avoid lookup tables. Arrays can be also faster than using external tables and relations, but only for given operations. If we need just to retrieve all data from an array, then it can be done with a single query, rather than having to perform joins. Let's see some usages of arrays!