Is Phoenix Live View enough?

Just learning the Phoenix Live View would be enough or am I supposed to learn channels, sockets, presence etc?

:wave:

I guess the answer could be that it depends on what you mean by enough.

Back in the early days of Ruby on Rails excitement there was an image (don’t think we said “memes” at that time) that did the rounds of a big pile of Java books on various topics (Enterprise Beans, Spring, JSPs etc…) titled “All you need to know to build your Java web application”, next to a single book, the Pragmatic Programmers “Agile Web Development in Rails”, titled “All you need to know to build your Rails web application”. It was all a bit disingenuous, but I took the message as trying to convey that you can learn a bit of Rails, start building stuff, and (unspoken) continue to learn.

So I guess to start building LiveView things you’d want to know basic Elixir, Ecto (assuming you’ve a database), and LiveView. Then it’s going to be useful to start digging deeper.

5 Likes

LV is built on channels and sockets. Generally speaking it hides a lot of details from you, although it’s very clear where the seams are if you know the underlying tech.

I don’t think you need to know about channels and sockets to start using LV, but you’ll have an advantage when it comes to operationalizing code, troubleshooting, and development paradigm.

Presence is completely separate and is good to know about if you want to track concepts like “user X is viewing document Y” or other similar use cases.

4 Likes

To second @paulanthonywilson, I think you’ll find that you will always be learning more as you go (and find yourself needing to learn more in order to keep going), so just make a list of what you’re trying to build or do (i.e. get hired) and then you’ll get a better idea of what you’ll need to learn at the moment.

I came to Elixir as a pretty new programmer with only a couple years of prior experience, and as I began making Metamorphic I would find myself reading about someone else’s problem with, or solution to, something seemingly more complex than what I was currently working on and thinking, “Wow, I’m glad I don’t need to know about that” — only to find myself having to learn it shortly later to complete something else for Metamorphic.

It is an ongoing experience, the only difference is that I’m now aware that sooner or later I’ll probably be learning something that moments ago I felt was too much for me. It is an empowering and humbling realization about how little I know and how far I’ve come (and may be capable of going). :blush:

So, is Live View enough? Totally. Will it always be enough for you? Maybe not. It’s an incredible tool and as you build something you’ll probably find yourself reaching for different tools to do different things, things those tools are really good at (and you may have to learn how to use those other tools).

And to wrap up, I’ve been able to make Metamorphic as a “team of one” and full time Dad because of super tools like Elixir, Phoenix, Phoenix Live View, and Ecto. I’m able to be incredibly productive in small windows of time.

But even those tools aren’t islands, so I suggest that you make that list and jump in, and know that you may end up learning all of those things eventually (you just may not need to learn them right now).

Edit: I have the book from @sb8244, highly recommend it — it’s incredible and second what he said. Thank you @sb8244!

4 Likes