tma_1

tma_1

Building Table Views with Phoenix LiveView: Starting code

The completed code is available, but is there somewhere to get the initial code for the application?

Marked As Solved

pullrich

pullrich

Author of Building Table Views with Phoenix LiveView

Hey folks, the author here. I’m sorry, I haven’t seen this post until now. If you have urgent matters like this, it’s always better to reach out to me via Twitter or my personal website.

Regarding the issue: The GitHub repo shows the completed code, which is the final result after you followed the book until the end. The intention is that you follow the book’s instructions and write the code yourself step-by-step. The GitHub repo is intended to show you the final result in case you only wanna see that, or to give you some help if you get lost. But feel free to create your own repo and publish the intermediary steps as well :slight_smile:

Best, Peter

Also Liked

rkachowski

rkachowski

I have the same issue, the book refers to code that is seemingly a previous iteration of what is available on github. There’s no direct means of following along with the book as the code referenced doesn’t exist.

e.g.

Open up lib/meow_web/live/meerkat_live.ex, and you’ll see our basic MeerkatLive-LiveView for displaying the meerkat data.

defmodule MeowWeb.MeerkatLive do use MeowWeb, :live_view
  alias Meow.Meerkats
  def mount(_params, _session, socket), do: {:ok, socket}
  def handle_params(_params, _url, socket) do {:noreply, assign_meerkats(socket)}
  end

  defp assign_meerkats(socket) do
    assign(socket, :meerkats, Meerkats.list_meerkats())
  end 

end

The referenced module is actually 85 lines long and doesn’t include an implementation of assign_meerkats as referenced above https://github.com/PJUllrich/pragprog-book-tables/blob/main/lib/meow_web/live/meerkat_live.ex

jmcochran

jmcochran

This problem persists with no apparent attempt to address it by the author. I find that it renders the book nearly useless. Please address this issue.

jmcochran

jmcochran

Hi Peter,

Thanks for the answer. The problem is that the book assumes an existing project to work on. If this is simply an easily generated project it would be nice to have some instructions on generating it.

Popular Pragmatic topics Top

Alexandr
Hi everyone! There is an error on the page 71 in the book “Programming machine learning from coding to depp learning” P. Perrotta. You c...
New
sdmoralesma
Title: Web Development with Clojure, Third Edition - migrations/create not working: p159 When I execute the command: user=> (create-...
New
raul
Page 28: It implements io.ReaderAt on the store type. Sorry if it’s a dumb question but was the io.ReaderAt supposed to be io.ReadAt? ...
New
conradwt
First, the code resources: Page 237: rumbl_umbrella/apps/rumbl/mix.exs Note: That this file is missing. Page 238: rumbl_umbrella/app...
New
Chrichton
Dear Sophie. I tried to do the “Authorization” exercise and have two questions: When trying to plug in an email-service, I found the ...
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...
New
brunogirin
When installing Cards as an editable package, I get the following error: ERROR: File “setup.py” not found. Directory cannot be installe...
New
brunogirin
When running tox for the first time, I got the following error: ERROR: InterpreterNotFound: python3.10 I realised that I was running ...
New
Keton
When running the program in chapter 8, “Implementing Combat”, the printout Health before attack was never printed so I assumed something ...
New
mcpierce
@mfazio23 I’ve applied the changes from Chapter 5 of the book and everything builds correctly and runs. But, when I try to start a game,...
New

Other popular topics Top

AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
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...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
AstonJ
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
PragmaticBookshelf
“A Mystical Experience” Hero’s Journey with Paolo Perrotta @nusco Ever wonder how authoring books compares to writing articles?...
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New

Latest in PragProg

View all threads ❯