HTMX Is Amazing And This Is Why
Вставка
- Опубліковано 9 лип 2023
- ► Join my Discord community for free education 👉 / discord
► Exclusive Lessons, Mentorship, And Videos 👉 / anthonygg_
► Enjoy a 50% Discount on My Golang Course 👉 fulltimegodev.com
► Learn how I became a self-taught software engineer 👉fulltimegodev.com/#mystory
► Follow me on Twitter 👉 / anthdm
► Follow me on GitHub 👉 github.com/anthdm
HTMX is amazing and this is why.
SUBSCRIBE OR NO MARGARITAS
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
► Join my Discord community for free education 👉 discord.com/invite/Ac7CWREe58
► Exclusive Lessons, Mentorship, And Videos 👉 www.patreon.com/anthonygg_
► 50% OFF on my Golang course 👉 fulltimegodev.com
Thanks for watching
Glad you're covering HTMX!! Eager to see how far you can take an app, without a JS Framework. A PURE HTMX FRONTEND would be great!
Hey Anthony, just a suggestion that you can use "Ag-Grid" if you want to instead of that html/tailwind table just integrate it and pass your data as params in it has built in features like sorting searching filtering and even exporting it in CSV/excel.
It saves a lot of time implementing those features by yourself.
Thanks for teaching about the templating engine 🙇
holy hell, I was thinking about using htmx with templates for my admin dashboard 2 days ago! you're a lifesaver.
Thanks for all your videos and clear explanations. I love how organised your code always is. Do you always start with a UI/UX design or you just start with wireframes and figure the rest out along the line?
How do you create components with golang template (I see some django like syntax)? Did it cover cases where props are needed in components? Do you think about type safety on sending values to the template (intelisense would be fine)? I do not find anything to solve this issues like the SvelteKit solution.
Lekker hoor Tony!
nice content Anthony
The great thing i can see in HTMX is that it still can be rendered perfectly if the client doesn't have JS enabled if you handle the requests from client correctly!
Definitely gonna make something with this stack
But HTMX itself is a JavaScript library that runs on the client - so how would that work?
@@0M9H4X_Neckbeard if the request has some htmx-specific headers then server will know that we have JS and HTMX and can just send portions of the page.
If your anchor tag or form didn't get touched by htmx then the page will be refreshed on request and the server can just send full page.
But you need to prepare your server to work with such situation
I'm not sure if i described it correctly but i hope you understand what i mean
@@0M9H4X_Neckbeard Because it is just html with some custom attributes. The browser can handle that even without a JavaScript engine. With many other frameworks on the other hand you need JavaScript to even display anything meaningful because the HTML is usually just a div that you point the JavaScript to and the JavaScript running is what renders the application.
Sure if JavaScript is disabled htmx apps won't function but they can at least still render.
@@0M9H4X_Neckbeard it would work if the backend correctly handles both htmx and non-htmx requests. For htmx requests it responds with the fragments that partially update the page. For non-htmx requests it responds with the fully rendered page. This way if JavaScript is disabled, the app works by just doing full-page loads.
Indeed htmx seems a good project for what it offers. Hope it gets more traction 🤞
would be really cool to see more HTMX videos 🤘
Very cool concept
Will be a video setting up tailwind for go? i tried it but i dont make it work :c
Discord community covered this. Join us
amazing content Anthony, I'm glad we have you to help us around
What did you call the stack at about 0:55? BORG? BORD? BOARD? It's not clear. The tech you mention is golang, postgres, htmx, and tailwind, which spells GPHT. 🤔
Thanks!
Bored 😂
@@anthonygg_ as good a name as any. 😅
HTML becoming proper language now
UI/front-end engineers in a panic rn
@@StevenRotellias they should be
Have you heard of a markup language?
They grow up so fast 😂
what about security? how are tokens authentication etc being handled?
If we wanted to add a mobile app to this using React Native, would we need to split the routes out into api routes. How would we handle serving htmx and splitting out the api so we can have multiple platform clients calling the same backend...?
Well your backend service should have a service layer which is independent on your database and public handlers, then you can simply create 2 different routers one for the htmx and one for api. In the api routes you marshal the returned models from the service to json and in the htmx you marshal it to html
wait. WSL? how and why
is that tailwind?
Looking good
Simple and powerful tools = High throughput 🙃
I can't believe I wasn't subscribed
Nice video
Why do you call it SSL tracker? SSL was deprecated in 2015?
We just de-deprecated it.
lol
Why not just using Vanilla JavaScript at this point?