From Svelte to Go and HTMX

  Рет қаралды 140,410

ThePrimeTime

ThePrimeTime

4 ай бұрын

Recorded live on twitch, GET IN
/ theprimeagen
Reviewed video: • Why We Switched From S...
By: Anthony GG | / @anthonygg_
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Kinesis Advantage 360: bit.ly/Prime-Kinesis
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/deeznuts

Пікірлер: 346
@_MoKhaled
@_MoKhaled 4 ай бұрын
Can't imagine my two favorite tech youtubers on one video together, this is legendary
@a-yon_n
@a-yon_n 4 ай бұрын
Several of mine are often
@vyrwu
@vyrwu Ай бұрын
Epic
@JkyLi
@JkyLi 4 ай бұрын
I did the same for the previous few months. I used to have a Go backend server and a svelte frontend, I use the static svelte generator to generate static files and directly serve them as static files using caddy. Now, I only have a Go backend which spits out HTMX. It takes way less effort than I imagine. However, the performance of my tiny internal tool that only be used by a dozen of people is the same. The maintenance time does go down though.
@Svengtz
@Svengtz 3 ай бұрын
Next up: from Go + HTMX back to PHP.
@robertzxzx
@robertzxzx 2 ай бұрын
Would rather eat raw aluminium every day than program in php
@ncpeaksean4278
@ncpeaksean4278 Ай бұрын
Whats the joke?
@tcrypt25519
@tcrypt25519 22 күн бұрын
The language isn't great but the model is. Inherently stateless so easily parallelized, native ssr, and faster than JS. If the language itself was safer and less trash php as a platform would still dominate.
@blackaccel
@blackaccel 21 күн бұрын
@@robertzxzxI concurr
@egzakharovich
@egzakharovich 16 күн бұрын
But why, if with Templ Go make the same thing PHP did?
@MrMustachehead
@MrMustachehead 4 ай бұрын
Love that chat about type security. Anything without static code analysis warning/errors is so much harder to refactor in the future because it takes so long to hopefully find all the dependencies. And you can never be sure you have found them all
@dejangegic
@dejangegic 4 ай бұрын
This is the colab we need. Anthony and prime talking Go let's do it
@colemichae
@colemichae 4 ай бұрын
Anthony could not keep up with Prime 😂😂😂 prime just spits it out which is great
@aspuzling
@aspuzling 4 ай бұрын
Sorry, but "reacting" is not collabing. Anthony has no chance to respond to Prime.
@dejangegic
@dejangegic 4 ай бұрын
@@aspuzling I might not have been clear. I would like for them to eventually collaborate, and this comment was just me cheering on that idea.
@aspuzling
@aspuzling 4 ай бұрын
@@dejangegic ah got you. Yeah I agree
@console.logged
@console.logged 4 ай бұрын
It’s nice seeing The Rock get into HTMX
@casper0165ful
@casper0165ful Ай бұрын
Hahaha now thats funny
@xixo47
@xixo47 24 күн бұрын
Thought was Bezos
@MrTallAndy
@MrTallAndy 4 ай бұрын
"How many config files do you have in your frontend app?" "Yes"
@Qrzychu92
@Qrzychu92 4 ай бұрын
I don't want to be THAT guy.... but the hated C# had this for decades :D type-safe, async data fetching from within the template, streaming rendering etc, hot reload in templates (now also in code). Just saying :) btw, now it's even better with with Blazor server rendering
@Ellefsen97
@Ellefsen97 2 ай бұрын
Blazor feels so nice to work with. It’s so much better than razor pages imo
@ryanleemartin7758
@ryanleemartin7758 4 ай бұрын
Svelte kit is now the recommended choice even if it’s going to be full SPA .. basically for the built in routing
@ollydix
@ollydix 4 ай бұрын
It's good but the +page.svelte kinda sucks, would love if it was the same directory name for the +[dir].svelte
@electrolyteorb
@electrolyteorb 4 ай бұрын
who is recommending?
@Dozer456123
@Dozer456123 4 ай бұрын
@@electrolyteorb "Just trust me bro" is recommending it
@ryanleemartin7758
@ryanleemartin7758 4 ай бұрын
@@electrolyteorb Oh, The Svelte team.
@ChitChatLLMs
@ChitChatLLMs 4 ай бұрын
@@ryanleemartin7758 😂
@vinnythelegend
@vinnythelegend 4 ай бұрын
I built an entire app with golang and HTMX, without even realizing TEMPL existed! I used the built in text/template for Go and I didn't actually hate it.
@doublekamui
@doublekamui 4 ай бұрын
isn't text/template is slow? 🤔🤔 i used jet template engine and used htmx inside it
@vinnythelegend
@vinnythelegend 4 ай бұрын
@@doublekamui it was pretty quick for me and I was working with a decently large data set. however I did have an infinite-scroll feature for the client so it only templated like 25 entries at a time.
@samadkhafi9211
@samadkhafi9211 4 ай бұрын
why not html/template?
@vinnythelegend
@vinnythelegend 4 ай бұрын
@@samadkhafi9211 html/template uses text/template under the hood
@jiasheanleong7918
@jiasheanleong7918 4 ай бұрын
It's worth noting that the text/template isn't injection safe, while the html/template is
@MickDavies
@MickDavies 4 ай бұрын
So it's Laravel + Livewire? The modular monolith lives to fight another day son! I like to think that a PHP dev whose comfortable with Laravel could step up their skillset to Go in this type of capacity relatively easily and gain some new skills in typed languages but without a completely jarring learning experience. Go is the PHP developers secret best friend, they just don't know it yet 😅
@phoneywheeze9959
@phoneywheeze9959 4 ай бұрын
does livewire return html? to me this feels like an old fashioned way of developing applications, what if you want some of the logic to be used for another project in an api? i used laravel with ajax before, and in there the client browser made the dom elements with the data
@mgjulesdev
@mgjulesdev 2 ай бұрын
​@@phoneywheeze9959 if you properly architect your server, then how you expose your data should not be hard at all. Your usecases should not be aware of how data is exposed.
@jeffreysmith9837
@jeffreysmith9837 27 күн бұрын
​@@phoneywheeze9959 You separate the logic into packages that can be reused. The PHP equivalent would be extracting reusable logic into classes.
@ygunayer
@ygunayer 4 ай бұрын
Can't help but realize how we're coming back full circle to the modular monolith and I quite welcome it. I'm leaning towards the Elixir/LiveView side of the fence, but I wonder: what is the breaking point? Is it the over-complication of the JS/TS ecosystem? Is it because the cognitive load for writing and maintaining SPAs is going off the roof? Is it because SPA frameworks and libraries are getting so bloated that it defeats the purpose? Is it because each of those frameworks and libraries lock you in (I'm looking at you, React "library")? Or is it simply because the SPA model was never the right one? My take on it is that the only thing we've ever needed was the ability to hook up a certain HTML element with an isolated state and logic, and the JS+HTML model never provided that out of the box, whereas with traditional AJAX+SSR it's quite easy to implement. The latter traditionally suffered from scoping issues with global JS for interaction, and most importantly global CSS for styling, and it looks like HTMX and the PHP model of rendering within the language bounds fix the former issue, and Tailwind just obliterates the latter.
@danielg3857
@danielg3857 2 ай бұрын
I think it's like you said with the SPA model; there are cases where the hypermedia/enhanced html way of doing things isn't good for complex interdependent ui state as per the HTMX docs, and so you need the overhead of a js framework, but at the same time the modern js overhead isn't worth it for most cases, so people would take a big perf/complexity hit for the rarer case and because of the developer/career inertia; nowadays I hear people talking about having the complex JS in little "islands", so the future meta might be backend-templating/enhanced-html(whether htmx/liveview or even a future HTML spec) and light js scripting with occasional islands of heavy js
@StephanHoyer
@StephanHoyer 2 ай бұрын
For me it's the frameworks that suck. I work on a fairly large app with mithril.js and I'm still very happy with it. But I think for most trivial cms-like apps go and htmx are a pretty good alternative. For my app (an online worksheet editor) it's not sufficient enought I think.
@apollolux
@apollolux 4 ай бұрын
Reminds me of Smarty templating in PHP, but over time it was so overkill for my needs I just rolled my own no-dependencies simpler version that doesn't have fancier stuff like pre-parsed template file caching. I wonder how hard Templ goes.
@chefaku
@chefaku 4 ай бұрын
4:58 yes i am a lazy backend developer, I want the answers to my problems to be easy and simple "idiots admires complexity"
@baz5719
@baz5719 4 ай бұрын
Prime has been so good for the developer community at large. I hate to think of a world without him.
@liftingisfun2350
@liftingisfun2350 4 ай бұрын
Don't use hate around Christmas time.
@v2ike6udik
@v2ike6udik 3 ай бұрын
Plot Twist. He is not real. Just AIgen Mr. Moustache running wild.
@jerbear7952
@jerbear7952 3 ай бұрын
People still think the AI plot twist thing is funny?​@@v2ike6udik
@jalalle1995
@jalalle1995 4 ай бұрын
The title is a bit misleading, they didn't move from sveltekit to hmtx+go, but rather from sveltekit+go which makes total sense considering they wanted to focus on one language
@ElclarkKuhu
@ElclarkKuhu 4 ай бұрын
I also think he meant Svelte to HTMX because SvelteKit is kinda like Next.js of Svelte.
@macctosh
@macctosh 4 ай бұрын
@@ElclarkKuhu right there is the problem...., why are you selecting a tool that you don't even understand. I kept shaking my head when he said that " we decided to use SvelteKit for our front-end and go (Echo ) for our backend" SvelteKit is the whole deal ( front and backend) if you only what the frontend use svelte!
@erickmoya1401
@erickmoya1401 4 ай бұрын
​@@macctoshgood point here. If you dont know why you need it for, then the issue is the lack of knowledge, not the tool.
@sonkeweis9063
@sonkeweis9063 4 ай бұрын
I guess they used SvelteKit for the routing and its patterns for organizing the frontend files.
@humanbeeng-programming-tp3pq
@humanbeeng-programming-tp3pq 4 ай бұрын
It finally happened. Anthony on Prime’s channel🎉
@ignrey
@ignrey 4 ай бұрын
4:47 I 100% agree with what he's saying trying to build a solid piece of software with react and some backend languages could be a nightmare in terms of security, integration and stuff.
@erickmoya1401
@erickmoya1401 4 ай бұрын
I have yet to see the video. But I dont see many people in htmx explaining how this makes it secure, handles auth +auth.
@RememberingGames
@RememberingGames 4 ай бұрын
​@@erickmoya1401It doesn't because htmx people only do miniature apps for views on youtube. Nobody with a rationnal mind would use that to build a real life, big application.
@dealloc
@dealloc 4 ай бұрын
@@erickmoya1401 It doesn't, it's the same factor of security as anything else that outputs HTML-usually whatever templating language you use, whether it being JSX or something else will handle things like sanitisation to prevent XSS. But everything else is still prone to human error, and therefore to security issues.
@jenreiss3107
@jenreiss3107 4 ай бұрын
mmm doing the same but with Ruby and Sinatra. It feels like a warm blanket in a land where the word "Javascript" has never been mentioned
@user-bz8qi6vu4q
@user-bz8qi6vu4q 4 ай бұрын
What building in 30 sec is long ? The building process of our app now takes well over an hour (90% java, 10% JS) with testing. Java artefact generation takes ages...
@arnontzori
@arnontzori 4 ай бұрын
Prime hates C#. Prime loves every single C# feature other languages adopt Go figure
@RememberingGames
@RememberingGames 4 ай бұрын
This!
@computerfan1079
@computerfan1079 4 ай бұрын
Fair enough. This is just Blazor pages without C# at this point
@Qrzychu92
@Qrzychu92 4 ай бұрын
actually, I think Prime would have his mind blown if he tried out modern C#. Especially EF Core - to my knowledge, the only ORM that ACTUALLY let's you use the db as if it was just a list of objects.
@apexashwin
@apexashwin 4 ай бұрын
@@Qrzychu92orms are for idiots and C# is a great language but Microsoft is shit, they kill their framework’s every three year to introduce something new and terrible.
@Gornius
@Gornius 4 ай бұрын
Personally I don't like C# for its weird code style guidelines: - Preferring newline '{' instead of endline '{' - Pascal case for different things than class names - Prefixing every interface with 'I" And most importantly - strong connection with Microsoft.
@rosehogenson1398
@rosehogenson1398 4 ай бұрын
Feels like it would be possible to write a linter that typechecks template/html templates
@nomadshiba
@nomadshiba 3 ай бұрын
16:20 his issue was he mixes sveltekit (a full stack framework) with "go", either choose sveltekit or "go" with something else. sveltekit has use:enhance, he didn't need to proxy anything, all he had to do was using (s) with `use:enhance` and combine it with the `form` html attribute, and do everything with form actions, without any proxy, he doesnt have to manage any state, doesnt have to build a proxy, its just boosting. something like this +page.server.ts const count = kv.value(0); export const load = (async (event) => { return { count: await count.get() }; }) satisfies PageServerLoad; type zSetCount = z.infer; const zSetCount = object({ value: string().regex(/^\d+$/).transform(Number).pipe(number().min(0)) }); export const actions = { async setCount(event) { const form = await parseFormData(await event.request.formData(), zSetCount); const response = { setCount: form }; if (!form.valid) fail(response); await count.set(form.data.value); return response; } } satisfies Actions; +page.svelte export let data: PageData; export let form: ActionData; $: count = form?.setCount.data.count ?? data.count ?? 0; const setCountFormId = uniqueId(); + {count} - OR if you like more reuseable actions export let data: PageData; export let form: ActionData; $: count = form?.setCount.data.count ?? data.count ?? 0; const countUp = uniqueId(); const countDown = uniqueId(); + {count} - and all works even when you disable js on the browser.
@nomadshiba
@nomadshiba 3 ай бұрын
oh you like modals? +layout.server.ts import type { LayoutServerLoad } from './$types'; export const load = (async (event) => { const selectedPostId = event.url.searchParams.get('post'); const selectedPost = selectedPostId ? await someDb.getPost(selectedPostId) : null; return { selectedPost }; }) satisfies LayoutServerLoad; +layout.svelte export let data: PageData; {#if data.selectedPost} {/if} still also works without js.
@patricknelson
@patricknelson 4 ай бұрын
Was just thinking: What if they wanted to style their “go” components (those functions) like you can already in Svelte, in a modular and colocated fashion? If they wanted to move away from tailwind for whatever reason (which has all the styles already globally set and just referenced as classes, which works well here). Maybe someday there could be a Go framework (maybe integrated into Templ) that can compile and ship CSS classes in a Svelte-like way too. That’d be nifty. Disclaimer: Am not Gopher.
@perc-ai
@perc-ai 4 ай бұрын
Anthony is alreayd building that rn
@Torudson
@Torudson 3 ай бұрын
A bit old, but templ actually does that already. You can create css blocks on the .templ files and it will be compiled and scoped to that specific file (there is probably some way of making them global too, but not sure)
@nineephe
@nineephe 4 ай бұрын
I like to use go+quicktemplate. It is a bit arcane but it is compiled so it is type safe
@bobby_builds
@bobby_builds 4 ай бұрын
Just use the to make the modaels.
@iggydotdev
@iggydotdev 4 ай бұрын
Interesting... This feels like the good old vendor locking situation. If your company is quite big, and every department has different needs, then a headless implementation would be a better choice. Am I missing something? Is this the Backend way to do Frontend? What about security? Web components... good but we are not there yet. Something is missing. Otherwise there will be only WC and not a need to use react, vue, svelte, ... (Also, HTML has a default tag for modal called dialog)
@datguy4104
@datguy4104 4 ай бұрын
12:22 I could have sworn the html/template already did this. VScode chad, so wouldn't surprise me if it just twerks. Also everything passed into Go's native templates is just parsed into a string anyway.
@nexovec
@nexovec 4 ай бұрын
"Modern js development" sounds a bit like "modern horse riding" This is basically the stack I'm set on. I'm using gorm for now but I'm thinking of ditching it because it just takes too long to debug SQL with it. Thinking of using clover db for prototyping.
@DamonMedekMusic
@DamonMedekMusic 4 ай бұрын
It sounds like they were just using go as most of the logic anyway and they just needed some output so its web compatible. Seemed like they created more of Go API with a front end GUI. Sveltekit is still great as a whole.
@sweetphilly2
@sweetphilly2 4 ай бұрын
Wow I literally just watched Anthony GG's video with this video queued, having no idea that you were reviewing his video
@mrbit10
@mrbit10 4 ай бұрын
this reminds me of server-side scripting, seems like tech took a detour. perhaps out of boredom or to solve a problem only to create many more. going back to the late 90's and early 2000s, i created many beautiful web applications without the need for React, Angular and etc... just good old JavaScript and ajax and sprinkles of direct server-side script, I still scratch my head as to how we arrived where we are now.
@liftingisfun2350
@liftingisfun2350 4 ай бұрын
Facebook trying to correct itself
@oussamasethoum1665
@oussamasethoum1665 4 ай бұрын
Am building with svelte and I understand his point of view, server side rendering requires you to use javascript on the backend which doesn't give you the benefit of go performance
@sirkato7751
@sirkato7751 4 ай бұрын
So weird that webdev seems to go back to simply PHP
@yasin-ali
@yasin-ali 3 ай бұрын
I was thinking the same thing
@georgehelyar
@georgehelyar 4 ай бұрын
Go templates with type safety kind of just sounds like razor
@ASDFG856
@ASDFG856 4 ай бұрын
its the same thing as razor engine
@RememberingGames
@RememberingGames 4 ай бұрын
Yes, but inflencers aren't about fixing real world problem, it's about new framework hype. Htmx has an X in it so its got to be a futuristic paradigm shift.
@rzabcio3
@rzabcio3 4 ай бұрын
Underlined whiteline (after "platform"). Literally unreadable. :P Also, I'm stunned how this thing is called "crazy" and "insane" but in fact is the same thing like JSP/JSF from 17 years ago! They also seemed cool at first glance, but turned out to be really, REALLY bad idea, mixing model with view and controller. That's maybe great to some small projects (in terms of code base and dev count), but would be real pain in larger ones. That's actually crazy how IT sector is crazy over the same things and mistakes over and over again! :D
@joelv4495
@joelv4495 4 ай бұрын
19:24 That has always triggered me so hard. It's like "Why couldn't we have just all settled on a .config directory or something??". I've tried adding config to package.json where possible, but eventually I just gave up and put a massive files.exclude block in VS Code's settings.json file...
@indrajitsarkar3169
@indrajitsarkar3169 4 ай бұрын
the complexities comes with modals, which should be, is insane.
@blackaccel
@blackaccel 21 күн бұрын
I don’t get the modals issue, should we not use them?
@ArkhKGB
@ArkhKGB 4 ай бұрын
templ: using your main language in your templates. Ok, so 25 years later you're still reinventing php?
@bacon-SG
@bacon-SG 4 ай бұрын
Kinda, but keep bashing PHP because of MEME
@Comeyd
@Comeyd 4 ай бұрын
Honestly, yeah, that’s what I thought when they both said that! “Looks like PHP with extra steps” And I haven’t been serious about PHP since PHP 5!
@user-mahaka2002
@user-mahaka2002 4 ай бұрын
HTMX it's been a breath of fresh air. For it to take off and become a trend, it just needs to be adopted by a large company. That would create a cycle of interest around the lib, open up job vacancies and spark more interest from the community.
@Comeyd
@Comeyd 4 ай бұрын
@ThePrimeTime For rust, you should really try and give Poem and Maud a try. Maud is very good, it’s html entirely as macros, and poem is, well, frankly, beautiful. I highly recommend it.
@psyckojoe
@psyckojoe 4 ай бұрын
GSP's retirement is going well
@Wielorybkek
@Wielorybkek 4 ай бұрын
I don't understand how a FE framework would force you to use JS on the BE? between them is either REST or GraphQL, does not matter what you use
@gabrielstellini
@gabrielstellini 4 ай бұрын
Forced might be the wrong word. But when you use different languages, you do usually end up writing things twice, like types and validation. If js is on the backend too, chances are you could just reuse the same validations and types. And yes, there are tools to automate type generation across languages/openapi type generation, but it is almost never a perfect reflection.
@ivanjermakov
@ivanjermakov 4 ай бұрын
This is not a problem if you use pure CSR or pure SSR. Once you do both (hydration) you have duplicate logic across client and server. It is a lot simpler to write code once (usually in JS/TS) and framework will use it properly in both runtimes.
@Wielorybkek
@Wielorybkek 4 ай бұрын
@@ivanjermakov how is hydration duplicating logic? I admit I've never used it myself but from what I've seen it's usually a matter of config on the FE framework side
@ivanjermakov
@ivanjermakov 4 ай бұрын
​@@Wielorybkek basically SSR workflow: 1. Browser requests the page 2. Server returns a page 3. Browser shows the page to the user (first contentful paint) and requests js bundle 4. Server returns JS 5. Browser loads and parses JS, update DOM client-side (hydration) and provides interactivity (time to interactive) You see how two different places need to know how to render the page (server when sends initial response and client during hydration). This approach takes best from both worlds (fast FCP and interactivity of SPA), while sacrificing application complexity. Theo t3-gg has a good video on this topic called "Do you REALLY need SSR?".
@aldencabajar6781
@aldencabajar6781 4 ай бұрын
​@@gabrielstellini you could doesn't mean you should. Reusing models will get you in to a world of pain with changing business requirements.
@RoyRope
@RoyRope 4 ай бұрын
Sounds like nightmare fuel serving the front-end from the backend again like this. We will sit this hype out for a while and see how it goes for others.😅 Can't also imagine all our front-enders switching to this, that will be a steep curve.
@muresanandrei7565
@muresanandrei7565 4 ай бұрын
Another ohh this is the best thing this will revolutionize this crap looks wack 🤣
@RoyRope
@RoyRope 4 ай бұрын
@@christiansakailearning a complete new language, learning hexagon architecture, learning micro service architecture, learning the whole backend side, yeah that's a steep curve compared to learning Angular and TypeScript...
@RoyRope
@RoyRope 4 ай бұрын
@@christiansakai i have 3 years of professional Angular experience, you where saying? I am not implying backend is more difficult btw, maybe read what I state and don't be so insecure...
@RoyRope
@RoyRope 4 ай бұрын
@@christiansakai that's my point, most front end devs now don't know how this worked, they have to learn this and a new language and where it has to fit in with the existing backend code. A steep curve that is. Not to say it's more difficult or something, when all back end engineers have to learn all frontend things the same applies.
@RoyRope
@RoyRope 4 ай бұрын
@@christiansakai you again fail to address any of my points sir, which is quite remarkable in such a lengthy post.🤣
@MainBeta
@MainBeta 2 ай бұрын
Some people have forgotten that client-side rendering + json was invented to unify backend for web and mobile applications?
@gani7112
@gani7112 13 күн бұрын
the only problem is react, angular, svelte has a lot of component libraries which wont be available of we use go+templ+htmx
@lukasmolcic5143
@lukasmolcic5143 4 ай бұрын
no types is the only reason I am still not down with htmx for larger projects
@doublekamui
@doublekamui 4 ай бұрын
for building a simple website that request api and display the result, yeah it will do the job. but if you build a complex frontend like video editor, photo editor, game, i think pick a frontend framework would be the better choise, and then it help you to manage that complex code by writing in component based concept and if our backend is consumed by mobile too, we need to determine that if the request come from website tyen return html, if the request come from mobile then return json, if the request come from dekstop app? 🤔🤔
@Shaheer-xs5os
@Shaheer-xs5os 4 ай бұрын
Never used Go before , but it's time to start a new adventure I guess... was an amazing stream man! WD!
@jwoods9659
@jwoods9659 4 ай бұрын
Go is fantastic I prefer the backend. I wait to do frontend, it can be simple people add too much to the front end.
@DocHudson420
@DocHudson420 4 ай бұрын
@@jwoods9659we get it bro
@zenlanfleek6580
@zenlanfleek6580 4 ай бұрын
@@jwoods9659 Average Go consumer.
@jwoods9659
@jwoods9659 4 ай бұрын
@@zenlanfleek6580 Idk I just started using it and it's great. As far as I have experienced frontend is a mess full of one upums frameworks... Just too much
@nictibbetts
@nictibbetts 4 ай бұрын
It’s the way to Go.
@_MB_93
@_MB_93 4 ай бұрын
php lazavel did this with Blade template engine like a decade ago
@yungtube7848
@yungtube7848 3 ай бұрын
But that was php 🤢
@ZiggyJFox
@ZiggyJFox 4 ай бұрын
Still not convinced to how this would work with complex front ends. I think I am going to prove myself wrong.
@jdawgforealz
@jdawgforealz 4 ай бұрын
Prime when are you gonna switch to qwerty layout? I recall a tweet sometime ago saying you were gonna migrate over. Waiting to see your sweet vim shortcuts in qwerty format.
@Macintoshdfr
@Macintoshdfr 4 ай бұрын
Htmx is cool to use, very simple. It seem very similar to JSP in J2ee with async process to get the rendered view. It's very nice to not use javascript and JSON to refresh the data of the view to get the same result
@RememberingGames
@RememberingGames 4 ай бұрын
You do realize htmx is a javascript lib right?
@_bradleystrider
@_bradleystrider 4 ай бұрын
@@RememberingGames that's an incredibly reductive point but ok
@Macintoshdfr
@Macintoshdfr 4 ай бұрын
@@RememberingGames I realize , i have nothing against javascript. It's just a fact you don't need to write javascript... where is the problem in my sentence...
@RememberingGames
@RememberingGames 4 ай бұрын
@@Macintoshdfr Nothing with the statement per se. I'm just tired of "new" tech that does what I was doing in 2003 and everybody thought it sucked. All of this is all cool for a small newbie tutorial but I can garantee you, as soon as you'll hit a point where you need special logic, the result will be a mess. I've gone through this countless times. Makes me sad to see how little is remembered from the errors of the past and we are bound to repeat them endlessly. So yeah, your statement is 100% factually right. The problems are what happens beyond this statement though.
@doublekamui
@doublekamui 4 ай бұрын
​@@Macintoshdfrthen build a video editor website or photo editor website or game website, you will realize that htmx is only for building frontend when you just want to do simple api request and display the result :))
@GreyDeathVaccine
@GreyDeathVaccine 3 ай бұрын
So Templ is basically a reinvented PHP? I love HTMX BTW.
@Chris-se3nc
@Chris-se3nc 4 ай бұрын
Ready to hear about why the old way is the new hotness.
@LoneIgadzra
@LoneIgadzra 4 ай бұрын
Never should have gone away. It's faster to develop, easier on the browser, and simpler to debug. SPA is necessary for some types of UX, but imposes additional complexity. This is obvious, but the entire industry jumped on a cargo cult for a while.
@complexity5545
@complexity5545 4 ай бұрын
The old way never got out of style. Reactjs^^Nodejs running as a server are for the dumb dumbs; it was a facebook and google experiment to hire low skilled programmers to try to do advance stuff. The last 10 years proved that JS on the backend is scientifically stupid. Its the exact opposite of a computer Scientists that uses logic. Most good programmers immediately knew this back in 2012. All the pros have been using [go] for product + server side rendering since Go came out.
@RememberingGames
@RememberingGames 4 ай бұрын
@@LoneIgadzra Then just use Razor, JSP, PHP, Go, etc... The paradigm never gone away, simply, influencers needs to make money. So there got to be a new thing every week, even if that is reinventing the wheel everytime. Being excited for htmx is like being excited by the innovation of the pink sauce lady. All marketing, no substance. Saying stuff like PHP bad, but htmx is revolution makes me even question the sanity of people saying that. And I don't even like PHP...
@zabialy2919
@zabialy2919 4 ай бұрын
Is HTMX production ready? And are there any major drawbacks of using it? I currently have a Spring Boot backend and a NextJS frontend, where I basically only do the rendering. I was also thinking about switching to MVC with HTMX, as from what I see it would be faster to work with than writing all the API types 2 times.
@kristun216
@kristun216 4 ай бұрын
different way to skin a cat. it's preference based. i would dive into it first before you start picking it, you may find things you don't like. in your scenario, you would have to reimplement a lot of your backend to have HTMX controllers rendering components. that's a lot of work. i would weigh the options before you commit to anything.
@erickmoya1401
@erickmoya1401 4 ай бұрын
MVC?
@zabialy2919
@zabialy2919 4 ай бұрын
@@erickmoya1401 I ment instead of having NextJS consuming an API, having my Backend returning the view basically.
@zabialy2919
@zabialy2919 4 ай бұрын
@@kristun216 Yeah, sounds smart. Thanks :)
@doublekamui
@doublekamui 4 ай бұрын
if you just build a simple website that request api and display the result, yeah it will do the job. but if you build a complex frontend like video editor, photo editor, game, i think pick a full frontend framework would be the better choise, and then it help you to manage that complex code by writing in component based concept
@adjbutler
@adjbutler 4 ай бұрын
HTMX is making frontend DRY again! YAY!
@emcassi_
@emcassi_ 4 ай бұрын
Today's a good day to use HTMX
@erickmoya1401
@erickmoya1401 4 ай бұрын
21:15 what are you using to take so long?
@egzakharovich
@egzakharovich 16 күн бұрын
4:20 Yeah. Imagine the feeling, you writing your backend with Python, Go or Rust. But you have to use NodeJs for frontend... It sucks. That's why I searching vids about HTMX, to learn about alternatives to Node and NPM stuff.
@s_onefps
@s_onefps 4 ай бұрын
Hey! Love your videos that contains Go 😅. Keep it up! Hopefully we see more of it
@timvw01
@timvw01 4 ай бұрын
Rust + wasm , lets go
@iampuff7
@iampuff7 4 ай бұрын
I like to think of HTMX as html templating but on the frontend
@gungun974
@gungun974 4 ай бұрын
Again thanks prime to let me escape Typescript Hell. Now I can happily live my life in Go and use and contribute my favorite Go FOSS project. Templ !
@doesitmatter
@doesitmatter 4 ай бұрын
13:55 is that what react users be like once they discover proper frameworks? Wait cant you do that in svelte? 🤔
@mfpears
@mfpears 4 ай бұрын
Please no please no please no something went wrong on this timeline
@suikast420
@suikast420 3 ай бұрын
That's looks like jsp in java. Am I wrong. I don't realy like jsp. The htmx stuff is shoot to the past isn't it or did I misunderstood something?
@Summersault666
@Summersault666 4 ай бұрын
Django 5.0 + htmx
@rachidboudjema8807
@rachidboudjema8807 27 күн бұрын
Django 5 + Htmx + Hyperscript... Never looked back
@TheNewton
@TheNewton 4 ай бұрын
19:18 just config hell anxiety things ♾.
@daltonyon
@daltonyon 4 ай бұрын
Everyday I'm more excited with go lang
@alekseykostyuk3806
@alekseykostyuk3806 4 ай бұрын
Finally this JS nonesence is fading away. I hope htmx becomes more widely accepted, so that Teams can finally remove this FEBE barrier. It's a complete game changer. We'll get more of better software.
@su1cedek
@su1cedek 4 ай бұрын
It finally happened
@pyrocentury
@pyrocentury 4 ай бұрын
How many of you using htmx are mostly working BE?
@kyjo72682
@kyjo72682 4 ай бұрын
Feels like endless reinventing of the wheel.. ASP was released when? In 1996? And Java/JSP had most of this by 1999.
@jessequartey
@jessequartey 4 ай бұрын
Immediately there is a notification over 1000 people said "Yes i want to listen to this guy talk."
@fuzzy-02
@fuzzy-02 2 ай бұрын
I learned vanilla front end and some php for backend in my uni courses. Are these templates like making a .php file and just include-ing it in other places? And any advice you can give? So far I built a basic project for the course but it ended up as a spaghetti mess of .php files and juggling data with session and figuring what carries over after a page refresh and what not. In the end I felt likr backend and frontend became one elden ring abomination. I concluded that Id rather bash my head to solve logical backend problems then trying to untangle frontend frameworks. Tho im not fat, nor have a fedora or uwu keycaps
@jeremybuckets
@jeremybuckets 4 ай бұрын
MVC stands for Modals, Very Cool!
@aazzrwadrf
@aazzrwadrf 4 ай бұрын
how does hot reloading work? ui without hot reloading is insane.
@aghileslounis
@aghileslounis 4 ай бұрын
When the Top G validates your work 😎
@emokjulev9936
@emokjulev9936 2 ай бұрын
looks like that c# for front ned
@mornwind318
@mornwind318 3 ай бұрын
The mention of mobile apps is so hilarious because all we try to do on the web is have the same experience that native apps do, and we do a goddamn good job at it with very little code and tooling that isn't as bad as Xcode and Android Studio. "It was better before" is like saying that all we do on the web is just displaying API results, but it is not. You love handling sessions on the backend? I don't. Complex UI require complex states. We aren't all writing clones of Wordpress. Just trying to avoid using any sort of global state machine to handle cross feature states, mixing in navigation and shortcuts and so on, is enough to make me cry in pain.
@miracleinnocent2649
@miracleinnocent2649 4 ай бұрын
I knew The most Backend Language Programmers that will adopt HTMLx is Golang devs
@shaded4438
@shaded4438 4 ай бұрын
I imagine this htmx would be very hard to build around highly complex business logic But I've not used it yet so idk; however this dudes site looks super basic so you could write it in anything from what I can tell there is barley a need to use any libraries, could even get away with pug or something
@mornwind318
@mornwind318 3 ай бұрын
HTMX Is for scrubs who can't write JavaScript 101.
@SeanCallahan52
@SeanCallahan52 4 ай бұрын
Honestly, go error handling doesn’t even bother me. I’m used to it now but if you’re not, it is a little much at first.
@HalfMonty11
@HalfMonty11 4 ай бұрын
idk man, I really don't see a draw... Sveltekit has already got me developing the front and backend at the same time and it's all just normal js/ts and html stuff which is fast and easy. If I needed more performance out on the backend, there are plenty of tricks you can do before throwing away your whole tech stack. I get in his case he already had lots of code in GO, then sure, otherwise if you are starting from scratch, Sveltekit makes way way more sense.
@jeffreysmith9837
@jeffreysmith9837 27 күн бұрын
More maintenance. You will need to upgrade to svelte 5 for example because in a couple versions the old syntax will be deprecated. And who knows what else in the future. Htmx is a simple js file that will live forever
@cristophermoreno2290
@cristophermoreno2290 4 ай бұрын
It's a BRRRRRRRREEZE
@console.logged
@console.logged 4 ай бұрын
My main issue with Go + HTMX is I haven’t found a clean and easy way to set up auth. It’s super easy with SvelteKit or Next.js (T3). Skill issue tho
@JosueRodriguez08
@JosueRodriguez08 4 ай бұрын
Yup, I have found the same problem multiple times but I really have not tried hard enough
@ericgarza283
@ericgarza283 2 ай бұрын
6:35 is exactly why I hate this usage of JSON
@prionkor
@prionkor 4 ай бұрын
So, I went back to one of my old project and removed momentjs!
@hayyanhami6826
@hayyanhami6826 4 ай бұрын
I was also watching comments... "Ciansweeney" had a point!
@liftingisfun2350
@liftingisfun2350 4 ай бұрын
Prime is so meaty now he used to he a big scrub but hes like an extra large filet mignon... not much fat but a lot of tender soft meaty value. It's a pleasure to see.
@ClaudioBrogliato
@ClaudioBrogliato 4 ай бұрын
6:50 couldn't been said better. I dunno how many ERP webapp have been written that way, just traducing json into html and doing nothing but calling backend api for everything. Let alone js, you could have written that application without AJAX using html and SSR the old way and get something very similar without the js fatigue.
@Ultraporing
@Ultraporing 4 ай бұрын
Soo here are a ton of web devs. I'm from desktop and embedded development and like to ask, is there still a way to create a proper Ogl or dx game within browser, like at one time unity supported? I'm looking for a way to host a game in the web without the user having to install anything, and letting me use shader and stuff like that. Does anybody know how to do something like that these days?
@RememberingGames
@RememberingGames 4 ай бұрын
Webassembly is your answer. Doom was even compiled from the C source code to webassembly and it runs in the browser. Pretty amazing stuff.
@IndellableHatesHandles
@IndellableHatesHandles 4 ай бұрын
I'm trying to figure out where his accent comes from. His vowels are Scottish, his 't's are Spanish, and his 'j's are German
@velox__
@velox__ 4 ай бұрын
sounds Dutch to me. edit: it's Belgian.
@sebastianramirez5781
@sebastianramirez5781 4 ай бұрын
So I don't use HTMX, I'm fairly new to web development so I'm just building things in Next.js with a typescript backend for now, and while I do agree htmx looks like a way better solution, I also think there definitely are a lot of backend devs that just use it because they're lazy and don't wanna do the work of working with a big front-end framework, but yeah I can't wait to learn htmx and rust and go during my current Spring break it seems really cool.
@piotrpaczua8260
@piotrpaczua8260 3 ай бұрын
Seems like reinventing aspnet razor pages but in go xD
@anj000
@anj000 Ай бұрын
But still it feel like a bunch of complexity. You are using Go, you are using Tmpl, you are using some kind of Echo. I feel like this stuff is new, and people are simply hyped. People didn't have much time to hit a roadblock yet.
@vormavius
@vormavius 4 ай бұрын
a go legend reacting to a go legend
@thegrumpydeveloper
@thegrumpydeveloper 4 ай бұрын
All I know is yavascript sounds way better than the JavaScript that I use and will definitely be adopting that pronunciation without even npm installing it.
@xicor9469
@xicor9469 4 ай бұрын
Title should be From SvelteKit with Go to HTMX with Go
From React To HTMX
40:01
ThePrimeTime
Рет қаралды 287 М.
9 Months with GPT, Can I Fire My Devs Now?
20:53
ThePrimeTime
Рет қаралды 177 М.
Когда на улице Маябрь 😈 #марьяна #шортс
00:17
Зу-зу Күлпәш. Стоп. (1-бөлім)
52:33
ASTANATV Movie
Рет қаралды 672 М.
Why Go Or Rust On New Projects
10:32
ThePrimeTime
Рет қаралды 156 М.
HTMX IS INSECURE (XSS) | Prime News
19:58
ThePrimeTime
Рет қаралды 112 М.
The case against htmx
6:21
Mark Jivko
Рет қаралды 9 М.
You Are WRONG About 0 Based Indexing
25:02
ThePrimeTime
Рет қаралды 129 М.
You Need Kubernetes?
27:59
ThePrimeTime
Рет қаралды 162 М.
HTMX, the anti JS framework (vs React)
7:17
Kodaps Academy
Рет қаралды 61 М.
HTMX for Impatient Devs
8:33
Isaac Harris-Holt
Рет қаралды 38 М.
Single Language Productivity Is Fake
41:06
ThePrimeTime
Рет қаралды 152 М.
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Компьютерная мышь за 50 рублей
0:28
dizzi
Рет қаралды 2,2 МЛН