Go, Alpine.js & HTMX - Building a Small Todo App ( Golang )

Поделиться
HTML-код
  • Опубликовано: 6 янв 2025

Комментарии • 34

  • @owenwexler7214
    @owenwexler7214 8 месяцев назад +23

    Note: Using Alpine to handle server responses makes the raw response object data visible in the browser inspector as seen in the video and this is not always desirable (e.g. in an information aggregator app that has a lot of copycats for example) - definitely better to have HTMX handle server state in that case and to have HTML/HTMX fragments returned without any object data visible, and use Alpine to handle app state only (turning modals on and off, light mode/dark mode etc.). Very good tutorial other than that.

  • @AmoahDevLabs
    @AmoahDevLabs 9 месяцев назад +6

    Great to watch another Go tutorial from you. Thanks very much.

  • @filipvranesevic5200
    @filipvranesevic5200 9 месяцев назад +4

    Thanks for the tutorial! Can you do a follow up with adding some client side logic (like a search bar you mentioned at 11:00) and show how we can synchronise the state stored in alpine after HTMX updates the content of the page

  • @nanonkay5669
    @nanonkay5669 9 месяцев назад

    There we go, I have been waiting for someone to do this combination

  • @manyes7577
    @manyes7577 4 месяца назад

    i follow though all the step here. this is gold content. hope to see more complex go echo project with tailwind css, ui library and db

    • @bugbytes3923
      @bugbytes3923  4 месяца назад +1

      Awesome, thanks - I'll be preparing more Go soon!

  • @agb2557
    @agb2557 9 месяцев назад +2

    Awesome as always
    I'd love to see something on handling auth with go (or fastapi) and htmx (plus maybe alpine?) and how you handle sessions, or jwt etc.
    Also, how do you decide when a project already using htmx would benefit from using a proper js framework? I imagine there's a lot of overlap, e.g. I can imagine a todo list being solely htmx based

  • @gorgeouxpanjira8894
    @gorgeouxpanjira8894 4 месяца назад +1

    the best 💗

  • @robinskills
    @robinskills 9 месяцев назад +1

    I would love to see a video with Alpine Ajax with Go as well. If it's possible you can combine it with HTMX and an SQLite database.

    • @bugbytes3923
      @bugbytes3923  9 месяцев назад +1

      Thanks, I'll have a look at the Alpine-Ajax example!

  • @Tay74514
    @Tay74514 9 месяцев назад +1

    Appreciate you bro!!

  • @ltardioli
    @ltardioli 8 месяцев назад +1

    Awesome content!!

  • @MaxPorPanne
    @MaxPorPanne 9 месяцев назад

    Thanks for the nice tutorial

  • @krzysiekkrzysiek9059
    @krzysiekkrzysiek9059 9 месяцев назад +1

    Please consider doing a tutorial on how to make a Django app deploy to an offline server?

  • @danielvalencia3437
    @danielvalencia3437 7 месяцев назад

    Great video bro, one question, which do you consider is a better option to work with alpine, alpine ajax or htmx ? Thanks a lot

  • @inteliconn995
    @inteliconn995 6 месяцев назад

    Thanks!

  • @tanko.reactions176
    @tanko.reactions176 4 месяца назад +1

    ah, the good old HAG stack

  • @alperaslan.
    @alperaslan. 4 месяца назад +1

    Can you do full api crash course with go? Please not todo app. Something in real world like blog. And real life folder structure not just in main.go.

    • @bugbytes3923
      @bugbytes3923  4 месяца назад +1

      I'd like to do this, hopefully in the near future!

  • @goldfinger490
    @goldfinger490 9 месяцев назад +6

    Sorry, I have to complain about this video. This is going to be confusing and misleading for newbies. The x-data you put the json in is out of date when the tr is inserted by the htmx response. This is not a sane way to mix alpine and htmx together.

    • @danjamin123
      @danjamin123 9 месяцев назад +2

      So what can you recommend?

    • @filipvranesevic5200
      @filipvranesevic5200 9 месяцев назад

      I was thinking the same, for example, if you want to implement client side search like he suggested in the video, alpine would not be aware of newly added items in the list unless it sends the request to the backend (which is the thing he is trying to avoid in the first place)

    • @thuanquoc1231
      @thuanquoc1231 8 месяцев назад

      Yeah, I don't understand why he didn't just use range and loop through the Todos list.
      Why did he have to parse it into JSON and all that stuff? 🤔

    • @xarkorrn
      @xarkorrn 7 месяцев назад +2

      @@danjamin123 The practical solution would have been to re-load the "Alpine component" as the target with the updated complete data. The reason to mix in Alpine is to control interactivity (filtering short lists, events, etc) and instead this mixed metaphors a bit in a way that isn't intended. I think I understand his intent, but it doesn't show the intended use.