Elixir Wizards S4E8 Chris McCord with a Deep Dive on Phoenix
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s4e8-mccord/
Making Audit Logs on Hex.pm Public
This post explains why Hex.pm is making its audit logs public and what kind of information you can find via these audit logs.
Swoosh 1.0
Hi all,
I just tagged v1 for Swoosh. https://github.com/swoosh/swoosh/releases/tag/v1.0.0
I hope it’s been helpful for many. Swoosh has been very stable for a very long time. So I thought, it’s about time.
REST API with Elixir/Phoenix - A beginner's tutorial
Elixir and Phoenix 1.5 tutorial that will walk you through creating a simple Bookstore REST API.
Read it on my blog: https://www.dairon.org/2020/07/06/simple-rest-api-with-elixir-phoenix
ThinkingElixir 003: Elixir 1.11 Preview with Wojtek Mach
In episode 3 of Thinking Elixir, We talk with Wojtek Mach about some of the exciting new features coming in the Elixir 1.11 release. We cover the improved recompilation process, when “alias” is preferred over “import”, improved compiler checks for structs, Erlang help docs in IEx, and much more!
REST vs GraphQL for your Elixir API
The goal here is to help you think about and consider the costs and benefits of building a REST vs GraphQL API for your next project. Technology decisions often include thinking about the trade-offs. Hopefully this can help you evaluate these two technologies and approaches.
Securing Application Webhooks in Elixir
Bernardes shares his problem-solving process and how he reached the solution of how to secure application webhooks with Elixir.
Read his full experience on our blog -> https://coletiv.com/blog/securing-application-webhooks-elixir/
Phoenix.LiveController v0.6.0 with plugs & more
A lot has happened for the Phoenix.LiveController library and its API in last weeks just as it did for Phoenix and LiveView itself - which has finally became a true first-class citizen in the framework. With that in mind and with below recent changes, it’s a great time to remind you guys that phoenix_live_controller offers an (experimental) alternative way to structure your LiveView-heavy projects.
Plugs: Live controllers may now easily organize & run reusable logic such as user auth (works great with new mix phx.gen.auth
!) or anything else - consistently regardless if mounting, handling params, events or messages. It includes a powerful conditional filtering mechanism via the when
clauses, making it easy to plug into any chosen part of the live view lifecycle.
More info & examples in “Chaining & plugs” section of docs.
Easy access to URL and session: URL and session, passed by regular live views at various moments in the lifecycle, may now be grabbed consistently and at any time via the get_current_url/1 and get_session/1 helpers.
Extra annotations: Mount opts, such as temporary_assigns
may now be specified on per-action basis via the @action_mount_opts
annotation. More info & examples in “Specifying mount options” section of docs.
But perhaps most importantly considering that I’ve taken the risk of shaping live controllers in different direction than one proposed by Phoenix 1.5 live generators, I’m doing some real battle testing developing a real-world LiveView-heavy project using this abstraction and so far it proves really efficient. I may discuss this further soon but so far I consider it an alternative worth at least taking a look - especially if, like me, you want to go all-in with live views in a way that lets you hold on to some battle-proven features of Phoenix, like plug chaining or templates & views in separate directories.
See you all on GitHub!
Headless CMS fun with Phoenix LiveView and Airtable (pt. 1)
Here is the intro of my new tutorial, Headless CMS fun with Phoenix LiveView and Airtable (pt. 1), where we are going to be building a Phoenix landing page, with realtime updates, managed from Airtable. I hope you enjoy it :)
Phoenix LiveView and Views
There are several ways to organize your Phoenix LiveView templates, and regular Phoenix views can still play a part in that. Let’s explore how templates are rendered, and some tips on where to place your template and when.
ElixirMix Podcast 097: Real-Time Phoenix, Tenant data, and user auth with Steve Bussey
In this episode of ElixirMix, we talk with Steve Bussey his book Real-Time Phoenix, his library ecto_tenancy_enforcer, and we delve into user auth. We cover how TDD works for us, approaches to partitioning user data, recent auth developments in the community and much more!
Looking for Elixir news and more content? Check out my new show Thinking Elixir Podcast!
Going from BitStream to Base2-string using Elixir
A simple module to convert any BitString into a Base2-string (“01100100”) https://dev.to/tiemen/from-bitstring-to-base2-with-elixir-2ghj
Why shouldn't you use Elixir code in database migrations?
A few words about using Elixir code in database migrations.
https://patrykbak.com/2020/06/15/why-should-not-you-use-elixir-code-in-database-migrations.html
Elixir Wizards S4E7 Amos King on MUDs, Architecture, Domain-driven design, and Military Bases
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s4e7-king/
LiveView and AlpineJS
With the recent support for AlpineJS in LiveView, the two work hand in glove together. And without having to fence-off your JS code with phx-update=ignore
. In this post we explore integrating Phoenix LiveView with JavaScript and AlpineJS.
http://blog.pthompson.org/alpine-js-and-liveview
I think a framework like LiveView has a ton to gain from something like Alpine.
Lots of small interactions don’t warrant a server-roundtrip and there are lots of other times you simply need to use JS and Alpine is the JS-swiss-army-knife for the job.
- Caleb Porzio (creator of AlpineJS and Laravel LiveWire)
Overview of Elixir for new people
As someone who follows Elixir quite closely I realized I take a lot of context for granted. I wrote up something of an overview of Elixir that I hope will be useful to people who are new to the community, ecosystem and language. It should grow with time. Let me know if I should add something.
Collecting questions for the Nerves team for Elixir Wizards Dojo
We are planning a new collaboration with ElixirConf JP, Elixir Wizards Dojo: a series of podcast episodes featuring experts and questions from the community, presented with transcripts in English and Japanese.
The first episode will be on Nerves; share your burning questions with us here: https://smr.tl/dojo-nerves-en
Or fill the form out in Japanese here: https://smr.tl/dojo-nerves-jp
More details to come!
OTP as the Core of Your Application Part 1
Take a deep dive into the Actor Model and learn how GenServers can be leveraged in unison with your Database.
File Uploads with Waffle
In this tutorial we’ll learn how to use Waffle to handle file uploads and transformations.
ThinkingElixir 002: REST vs GraphQL with Ben Wilson
In episode 2 of Thinking Elixir, We talk with Ben Wilson about REST vs GraphQL. Ben is the co-creator of Absinthe and co-author of the book Craft GraphQL APIs in Elixir with Absinthe. We cover GraphQL benefits, making requests over channels, getting versioning benefits, aggregating disparate data, challenges, the impact of macros on Absinthe, and much more!