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

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

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

  • @owenwexler7214
    @owenwexler7214 4 месяца назад +15

    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 5 месяцев назад +4

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

  • @manyes7577
    @manyes7577 Месяц назад

    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  29 дней назад +1

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

  • @filipvranesevic5200
    @filipvranesevic5200 5 месяцев назад +3

    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 5 месяцев назад

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

  • @tanko.reactions176
    @tanko.reactions176 5 дней назад +1

    ah, the good old HAG stack

  • @agb2557
    @agb2557 5 месяцев назад +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 Месяц назад +1

    the best 💗

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

    Awesome content!!

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

    Appreciate you bro!!

  • @robinskills
    @robinskills 5 месяцев назад +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  5 месяцев назад +1

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

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

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

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

    Thanks for the nice tutorial

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

    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 2 месяца назад

    Thanks!

  • @alperaslan.
    @alperaslan. 12 дней назад +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  11 дней назад +1

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

  • @goldfinger490
    @goldfinger490 5 месяцев назад +4

    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.

    • @veilovv
      @veilovv 5 месяцев назад +2

      So what can you recommend?

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

      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 4 месяца назад

      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 4 месяца назад +2

      @@veilovv 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.