How to work with Migrations and how to insert/update data with associations

In this post I am doing an introduction on how to create migrations and how to insert data that has associations with ecto. It is a very detailed post about ecto migrations and changesets. https://thiagoramos.me/articles/how-to-use-migrations-and-insert-data-with-associations-ecto

Understanding quoted expressions, `quote` and `unquote`.

In the second post in my series on Elixir macros, I introduce the concept of a “quoted expression”, and show how to create them using quote and unquote.

https://phoenixonrails.com/blog/elixir-macros-quote-and-unquote

[Podcast] Elixir Wizards S12E02 "Discovery Discoveries" with Alicia Brindisi and Bri LaVorgna

SmartLogic’s PM Alicia Brindisi & VP of Delivery Bri LaVorgna join Elixir Wizards Sundi & Owen for “Discovery Discoveries.” It’s more than a phase—it’s the art of crafting tailored solutions, perfecting client-team synergy, and meticulous documentation.

Does discovery ever really end?

🎧 Listen: https://smr.tl/S12E2DD

📺 Watch: https://youtu.be/7Yu2zZhkZLI

SeedFactory - a toolkit for test data generation

GitHub, Docs

The main idea of SeedFactory is to generate data in tests according to your application business logic (read as context functions if you use Phoenix Contexts) whenever it is possible and avoid direct inserts to the database (as opposed to ex_machina). This approach allows you to minimize testing of invalid states, as you’re not forced to keep complex database structure in your head in order to prepare test data.

Optimum Elixir CI with GitHub Actions

Learn how we approach continuous integration at Optimum:
Optimum Elixir CI with GitHub Actions

Elixir Streams |> ♻️ Refactoring complex `else` clauses in `with` (an anti-pattern)

Love Elixir’s with clause… but it can lead to confusing else statements 😕

In Elixir’s docs, it’s called the “Complex else clauses in with” anti-pattern! ❌

Thankfully, it’s easy to improve that with some refactoring! 🥳 👇

🎥 Elixir Streams |> ♻️ Refactoring complex else clauses in with (an anti-pattern)

Thinking Elixir 195: Migrating from Next.js to Phoenix

Episode 195 of Thinking Elixir. In this compelling episode, we sit down with Ben Reinhart who shares his journey of transitioning from the JavaScript ecosystem, specifically migrating off of Next.js and Vercel, to Elixir and Phoenix, with Fly.io as the new host. Ben discusses his frustrations with the complexity and performance issues he faced, and how the switch to Elixir helped streamline operations and improve the efficiency of his AI-focused product at Axflow. He delves into his strategic choice for leveraging the operational simplicity and real-time features of Phoenix, while also acknowledging trade-offs such as rebuilding front-end components. Join us to explore Ben’s story, learn about the features of Elixir that helped him, and discover how the move has influenced Axflow’s path towards finding product-market fit, and more!

https://podcast.thinkingelixir.com/195

Survey on Refactoring for Elixir

Please answer this survey! https://www.youtube.com/watch?v=axpc7zbEOvE

What is Elixir GenServer

Check our new blog post: https://curiosum.com/blog/what-is-elixir-genserver

Lynx - A Fast, Secure and Reliable Terraform Backend in Phoenix

https://github.com/Clivern/Lynx

Want to run a simple LiveView with as less keystrokes possible?

https://hexdocs.pm/liveview_playground/0.1.1/readme.html

I wanted to give beginners an alternate path on getting started with LiveView that didn’t need a lot of setup.

  1. Copy and paste file.exs
  2. $ elixir file.exs

Done!

Content Security Policy header with Phoenix LiveView

How to set up Content Security Policy header with Phoenix LiveView and support inline styles and scripts with CSP nonces.

https://danschultzer.com/posts/content-security-policy-with-liveview

Fabulous Speaker Line Up at GigCityElixir 2024!

NervesConf and GigCityElixir - May 9-11th! Tickets: GigCityElixir.com Nestled in a valley along the Tennessee River, Chattanooga is known as Gig City for pioneering gigabit internet speed. Our community tells us that Gig City Elixir feels like home, and there’s a reason for that. We mix great speakers and excellent hospitality in a setting built to foster relationships and community.

🔔 NervesConf and GCE Training day both take place on May 9th. Training: Ash Framework (Zach Daniel and Josh Price) Training: Effective Teaching and Training Practices for Software Developers (Andrew Ek and Ruth Kohtz Ek.) NervesConf: Full day of your favorite Elixir IoT people and talks!

So whether you’re looking to deepen your knowledge of Elixir, meet like minded individuals, or simply be inspired by the vibrant tech scene, Gig City is the place to be.

Join us in Chattanooga and be a part of two conferences where programming meets community, innovation, and fun!

Tickets and details: www.gigcityelixir.com May 9-11, 2024 https://youtu.be/r8WFnnxfgYk

Easy empty states for Phoenix LiveView streams using Tailwind

When rendering a collection in LiveView using streams, we commonly want to display a special empty state when the collection is empty. It’s tricky to do this with Elixir constructs like if/else, but fortunately there’s a neat trick we can use to get the desired behavior using Tailwind CSS.

https://phoenixonrails.com/blog/easy-empty-states-for-phoenix-liveview-streams-using-tailwind

Clustering Elixir From Laptop to Cloud

Cluster the Elixir app running on your laptop to an Elixir app running on Fly.io! Can be the same or different app. Step-by-step guide created and a script to help automate the process. Works great for:

  • offloading AI/ML tasks to a machine with a GPU and develop our applications locally as normal
  • develop and debug truly globally distributed applications right from your laptop
  • And, it’s freaking cool!

https://fly.io/phoenix-files/clustering-elixir-from-laptop-to-cloud/

ElixirConf EU 2024 coming up!

Another ElixirConf EU is getting closer. If you haven’t already, check the schedule and book your ticket: https://elixirconf.eu/#schedule

Check out the training offer:: https://elixirconf.eu/#training This is your reminder about additional opportunity to upskill: training sessions with experts,​​ just before the conference.

You can choose from 4 in-person trainings: Practical testing with Elixir (and Phoenix) with Saša Jurić

Ash Framework: The Fast Track to Full Stack with Zach Daniel & Josh Price

Mastering Phoenix LiveView: Essential Insights with Łukasz Pauszek

Elixir Application Security with Michael Lubas

Bun 1.2.0 released

This new version of the Bun installer uses Bun as a process wrapper that kills the process when the stdin closes. We now use Bun to wrap Bun itself, which allows us to remove the POSIX shell dependency on development.

You are welcome to take a look at the GitHub repo and the Hex.pm package for detailed release notes and more information.

Operational Elixir: Knowing When to Grow Up

Episode 194 of Thinking Elixir. In the final installment of our series, we sit down with the creator of the Ash framework, Zach Daniel, to move beyond his expertise in Ash and explore his experiences with the other systems we use to support our Elixir applications. Zach shares his journey from the dynamic environment of startups to the structured world of midsize companies, giving us a glimpse into the strategic timing for scaling monitoring and data collection tools. He emphasizes the value of fostering a blame-free culture and sheds light on his hands-on encounters with deployments, Kubernetes, and more!

https://podcast.thinkingelixir.com/194

Elixir Streams |> ⚡️ Stream Server Logs to Console!

If you recently upgraded to phoenix_live_reload 1.5 without looking at the changelog you may have missed an awesome update.

With a small change to two files, we can stream our server logs directly to our browser’s console!

👉 Elixir Streams |> ⚡️ Stream Server Logs to Console!

Direct File Uploads to Amazon S3 with Phoenix LiveView

Let’s explore how you can upload from Phoenix LiveView directly to Amazon S3: https://blog.appsignal.com/2024/03/19/direct-file-uploads-to-amazon-s3-with-phoenix-liveview.html

Previous page Next page