Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-HTMX branch of code to work from. #10

Open
banillie opened this issue Nov 2, 2023 · 6 comments
Open

Non-HTMX branch of code to work from. #10

banillie opened this issue Nov 2, 2023 · 6 comments

Comments

@banillie
Copy link

banillie commented Nov 2, 2023

Hi there. I'm working my way through your excellent hypermedia book and I'm wondering if there could be a non or pre-htmx version/branch of the code to work from as a starting point from which htmx could be coded into by following the steps you describe in the book? Thank you.

@mousedownmike
Copy link

@banillie, I had a similar problem, so I went ahead and implemented the application in Go with code from individual chapters separated into branches.

The full repository is here: https://github.com/mousedownco/htmx-contact-app

And the code from Chapter 03 - A Web 1.0 Application is here: https://github.com/mousedownco/htmx-contact-app/tree/Ch03-A_Web_1.0_Application

@banillie
Copy link
Author

@mousedownmike thanks for sharing. Like you I think I'll probably build it from scratch before putting in the htmx examples. I'm not v familiar with flask, so also a good way to learn some of it.

@mousedownmike
Copy link

@banillie, I struggled a little bit with the missing.css file from missing.style. The version referenced in this repository doesn't appear to exist anymore, but everything seems to mostly work with the latest version 1.1.1.

Good luck with your implementation, it is a great way to learn!

@banillie
Copy link
Author

@mousedownmike Thanks for pointing out the missing.css v helpful. plus liking the styles!

@jwithington
Copy link

jwithington commented Oct 12, 2024

This is a really good idea -- I'm following along in the book, and currently I'm in the Flask / Web 1.0 section, up to the point where they show the table layout and joke about how it's not pretty. aAt that point, they have already left a lot out, including:

  • I had to figure out how to get Flask in the first place, and where to put even the first bits of code (I had to check the final repo to understand it should go a file such as app.py)
  • I also had to look at the Flask docs to understand how to run it with a flask --app app run command
  • The first rendering of the page is styled up in the book's example, even though if you write the code they give, there's no styling
  • If you follow along to the point where you've created an index.html, the app won't work because we never defined Contact

I'm really loving the book so far (I even posted about it), but at this point in the book there's a lot of things left out -- and that's a bummer, because they are so good about explaining things that I wish they'd followed their own steps and realized what was left out.

I hope the htmx version really does go step by step.

@juanshotyou
Copy link

You can use commit c72e01d (the one before adding the HTMX delete feature) which has the Web1 version of the code as the starting point and work from there? Seems to be working, but I've not tested it fully - I'm just going through the book now and using that as the starting point.

git checkout -b web1-version c72e01d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants