Digests » 332

this week's favorite

Chain composable queries with Ecto named bindings

Composable queries are a way of building queries to your database such that you can combine them.

Deduplicating authentication and authorization tests in Elixir and Phoenix using macros.

Writing the same tests over and over again is frustrating work. Yet that’s what happens when writing authentication and authorization tests for controller actions in Phoenix.

Memory Cached Tables for building faster web applications

Say you have 4 tables which are small enough to fit in memory, and which you read a lot from, the first thought that comes to mind is to use caching, and when someone says caching you reach for redis or memcache or some other network service. I would ask you to stop and think at this point, How would you cache in a way that is faster than redis or memcache?

You can in fact use schemas in migrations

I saw well-intended recommendations not to use schemas in migrations lately. Although the advice of switching to raw SQL is a good one, we don’t have to give up on schemas entirely.

Presenting PLDS

Phoenix LiveDashboard is helping teams to quickly visualize and identify problems in systems running in production. It has a beautiful interface and can be plugged to any Phoenix application out there.