Digests » 229
Manning Publications is always looking to help developers grow. It doesn't matter what your background is, there's something for you to discover. This week, you can get 40% off your entire Manning.com order, including our range of Elixir books! Whether you're looking to pick up Phoenix or just improve your skills with the syntax, there's a way for you to boost your Elixir prowess.
this week's favorite
Using Erlangs built-in lexing and parsing libraries we can easily define restricted and safe grammars that will let your business team define simple rules in your system. Essentially offloading arbitrary business logic to the business team themselves.
Now, before creating our app, I’d like to explore the Phoenix LiveView primitives, understanding the magic behind LiveView while learning how we can build a simple counter. Once built some confidence and understood how LiveView and its life-cycle work, we’ll see, in the next article, that the gallery app is just an easy evolution of this counter.
Let's set up 3rd party Oauth so our users can log in with Google, Facebook, Twitter, Slack, Github or other services! Ueberauth is a library that makes it easy and here's a full walk-through of a Phoenix app using it to implement Google login.
I am no front-end developer by any stretch of imagination. Utility-first CSS framework thus looks quite interesting as it allows rather rapid composition of various elements. It also plays nicely with other CSS frameworks, so you can start using it without rewriting rest of your code. But this article is going to cover the green field Phoenix project wanting to use it.
GenStage is a pull-based system, where consumers pull events from the producers, and most of the documentation describes this. But it can also be used as a push-based one. The idea is straightforward, consumers register their demand with the producer, and if the producer has buffered events it will satisfy it immediately, otherwise, it keeps track of how much demand it has received. When new events are pushed into the producer it passes it on to the consumers while decreasing the demand stored in state. GenStage handles the distribution of the events automatically to the waiting consumers.