Upgrading to Phoenix 1.7
To celebrate the first release of Phoenix 1.7, we’ll use Chris McCord’s upgrade guide to take an existing application to Phoenix 1.7.
Parser Combinators in Elixir: A Deeper Dive
In the second part of our two-part series, we’ll improve the parser combinator we’ve written. https://blog.appsignal.com/2022/11/15/parser-combinators-in-elixir-a-deeper-dive.html
ThinkingElixir 125: Elixir at the Royal Bank of Canada
Episode 125 of Thinking Elixir. While hearing how Elixir is being used in the Royal Bank of Canada’s Capital Markets, we learned a lot of extra things we didn’t expect! Thanos Vassilakis, head of R&D in the CM group, explained how middle managers talk about “scaling” to mean hiring staff with the goal of using all of their budgets. Not the kind of scaling we typically think about! Thanos identified the biggest problem limiting Elixir’s adoption at large financial institutions and it wasn’t what we expected. He also shared stories of how LiveView greatly out performed React when rendering hundreds of live updating financial charts and, after experimenting with it, the React devs fully adopted LiveView! Lots of great insights and stories in this one!
Elixir, OpenTelemetry, and the Infamous N+1
Alex Koutmos wrote an OpenTelemetry article for Phoenix projects by with an awesome demo repo that visualizes telemetry events with Grafana! It’s also a helpful guide on debugging performance problems like N+1 DB queries!
https://fly.io/phoenix-files/opentelemetry-and-the-infamous-n-plus-1/
Elixir, OpenTelemetry, and the Infamous N+1
Alex Koutmos wrote an OpenTelemetry article for Phoenix projects by with an awesome demo repo that visualizes telemetry events with Grafana! It’s also a helpful guide on debugging problems like N+1 DB queries!
https://fly.io/phoenix-files/opentelemetry-and-the-infamous-n-plus-1/
Simulate a bad internet connection with Phoenix LiveView
Learn how to make your LiveView app resilient against bad internet connections by simulating latency, jitter, and package loss when developing locally.
https://www.peterullrich.com/simulate-latency-jitter-and-package-loss-in-phoenix-live-view
Elixir Code Security: Prioritize Security in Your CI With 4 Tools
Improve your code security and dependency checking by getting warnings about attack vectors in an automated and actionable way.
ThinkingElixir 124: Caching Things Anywhere with Nebulex
Episode 124 of Thinking Elixir. We wanted to go deeper on the caching library Nebulex, so we visited with the creator, Carlos Bolaños, to learn what prompted its creation. Nebulex takes a couple unique approaches to things. It supports a decorator pattern to indicate that a function should be cached without having to write the boilerplate code for reading and writing to the cache. Nebulex was inspired by Ecto, in that it supports multiple adapters to different backends like Redis, Cachex and even Horde! It also supports multiple caching strategies. It’s an interesting project that aims to solve common caching challenges in new ways and we enjoyed learning more about it.
A Real-Time Phoenix LiveView App for Soccer Matches
@mssantosdev and I implemented a distributed real-time app for soccer matches as an experiment. We’ll share a post soon, but check it out what we have so far https://twitter.com/norbajunior/status/1589950754315726850?s=20&t=7jF8890I9TNlRvKXNAhpZQ
Github Actions for Elixir CI
A critical ingredient for modern development teams is a regularly run set of code checks. If it’s up to every developer to run code tests and checks locally before pushing code, you know it will be forgotten at some point. This leaves it as a problem for someone else to cleanup later. Uncool!
We want the benefits of modern Continuous Integration (CI) workflows for our Elixir projects. This guide lays out a good starting point that teams can customize to suit their needs.
The Complete Guide to Full-text Search with Postgres and Ecto
This epic article covers implementing efficient full-text search, result ranking, query modifiers, query testing, and so much more!
https://www.peterullrich.com/complete-guide-to-full-text-search-with-postgres-and-ecto
Ecto.DevLogger v0.7.0
This release is notable by adding a Ecto.DevLogger.PrintableParameter
protocol which allows printing yet not supported types and even user-defined postgrex types.
Also, it contains various small fixes.
Links:
ThinkingElixir 123: Ash Framework Models Resources
Episode 123 of Thinking Elixir. Creator of the Ash Framework, Zach Daniel, shares how he feels Ecto is such a good tool, that people haven’t built a modeling layer above it and end up using Ecto directly. Ash models a resource above Ecto, making it more expressive while supporting LiveView, REST, and GraphQL interfaces on top. While cutting boilerplate, a major goal builds in escape hatches to keep from being boxed in. Ash Framework recently celebrated a 2.0 release, accompanied by the release of the Ash HQ website. A fun look into the achievements and philosophy that make the Ash Framework what it is today!
Sanitize Strings in Elixir with Pattern Matching and Recursion
Let’s use two great features in Elixir - recursion and binary pattern matching - to sanitize a string. https://blog.appsignal.com/2022/11/01/sanitize-strings-in-elixir-with-pattern-matching-and-recursion.html
🏃♂️ Sharing strava stats with elixir and github actions
I implemented a small script that gathers Strava stats and commits weekly to my GitHub profile using GitHub actions and elixir. To know more visit: https://github.com/gilacost/gilacost/blob/master/ventures/STRAVA_SUMMARY.md
The Curse of Test Fixtures
Be extremely mindful of the API boundaries of your code. Test the boundaries and NOT the implementation.
LiveMotion v0.3.0
I just released LiveMotion v0.3.0. If you like animations, check it out. 🍿 https://github.com/benvp/live_motion
Cross Site Scripting (XSS) Patterns in Phoenix
Have you had to deal with XSS vulnerabilities in an Elixir application? Walk through four different examples of vulnerable code in this blog post.
Remote Development in Elixir with Gitpod 🍊
Remote development is getting more traction lately. However, support for Elixir and Phoenix could be better. I wrote a post on how to get up and running with Elixir and Gitpod.
https://benvp.co/blog/remote-development-in-elixir-with-gitpod