GumptionWare

GumptionWare

Programming Phoenix LiveView: Path for UserAuthLive and WrongLive modules. (Page 57)

I’m seeing auth/pento/lib/pento_web/live/user_auth_live.ext at the top of the prompt to add this module.

When I started typing this question, I thought I had found an error. Actually, I discovered that I was not following your instructions precisely. This does raise a newbie question:

I get how the top-level of the paths in this chapter is auth (because you happened to create this example project from that auth location), but I had not previously noticed the live after pento_web. I noticed that this matches the path shown on page 56 for the illustration about updating the wrong_live.ex' module--so I went back to Chapter 1 and realized that I had omitted that live` folder when I created the WrongLive module initially.

Nevertheless, my implementation is working (mostly) fine, so my newbie question is: Is this path structure (with live) a convention/idiomatic, or is it a personal choice of the developer–or is it functionally important to LiveView and I just haven’t noticed how my implementation is broken?

1 494 1

Marked As Solved

SophieDeBenedetto

SophieDeBenedetto

Author of Programming Phoenix LiveView

Hi @GumptionWare! If your live view was working even without being nested in a live folder, then I’d say that the location of live views in live/ is not technically required. It is however the proper convention and when you generate a Phoenix app with live view, you will see that the live folder is created for you.

Popular Prag Prog topics Top

sdmoralesma
Title: Web Development with Clojure, Third Edition - migrations/create not working: p159 When I execute the command: user=> (create-...
5 1082 2
New
mikecargal
Title: Hands-On Rust (Chapter 11: prefab) Just played a couple of amulet-less games. With a bit of debugging, I believe that your can_p...
22 1618 20
New
Mmm
Hi, build fails on: bracket-lib = “~0.8.1” when running on Mac Mini M1 Rust version 1.5.0: Compiling winit v0.22.2 error[E0308]: mi...
1 1213 1
New
herminiotorres
Hi! I know not the intentions behind this narrative when called, on page XI: mount() |> handle_event() |> render() but the correc...
3 1296 17
New
AleksandrKudashkin
On the page xv there is an instruction to run bin/setup from the main folder. I downloaded the source code today (12/03/21) and can’t see...
2 1425 11
New
leonW
I ran this command after installing the sample application: $ cards add do something --owner Brian And got a file not found error: Fil...
5 4327 7
New
jskubick
I’m under the impression that when the reader gets to page 136 (“View Data with the Database Inspector”), the code SHOULD be able to buil...
2 1163 8
New
nicoatridge
Hi, I have just acquired Michael Fazio’s “Kotlin and Android Development” to learn about game programming for Android. I have a game in p...
0 7910 6
New
creminology
Skimming ahead, much of the following is explained in Chapter 3, but new readers (like me!) will hit a roadblock in Chapter 2 with their ...
6 1109 5
New
dachristenson
I just bought this book to learn about Android development, and I’m already running into a major issue in Ch. 1, p. 20: “Update activity...
0 1955 6
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
144 8219 50
New
axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
38 3781 19
New
foxtrottwist
Here’s our thread for the Keyboardio Atreus. It is a mechanical keyboard based on and a slight update of the original Atreus (Keyboardio ...
9 3076 7
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
105 13994 48
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
66 20132 25
New
New
OvermindDL1
Woooooooo! This is such a huge release for it, and 2 years incoming! In short, the library is now using an updated hyper backend (not j...
20 2654 6
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
8 3154 4
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
62 6125 20
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
41 2554 20
New

Latest in PragProg

View all threads ❯