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.

Where Next?

Popular Pragmatic Bookshelf topics Top

jon
Some minor things in the paper edition that says “3 2020” on the title page verso, not mentioned in the book’s errata online: p. 186 But...
New
iPaul
page 37 ANTLRInputStream input = new ANTLRInputStream(is); as of ANTLR 4 .8 should be: CharStream stream = CharStreams.fromStream(i...
New
belgoros
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84: bundle exec sequel...
New
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
JohnS
I can’t setup the Rails source code. This happens in a working directory containing multiple (postgres) Rails apps. With: ruby-3.0.0 s...
New
alanq
This isn’t directly about the book contents so maybe not the right forum…but in some of the code apps (e.g. turbo/06) it sends a TURBO_ST...
New
jeremyhuiskamp
Title: Web Development with Clojure, Third Edition, vB17.0 (p9) The create table guestbook syntax suggested doesn’t seem to be accepted ...
New
brian-m-ops
#book-python-testing-with-pytest-second-edition Hi. Thanks for writing the book. I am just learning so this might just of been an issue ...
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...
New
taguniversalmachine
Hi, I am getting an error I cannot figure out on my test. I have what I think is the exact code from the book, other than I changed “us...
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
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
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
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
PragmaticBookshelf
Author Spotlight James Stanier @jstanier James Stanier, author of Effective Remote Work , discusses how to rethink the office as we e...
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New
AstonJ
If you want a quick and easy way to block any website on your Mac using Little Snitch simply… File > New Rule: And select Deny, O...
New
New
New

Sub Categories: