Web Frameworks (And why you don't need one)
Вставка
- Опубліковано 27 гру 2024
- Web frameworks. Love em or hate em they have become a staple of the modern web. Everything from UA-cam, Facebook, to Discord. The user facing backbone that makes our experiences across the web more interactive and polished than ever before.
But I'm here to tell you, you don't need one.
The site I showed: blog.transrigh...
Discord: / discord
Mastodon: social.transri...
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
404 Subscribers Not Found
XDD Nice catch
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.
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.
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.
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!!!!
You just made me switch from leptos to axum + maud + htmx (and some other project-specific dependencies)
Are you proud of yourself?
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.
See guys what Angular does to you
"When will you learn, that your actions have consequences!"
Htmx boosting might have been easier? No backend changes needed.
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
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
Fantastic video! Subbed and hit the bell. Looking forward to the next video!
I haven't been able to justify fully plunging in and trying HTMX but this video might have convinced me.
Dew it
man i actually wanted to start a youtube channel on exactly this topic
but awesome vid man!
Hahahaha XD Whoops
Thanka :)
...Welp, time to throw out my personal website codebase for the THIRD time.
It do be like that
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?
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
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.
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 🤝!!!!
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.
HTML, CSS, and a random Javascript markdown renderer I found is my go to for making websites.
2:28 - Get them socks ready. Fuck yes programming socks. I've got mine already... they shrunk in the wash tho :(
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’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
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.
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 👍🏾😎
Imagine using a dependency to make a web server. (This post was made by a C developer)
I feel like this is a video for your boss, but thanks for the information 👍
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 👏
nice introduction for me
The complexity of the modern web is due to the framework industrial complex.
But... How to do routing ?
For request routing I showed this more in my last video.
would've been nice if you could share some source code as well
go go go zig zig zig!
I watched the previous video because I have a static website I had not maintained in years.
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?
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
Probably totally inappropriate to ask but.... R u trans? I'm a trans woman
This would be nice if you didn't used HTMX.
Why?
Don't need to watch the video to like, comment and subscribe. Great title.
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'
Just use php
Subscirbe to this Destiny Hailstorm guy!
Angular is trash. Try Solid js.
Did you even watch the video lil bro?
@@someidiot6359 No
@@pinatacolada7986 lmao
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 🤷
rust with htmx is a gigachad move. I'm just a next js soy boy
yo