Programming Phoenix LiveView B8: Content structure

Hello,
I see most feedback in this section focuses on details, syntax errors, and small problems in the book. I would like to bring up a bigger issue, namely the fact that the book is difficult to follow, and seems to be lacking focus, clarity, and proper structure.

This is a problem on multiple levels and in multiple places, but to illustrate it, let’s talk about the content of the first four chapters.

The first chapter contains the reasonable introductory content - we start off great, talking about LiveView on page 14 and continuing to page 26. Beyond the fact that it’s - for some reason - placed before Part 1, no problems here.

But then we depart from LiveView almost entirely to talk about generators and Phoenix structure. The only place where you mention anything LiveView-specific is routes. Do we really need to talk about how to generate the authentication layer for four pages? Do we need to spend three pages exploring accounts in IEx?

In chapter 3, we use the generators to create some actual LiveView code. Exciting! Unfortunately, beyond router.ex again, there’s little LiveView there. We talk about core and boundary, tiresome and unhelpful concepts for the most part. We look at changesets and data validation, without - at any point - tying it to the subject of the book. The entire chapter feels like a 20-page long detour.

In chapter 4, we finally start talking about LiveView for real again. But even here we hop between subjects and files far more than is practical.

For example, on page 104 we have the generate_web/pento/lib/pento_web/live/modal_component.ex code snippet. It is the first time we are seeing a full snippet with a LiveView component. But instead of diving in and describing it in detail (there’s a lot in here that’s interesting), you take a detour to talk about assigns and produce another snippet instead (page 105, generate_web/*/live_helpers.ex), only to come back to the component in the briefest way possible. Is the close event (that you mention) really the most interesting thing that snippet has to offer?

Finally, this lack of clarity and focus is also apparent in the choice of phrases and words in some places. Using “Crack open” instead of simply “open” is superfluous. Saying that the snippet mentioned above is “easy” is unnecessary judgement - it certainly didn’t seem easy to me.

“Don’t worry” appears 14 times in the book. It is usually followed by a promise that “it will come together” later on. By the fifth instance, on page 42, I was already worrying quite a lot. After reading 100 pages, I can only tell you it has not come together yet. In most of these cases, “don’t worry” was followed by another detour - another subject you chose to tackle instead of LiveView.

There are more problems like this, but I hope this illustrates my point. After over 100 pages, I feel like I should be able to put together a basic LiveView, but I’m not confident I can. You cover a lot of ground, and talk about a multitude of subjects outside LiveView itself, so the book has a lot of potential. But its current structure makes for a rather frustrating reading to me.

I realize that this might seem like a lot, but I truly hope it will help make the book better in the long run. I wish you good luck!