what if we had some sort of gui in real life that you go to in your town and interact visually with the products? This entity would be by default rendered in 3d and every product would have dynamic 3d previews.
I used htmx to add a tiny bit of dynamic loading to a dictionary experiment site I was playing with. It worked great to load definitions as they scrolled into view. This video shows a great practical example of a common use case. Thanks for making and sharing this with us.
A nuance here: Web components can make htmx easier to work with, letting you define custom elements to use in your htmx responses. Svelte can optionally compile to web components, and is also the easiest web framework to learn imo. So for my projects, I write my back end in Rust, my front end in Svelte, and bridge them with htmx and custom elements.
If you are just building easy sites that only display content, have few routes and cool animation, then yeah it's pointless to use big frameworks. But when you have to build some large application with a lot of functionality then you need something more, that scale well. It's all depends on what you are trying to build.
I have for years rejected the idea that I need a JavaScript framework with its own build step to enhance the UX on my python web apps. Htmx has found a great balance in simplicity and the advanced behaviors it enables without introducing an extra build step at deploy time.
the first programming language I learned was c++. it is so painful to properly install a c++ library on windows, that you simply don't bother beyond boost (a huge collection of libraries to extend the standard library). I carried this mentality that dependencies are "expensive" over to my rust code and the experience is great. there are few black boxes I pipe between. most behaviour is just written by me and thus easier to follow.
I did BASIC as a kid, then C++. My experience was it's fun to write code in C++ but such a painful experience to configure the build process - especially once you start using libraries
With alpine-ajax or unpoly, you wouldn't even need to add the backend logic to render a partial instead of sending the whole page, except as an optional microoptimization. It just matches the target id with the matching id in the response to avoid logic related to stripping away extra html around the response. Also you can have several targets
Not a web dev, decades of experience as a dev though. Main reason for not wanting to get into web dev was JS, every time I have to use it I just hate myself. But about 6 months ago I decided to give HTMX a go, and so just used Rust for the backend, and HTMX for the front. And was seemless and easy to do everything I wanted.
I don't see what the purpose of htmx is here though. I can see it being useful if your menubar or other site parts have state, or you're running js, but on a static page like this there's no real benefit to swapping out the contents instead of loading another page. I think the latter might even feel better, full page loads are extremely fast and snappy for this kind of simple static content. I know you mention other stuff at 6:38 and those are valid use-cases, but I don't think a simple site needs to be an SPA.
I am planning and building based on my needs. My plan isn't for it to end up a static site, and I'd like to show off many more ideas using this as my base.
Why use rust to write or generate html files rather than writing html in html files and then just importing them into our rust files? Same for css and js files? I think this way is simpler and more organized
Technically could work, but for some dynamic data injected by the server before sending the response, you'd need templating Doable if you use something like EJS for it
There isn't an inherit problem with it, it was just an easy and common use case most developers can extrapolate from. Sending less data is usually pretty good though.
This is so misleading. You’re building a blog, not an actual application. You can do that with static html and css. You’re literally over complicating things by building a blog with a rust backend. Do you need for a server for a website that won’t receive user input?
My web app is basically forms, html templates, and tabs/switchers, with custom dropdowns and a few dialogs. Do I really need NextJS/React for this? We’ll find out after some prototyping…
UPDATE: yes, I probably do need NextJS for this app, for two major reasons: pagination and search filters. These are doable without a framework but so much hackery and workarounds are needed that the codebase becomes unmaintainable very quickly.
When I first heard of HTMX I thought: "Hey, that's not the worst idea I've heard of. Can't be worse than React." Then I looked at the horrible design patterns it encourages and the amount of shilling it gets from devs showing basic goddamn webpages,.... and I was very quickly convinced otherwise. Yeah, you don't need Angular and 7000 dependencies to display a couple blog posts, no shit sherlock, you also don't need HTMX for that. Show me how you implement something that's more complex than a webpage from the 90s and it's very apparent how HTMX is just not up to the task.
Fr it’s like saying “you don’t need a gun to protect yourself” which is true in most cases, but then proves it by walking in rich gated community, while still wielding a knife. Lmao if you know what I mean
I’m making a more complex site with htmx and to make it work, I’m also using a bit of Svelte. Although it’s not all forms and lists, a lot of it essentially is, and htmx is useful there. I also use web components to make my htmx responses more concise and easier to write. Those components are actually also written in svelte, which can compile to them. So ultimately, although we indeed have a separate front end and back end, the front end still doesn’t have to parse any json; it just renders what it gets.
You still have a dependency for your backend framework, while in GO all you need is in the standard library (http server, routing, templating) and it compiles to a single binary.
Just different philosophies for different languages. It is more of a question of semantics here. Rust tries to be more open, that's it, it won't put these thing on the std because they don't seem fit to Rust developers and the std lib should be smol
There's nothing inherently wrong with dependencies. Dependency hell & needlessly complicated handling, and by extension, unnecessary bloat, are the core issues.
I used HTMX because it does what I need it to do. Alpine.js doesn't do what I need it to do. I wanted server side rendering, with simple hooks on the front end to do what I need it to do, which is update the page with new data from the server.
6 years of experience and you have been making sweeping statements... There are always a right tools for the job. (Your viewpoints seem too narrow) HTMX is new and it is harder to make client facing sites. HTMX for internal tools yes. HTMX for client facing site nope. Stop making controversial vids for the sake of being different.
fr it feels like this video was made by an edgy teen, trying hard not to follow standards and be different. Kinda like that one guy that wanted to tell us OOP is bad lol.
Resume of this video: Reject Angular, because Angular is Modernity, Angular is a Framework, Angular is root of evil, do you still want to use Angular ? Solution: Use Rust because Rust is Cool, All coolest programmers uses Rust, use Libraries, yeah libraries like Htmx, the best programmers uses trust me bro. - But, who will provide maintenance ? - Bro, just trust. ~ 6 month after, you are unemployed. Thanks Bro 🤝!!!!
There's a whole lot of us that can't understand what you are saying. Don't artificially speed up your audio, speak slower, and research and practise how to speak more clearly 🤷
For real though, why not just ditch browsers and use curl. No more front-end problems. No more interactive websites. Just plain terminal text.
what if we had some sort of gui in real life that you go to in your town and interact visually with the products? This entity would be by default rendered in 3d and every product would have dynamic 3d previews.
curl is pretty awful to use for browsing, i'd look towards something like elinks or similar instead
Just flash your ship's lights across the foggy sea. Just talk into a cup on a string.
@@pluto8404 that would be ridiculously expensive to main.
@Zedv.0.0.1OP is obv being sarcastic.
Just what I was thinking. HTMX showed us that we don't need gatekeepers like React.
Htmx 🤝 Rustaceans
Wearing programmer socks
I used htmx to add a tiny bit of dynamic loading to a dictionary experiment site I was playing with. It worked great to load definitions as they scrolled into view. This video shows a great practical example of a common use case. Thanks for making and sharing this with us.
A nuance here: Web components can make htmx easier to work with, letting you define custom elements to use in your htmx responses. Svelte can optionally compile to web components, and is also the easiest web framework to learn imo. So for my projects, I write my back end in Rust, my front end in Svelte, and bridge them with htmx and custom elements.
404 Subscribers Not Found
XDD Nice catch
If you are just building easy sites that only display content, have few routes and cool animation, then yeah it's pointless to use big frameworks. But when you have to build some large application with a lot of functionality then you need something more, that scale well. It's all depends on what you are trying to build.
I feel like people just don't want to understand browser apis when they use frameworks
I have for years rejected the idea that I need a JavaScript framework with its own build step to enhance the UX on my python web apps. Htmx has found a great balance in simplicity and the advanced behaviors it enables without introducing an extra build step at deploy time.
the first programming language I learned was c++. it is so painful to properly install a c++ library on windows, that you simply don't bother beyond boost (a huge collection of libraries to extend the standard library).
I carried this mentality that dependencies are "expensive" over to my rust code and the experience is great. there are few black boxes I pipe between. most behaviour is just written by me and thus easier to follow.
I did BASIC as a kid, then C++. My experience was it's fun to write code in C++ but such a painful experience to configure the build process - especially once you start using libraries
With alpine-ajax or unpoly, you wouldn't even need to add the backend logic to render a partial instead of sending the whole page, except as an optional microoptimization. It just matches the target id with the matching id in the response to avoid logic related to stripping away extra html around the response. Also you can have several targets
I haven't been able to justify fully plunging in and trying HTMX but this video might have convinced me.
Dew it
In my opinion Vue can be just as simple. I use it directly on my HTML page so I don't need to use npm or webpack.
Not a web dev, decades of experience as a dev though. Main reason for not wanting to get into web dev was JS, every time I have to use it I just hate myself. But about 6 months ago I decided to give HTMX a go, and so just used Rust for the backend, and HTMX for the front. And was seemless and easy to do everything I wanted.
I don't see what the purpose of htmx is here though. I can see it being useful if your menubar or other site parts have state, or you're running js, but on a static page like this there's no real benefit to swapping out the contents instead of loading another page. I think the latter might even feel better, full page loads are extremely fast and snappy for this kind of simple static content.
I know you mention other stuff at 6:38 and those are valid use-cases, but I don't think a simple site needs to be an SPA.
I am planning and building based on my needs. My plan isn't for it to end up a static site, and I'd like to show off many more ideas using this as my base.
Everyone wants to build SPAs because you're not cool if you don't!!!!
man i actually wanted to start a youtube channel on exactly this topic
but awesome vid man!
Hahahaha XD Whoops
Thanka :)
See guys what Angular does to you
"When will you learn, that your actions have consequences!"
You just made me switch from leptos to axum + maud + htmx (and some other project-specific dependencies)
Are you proud of yourself?
Htmx boosting might have been easier? No backend changes needed.
...Welp, time to throw out my personal website codebase for the THIRD time.
It do be like that
Why use rust to write or generate html files rather than writing html in html files and then just importing them into our rust files? Same for css and js files? I think this way is simpler and more organized
Well if it is a little more dynamic and you need to show data from the backend you‘d have to use templating so yeah
Technically could work, but for some dynamic data injected by the server before sending the response, you'd need templating
Doable if you use something like EJS for it
Fantastic video! Subbed and hit the bell. Looking forward to the next video!
Keep the rust videos coming. Would love a more advanced example (animations, managing state)
Question: What's so bad about loading a page when the user clicks a link? Or was that mostly intended as a super-simple example?
There isn't an inherit problem with it, it was just an easy and common use case most developers can extrapolate from. Sending less data is usually pretty good though.
I feel like this is a video for your boss, but thanks for the information 👍
This is so misleading. You’re building a blog, not an actual application. You can do that with static html and css.
You’re literally over complicating things by building a blog with a rust backend. Do you need for a server for a website that won’t receive user input?
My web app is basically forms, html templates, and tabs/switchers, with custom dropdowns and a few dialogs. Do I really need NextJS/React for this? We’ll find out after some prototyping…
UPDATE: yes, I probably do need NextJS for this app, for two major reasons: pagination and search filters. These are doable without a framework but so much hackery and workarounds are needed that the codebase becomes unmaintainable very quickly.
I’m a 4th year cs major, doing an internship rn. Did you also have an internship, and did you return to work full time after graduation?
following
The complexity of the modern web is due to the framework industrial complex.
nice introduction for me
When I first heard of HTMX I thought: "Hey, that's not the worst idea I've heard of. Can't be worse than React."
Then I looked at the horrible design patterns it encourages and the amount of shilling it gets from devs showing basic goddamn webpages,.... and I was very quickly convinced otherwise.
Yeah, you don't need Angular and 7000 dependencies to display a couple blog posts, no shit sherlock, you also don't need HTMX for that. Show me how you implement something that's more complex than a webpage from the 90s and it's very apparent how HTMX is just not up to the task.
Fr it’s like saying “you don’t need a gun to protect yourself” which is true in most cases, but then proves it by walking in rich gated community, while still wielding a knife. Lmao if you know what I mean
I’m making a more complex site with htmx and to make it work, I’m also using a bit of Svelte. Although it’s not all forms and lists, a lot of it essentially is, and htmx is useful there. I also use web components to make my htmx responses more concise and easier to write. Those components are actually also written in svelte, which can compile to them. So ultimately, although we indeed have a separate front end and back end, the front end still doesn’t have to parse any json; it just renders what it gets.
@@Holobrine Thanks proving my point, I guess?
2:28 - Get them socks ready. Fuck yes programming socks. I've got mine already... they shrunk in the wash tho :(
I watched the previous video because I have a static website I had not maintained in years.
You still have a dependency for your backend framework, while in GO all you need is in the standard library (http server, routing, templating) and it compiles to a single binary.
Just different philosophies for different languages. It is more of a question of semantics here. Rust tries to be more open, that's it, it won't put these thing on the std because they don't seem fit to Rust developers and the std lib should be smol
There's nothing inherently wrong with dependencies. Dependency hell & needlessly complicated handling, and by extension, unnecessary bloat, are the core issues.
Yep. Agree with @dank3k , this isn't about choosing zero dependencies, it's about picking the right ones and choosing your battles wisely.
@@dank3knice username 👍🏾😎
why use htmx when u can just use alpinejs?
I used HTMX because it does what I need it to do. Alpine.js doesn't do what I need it to do. I wanted server side rendering, with simple hooks on the front end to do what I need it to do, which is update the page with new data from the server.
6 years of experience and you have been making sweeping statements...
There are always a right tools for the job. (Your viewpoints seem too narrow)
HTMX is new and it is harder to make client facing sites.
HTMX for internal tools yes. HTMX for client facing site nope.
Stop making controversial vids for the sake of being different.
fr it feels like this video was made by an edgy teen, trying hard not to follow standards and be different. Kinda like that one guy that wanted to tell us OOP is bad lol.
Telling people what to do on the internet 👏
Resume of this video:
Reject Angular, because Angular is Modernity, Angular is a Framework, Angular is root of evil, do you still want to use Angular ?
Solution: Use Rust because Rust is Cool, All coolest programmers uses Rust, use Libraries, yeah libraries like Htmx, the best programmers uses trust me bro.
- But, who will provide maintenance ?
- Bro, just trust.
~ 6 month after, you are unemployed. Thanks Bro 🤝!!!!
go go go zig zig zig!
would've been nice if you could share some source code as well
But... How to do routing ?
For request routing I showed this more in my last video.
switch your simulated internet speed to 3g and compare to a react app
JavaScript still loading to this day
@@jakubdoka8623 I'd much rather a slightly longer loading time than deal with a stutter every time you click a button
especially with how much work has been done recently bringing the bundle size of JS down
Ahh yes, the femboy recommending rust.
as an aspiring goth femboy myself (im still too fat lol) I'm learning rust
This would be nice if you didn't used HTMX.
Why?
I really think your content is valuable, but the background is killing my sanity and i stopped watching at 4:34 - forgive me. 😅
Oh? Any ideas for improvement?
Destiny is a girls name. Amazin'
Don't need to watch the video to like, comment and subscribe. Great title.
Subscirbe to this Destiny Hailstorm guy!
Angular is trash. Try Solid js.
Did you even watch the video lil bro?
@@someidiot6359 No
@@pinatacolada7986 lmao
rust with htmx is a gigachad move. I'm just a next js soy boy
There's a whole lot of us that can't understand what you are saying. Don't artificially speed up your audio, speak slower, and research and practise how to speak more clearly 🤷
Just use php
yo