One email per week, 5 links.

Do you want to keep up to date with the latest trends of Elixir and BEAM functional programming world?

But keeping up to date with all the blogs, podcasts, and articles is time consuming so why not let someone else curate the content for you?

With our weekly newsletter you will get 5 top stories hand-picked into your inbox every Monday about Elixir, Phoenix,, and everything BEAM related.

Escape the distractions of social media and own your focus. Check out the latest issue and subscribe!

Elixir Digest#262

elixir

Elixir Processes: Testing

Thinking in processes is already difficult; writing automated tests for those processes shouldn’t make it worse. Elixir provides the necessary tooling to ensure your processes are rock solid. This article explains how to use them.

OTP as the Core of Your Application

Take a deep dive into the Actor Model and learn how GenServers can be leveraged in unison with your database.

Organizing LiveView Logic with Presentation Models

LiveViews suffer from the same neck snapping, eye darting issues as GenServers. With a GenServer you define a client API, then a server API. Check the client API for the arguments passed in. Did we pattern match on the client side? Look for handle_* to see what it does, and how it handles errors. Also, testing complex logic in GenServers is less than great. But that’s fine! We have a way to deal with this by decoupling our Boundary Layer from our core business logic, breaking them into nice, pure functions we can easily test.

Error handling in Elixir: rescue vs catch

Error handling (aka exception handling) in Elixir often manifests itself with the try and rescue keywords, which correspond to errors that are triggered using raise/1 and raise/2.

Integrating Phoenix LiveView with JavaScript and AlpineJS

A common pitch for Phoenix LiveView is it allows you to create modern reactive apps without having to write JavaScript. In large part that is true. You can create dynamic server-rendered apps all in Elixir without having to write a large portion of your app in JavaScript frameworks such as React, Angular, or Vue.js. But, even so, you will still need to write a smattering of JavaScript if you want your app to have the fit and finish of a finely crafted web app. And that makes sense, as this is exactly what JavaScript was created to do.