Get Your CRUD Together!
summary
Argues CRUD apps for small teams benefit from a dedicated data access layer that wraps Ecto into a GenericRepo macro, uses composable Ecto queries and clear Boundaries to standardize shapes and reduce variation. Demonstrates code: repo.all/get/create/update wrappers, named bindings for joins, and returning {:ok, value} or {:error, reason} instead of nil. Targets internal apps with ~hundreds of users, claims faster time to market and fewer bugs, and warns the pattern works well from 0→1 but can be outgrown as traffic and complexity rise.
AI-written summary · about
chapters (6)
- 0:0005:45 - Intro
- 5:4610:02 - Motivations
- 10:0315:22 - The Data Access Layer
- 15:2318:50 - Patterns I Like
- 18:5125:16 - Compasable Queries
- 25:1740:57 - The GenericRepo
related talks
50mMoving away from CRUD: DDD + CQRS
41mAPPLICATION ARCHITECTURE: BOUNDARIES, OBJECT ROLES, & PATTERNS
24mThe Alchemist's Code: Bringing More Value with Less Magic
41mFrom CRUD to DDD: how did we end up here?
43mThe Clean Architecture: How to Grow From Startup to Enterprise
19mStructs for order
44mHow Do You Structure Your Go Apps?
47mElixir for curing product development pains
