"Northwind Elixir Traders" launched on Leanpub

“Northwind Elixir Traders” launched on Leanpub

01 April, 2024 3 min read
software, programming, Elixir, learning, Ecto, databases, book

After reading everything I could get my hands on regarding the use of Ecto and applying what I was learning in my own Elixir and Phoenix LiveView applications, I realized that even the best books, such as “Programming Ecto”, though excellent otherwise, do not reflect the way I prefer to learn.

I started writing this book to provide an alternative take to learning about Ecto, and leave no stone unturned. By not pursuing the “happy path” of how things are done correctly from the start, I decided to start my exploration of Ecto from scratch and deal with all the stumbling blocks as they arise, by trying out what I thought might work, and referring to the amazing documentation to get unstuck.

In truth, I find that this is the way most of us learn something for good; the style of this book is a reflection of that belief, from my own experience learning everything I’ve ever studied that deserves aiming for a solid understanding–and Ecto most certainly deserves this!

“Northwind Elixir Traders” isn’t your typical Ecto tutorial. Instead of pursuing the usual “happy path” reflected in the official documentation and “Getting Started” guide, we’ll dive into the complexities and nuances of database implementation, offering a refreshing exploration that goes beyond the ordinary, while also relying heavily on available sources of knowledge to understand how things work from the ground up, while also moving forward without getting caught in quagmires.

Discover the joy of experimentation as we encounter unexpected hurdles and exercize our Elixir skills in figuring out why things don’t work as expected, and how to still get things done, regardless. Through these challenges, you’ll gain invaluable insights into problem-solving and critical thinking with Elixir and Ecto.

For a curious Elixir newcomer delving into the world of building databases for a microservice, a backend, or a Phoenix or Phoenix LiveView app, the “Northwind Elixir Traders” book promises an immersive learning experience that aims to be both enriching and unforgettable.

The book was first published in a Work-In-Progress state on Leanpub , on April 1st, 2024. It will continue to be updated every week until the full envisioned scope is realized. The chapters released so far cover the creation of an application with an SQLite3-backed Ecto repository, the overview of the classic Northwind Traders database schema, the first steps of the creation of the database tables, the refinement of table schemas, and the use of schemaless changesets and validation functions.

Here is a non-exhaustive, prospective list of the topics that will be covered in chapters coming soon, some of which are already in development:

  • Changesets with schemas (up next!)
  • One-to-one, one-to-many, and many-to-one relationships between tables
  • Adding data with associations between tables
  • Queries in general
  • Queries with window functions to summarize data
  • Embedded schemas
  • Seeding the database
  • Grouping multiple repository operations
  • Enums for field values
  • Custom fields types
  • Switching to PostgreSQL