3 ms·
I really enjoy working with Phoenix and Elixir in general, but LiveView never clicked for me. I decided to give it a try on a relatively small project, and whil
by Kaze404 5y ago
I really enjoy working with Phoenix and Elixir in general, but LiveView never clicked for me. I decided to give it a try on a relatively small project, and while it blew me away that it was easy and fast to build things, I find that the code I ended up writing is so messy and tangled that I don't really have the motivation to touch it anymore.
This isn't necessarily an issue with LiveView in particular, but it's the only experience I've had with it.
- dnautics 5y agono you're right, it takes an incredible amount of discipline to make pure LiveView code organized. I suspect Part of it is due to the "GenServers are dog's breakfast" problem that Dave Thomas complained about. I've settled on some patterns myself (https://www.youtube.com/watch?v=HA4h0cajgaA https://www.youtube.com/watch?v=HA4h0cajgaA), but I'm still not 100% on them. I wonder if frameworks like Surface ameliorate this problem.
- auraham 5y agoDave Thomas' post and talk about this. He 1) criticizes the overuse of GenServers, 2) the boilerplate code and large directory structures created by tools like mix and 3) gives a few ideas to deal with these issues. Amazing talk. https://pragdave.me/blog/2018/06/02/project-structure.html https://pragdave.me/blog/2018/06/02/project-structure.html
- dnautics 5y agoHere is the talk, queued up: https://www.youtube.com/watch?v=6U7cLUygMeI&t=730s https://www.youtube.com/watch?v=6U7cLUygMeI&t=730s Yeah, I don't agree with everything he says -- I don't think boilerplate is necessarily bad. Especially in Elixir where It's hard to explain but usually it's easy to find the meat of what you care about -- your eye (or search cursor) just lands on it. And I also think specifically the solutions he proposes are not that great. Having a common language and not inventing too many more DSLs has value, even if it sucks a bit. But a lot of that shit needed to be brought up.
- deleted 5y ago[deleted]