From Svelte to Go and HTMX

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

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

  • @_MoKhaled
    @_MoKhaled Год назад +198

    Can't imagine my two favorite tech youtubers on one video together, this is legendary

    • @a-yon_n
      @a-yon_n Год назад +1

      Several of mine are often

    • @vyrwu
      @vyrwu 9 месяцев назад

      Epic

  • @JkyLi
    @JkyLi Год назад +57

    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.

  • @console.logged
    @console.logged Год назад +88

    It’s nice seeing The Rock get into HTMX

    • @casper0165ful
      @casper0165ful 9 месяцев назад +1

      Hahaha now thats funny

    • @xixo47
      @xixo47 9 месяцев назад +2

      Thought was Bezos

  • @dejangegic
    @dejangegic Год назад +104

    This is the colab we need. Anthony and prime talking Go let's do it

    • @colemichae
      @colemichae Год назад

      Anthony could not keep up with Prime 😂😂😂 prime just spits it out which is great

    • @aspzx
      @aspzx Год назад +2

      Sorry, but "reacting" is not collabing. Anthony has no chance to respond to Prime.

    • @dejangegic
      @dejangegic Год назад +9

      @@aspzx I might not have been clear. I would like for them to eventually collaborate, and this comment was just me cheering on that idea.

    • @aspzx
      @aspzx Год назад +4

      @@dejangegic ah got you. Yeah I agree

  • @MrMustachehead
    @MrMustachehead Год назад +29

    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

  • @Svengtz
    @Svengtz 11 месяцев назад +163

    Next up: from Go + HTMX back to PHP.

    • @robertzxzx
      @robertzxzx 10 месяцев назад +35

      Would rather eat raw aluminium every day than program in php

    • @ncpeaksean4278
      @ncpeaksean4278 9 месяцев назад

      Whats the joke?

    • @tcrypt25519
      @tcrypt25519 8 месяцев назад +5

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

      @@robertzxzxI concurr

    • @egzakharovich
      @egzakharovich 8 месяцев назад

      But why, if with Templ Go make the same thing PHP did?

  • @chefaku
    @chefaku Год назад +15

    4:58 yes i am a lazy backend developer, I want the answers to my problems to be easy and simple
    "idiots admires complexity"

  • @MrTallAndy
    @MrTallAndy Год назад +19

    "How many config files do you have in your frontend app?"
    "Yes"

  • @vinnythelegend
    @vinnythelegend Год назад +48

    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.

    • @superquantumcomputer
      @superquantumcomputer Год назад

      isn't text/template is slow? 🤔🤔 i used jet template engine and used htmx inside it

    • @vinnythelegend
      @vinnythelegend Год назад +1

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

    • @SoMadCoffee
      @SoMadCoffee Год назад +1

      why not html/template?

    • @vinnythelegend
      @vinnythelegend Год назад

      @@SoMadCoffee html/template uses text/template under the hood

    • @jiasheanleong7918
      @jiasheanleong7918 Год назад

      It's worth noting that the text/template isn't injection safe, while the html/template is

  • @Qrzychu92
    @Qrzychu92 Год назад +20

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

      Blazor feels so nice to work with. It’s so much better than razor pages imo

  • @MickDavies
    @MickDavies Год назад +28

    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 😅

    • @phoneywheeze
      @phoneywheeze Год назад +3

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

      ​@@phoneywheeze 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 9 месяцев назад

      ​@@phoneywheeze
      You separate the logic into packages that can be reused.
      The PHP equivalent would be extracting reusable logic into classes.

  • @baz_sh
    @baz_sh Год назад +55

    Prime has been so good for the developer community at large. I hate to think of a world without him.

    • @liftingisfun2350
      @liftingisfun2350 Год назад +2

      Don't use hate around Christmas time.

    • @v2ike6udik
      @v2ike6udik Год назад

      Plot Twist. He is not real. Just AIgen Mr. Moustache running wild.

    • @jerbear7952
      @jerbear7952 11 месяцев назад

      People still think the AI plot twist thing is funny?​@@v2ike6udik

  • @ryanleemartin7758
    @ryanleemartin7758 Год назад +178

    Svelte kit is now the recommended choice even if it’s going to be full SPA .. basically for the built in routing

    • @ollydix
      @ollydix Год назад

      It's good but the +page.svelte kinda sucks, would love if it was the same directory name for the +[dir].svelte

    • @electrolyteorb
      @electrolyteorb Год назад +16

      who is recommending?

    • @Dozer456123
      @Dozer456123 Год назад

      @@electrolyteorb "Just trust me bro" is recommending it

    • @ryanleemartin7758
      @ryanleemartin7758 Год назад +135

      @@electrolyteorb Oh, The Svelte team.

    • @crosshaironhead
      @crosshaironhead Год назад

      @@ryanleemartin7758 😂

  • @ygunayer
    @ygunayer Год назад +14

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

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

      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.

  • @nomadshiba
    @nomadshiba 11 месяцев назад +7

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

      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.

  • @jalalle1995
    @jalalle1995 Год назад +13

    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 Год назад

      I also think he meant Svelte to HTMX because SvelteKit is kinda like Next.js of Svelte.

    • @hardcorecode
      @hardcorecode Год назад +2

      @@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 Год назад +3

      ​@@hardcorecodegood point here. If you dont know why you need it for, then the issue is the lack of knowledge, not the tool.

    • @sonkeweis9063
      @sonkeweis9063 Год назад +2

      I guess they used SvelteKit for the routing and its patterns for organizing the frontend files.

  • @ignrey
    @ignrey Год назад +10

    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 Год назад +2

      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 Год назад

      ​@@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 Год назад +1

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

    • @Daraneys
      @Daraneys 6 месяцев назад +1

      After 5 years of developement with the traditionnal seperated backend and React on the front-end, i'm tired of the complexity you have to work with for just an illusion of "separation of concerns".

  • @arnontzori
    @arnontzori Год назад +57

    Prime hates C#. Prime loves every single C# feature other languages adopt
    Go figure

    • @RememberingGames
      @RememberingGames Год назад +2

      This!

    • @computerfan1079
      @computerfan1079 Год назад +20

      Fair enough. This is just Blazor pages without C# at this point

    • @Qrzychu92
      @Qrzychu92 Год назад +3

      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 Год назад

      @@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 Год назад +5

      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.

  • @humanbeeng-programming-tp3pq
    @humanbeeng-programming-tp3pq Год назад +13

    It finally happened. Anthony on Prime’s channel🎉

  • @rzabcio3
    @rzabcio3 Год назад +3

    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

  • @georgehelyar
    @georgehelyar Год назад +10

    Go templates with type safety kind of just sounds like razor

    • @ASDFG856
      @ASDFG856 Год назад +3

      its the same thing as razor engine

    • @RememberingGames
      @RememberingGames Год назад +3

      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.

  • @psyckojoe
    @psyckojoe Год назад +10

    GSP's retirement is going well

  • @Wielorybkek
    @Wielorybkek Год назад +8

    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

    • @gabrielus123
      @gabrielus123 Год назад +3

      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 Год назад

      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 Год назад

      @@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 Год назад +2

      ​@@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 Год назад

      ​@@gabrielus123 you could doesn't mean you should. Reusing models will get you in to a world of pain with changing business requirements.

  • @jenreiss3107
    @jenreiss3107 Год назад +3

    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

  • @capsey_
    @capsey_ Год назад +18

    Saying htmx is for lazy backend devs who refuse to learn modern JS development has same energy as saying Next.js is for lazy frontend devs that don't want to leave their JavaScript bubble

    • @RememberingGames
      @RememberingGames Год назад +9

      Htmx is for JS devs that love having a new framework everyday. The only feature of htmx is to give youtubers content for newbies. It looks like the JQuery I was doing 20 years ago and damn it is ugly.

    • @superquantumcomputer
      @superquantumcomputer Год назад

      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

  • @Chris-se3nc
    @Chris-se3nc Год назад +15

    Ready to hear about why the old way is the new hotness.

    • @LoneIgadzra
      @LoneIgadzra Год назад +8

      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 Год назад

      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 Год назад

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

  • @user-mahaka2002
    @user-mahaka2002 Год назад +3

    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.

  • @patricknelson
    @patricknelson Год назад +6

    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 Год назад

      Anthony is alreayd building that rn

    • @Torudson
      @Torudson 11 месяцев назад +2

      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)

  • @Shaheer-xs5os
    @Shaheer-xs5os Год назад +20

    Never used Go before , but it's time to start a new adventure I guess... was an amazing stream man! WD!

    • @jwoods9659
      @jwoods9659 Год назад +3

      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 Год назад

      @@jwoods9659we get it bro

    • @zenlanfleek6580
      @zenlanfleek6580 Год назад +3

      @@jwoods9659 Average Go consumer.

    • @jwoods9659
      @jwoods9659 Год назад

      @@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 Год назад +1

      It’s the way to Go.

  • @adjbutler
    @adjbutler Год назад +3

    HTMX is making frontend DRY again! YAY!

  • @sirkato7751
    @sirkato7751 Год назад +14

    So weird that webdev seems to go back to simply PHP

    • @yasin-ali
      @yasin-ali 11 месяцев назад +2

      I was thinking the same thing

    • @jj70161
      @jj70161 2 месяца назад

      idea of php itself is not bad, php itself is awful, Go will continue legacy.

  • @sweetphilly2
    @sweetphilly2 Год назад +1

    Wow I literally just watched Anthony GG's video with this video queued, having no idea that you were reviewing his video

  • @not_yet_implemented
    @not_yet_implemented Год назад +5

    Rust + wasm , lets go

  • @emcassi_
    @emcassi_ Год назад +30

    Today's a good day to use HTMX

  • @gani7112
    @gani7112 8 месяцев назад +1

    the only problem is react, angular, svelte has a lot of component libraries which wont be available of we use go+templ+htmx

  • @_MB_93
    @_MB_93 Год назад +5

    php lazavel did this with Blade template engine like a decade ago

    • @yungtube7848
      @yungtube7848 11 месяцев назад

      But that was php 🤢

  • @apollolux
    @apollolux Год назад +2

    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.

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

    Currently I use htmx & rust and I like it a lot. I just use leptos as templ substitute and a axum backend. No SSR or CSR.

  • @mrbit10
    @mrbit10 Год назад +11

    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.

  • @ArkhKGB
    @ArkhKGB Год назад +11

    templ: using your main language in your templates. Ok, so 25 years later you're still reinventing php?

    • @bacon-SG
      @bacon-SG Год назад +2

      Kinda, but keep bashing PHP because of MEME

    • @Comeyd
      @Comeyd Год назад +2

      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!

  • @indrajitsarkar3169
    @indrajitsarkar3169 Год назад +4

    the complexities comes with modals, which should be, is insane.

    • @blackaccel
      @blackaccel 8 месяцев назад

      I don’t get the modals issue, should we not use them?

  • @bobby_builds
    @bobby_builds Год назад +2

    Just use the to make the modaels.

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

    Go + Templ is great but what about type safety in HTMX?

  • @henry-the-dog-and-steve
    @henry-the-dog-and-steve Год назад +1

    project link?

  • @cypher9000
    @cypher9000 7 месяцев назад

    But does Go run in the browser? Can I deploy a project as GitHub pages? Thought so.

  • @gungun974
    @gungun974 Год назад +10

    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 !

  • @rosehogenson1398
    @rosehogenson1398 Год назад +2

    Feels like it would be possible to write a linter that typechecks template/html templates

  • @pyrocentury
    @pyrocentury Год назад +1

    How many of you using htmx are mostly working BE?

  • @DamonMedekMusic
    @DamonMedekMusic Год назад +2

    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.

  • @mfpears
    @mfpears Год назад +3

    Please no please no please no something went wrong on this timeline

  • @datguy4104
    @datguy4104 Год назад

    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.

  • @EPCLori
    @EPCLori 7 месяцев назад +1

    Sounds like it would have been a better usecase for just Svelte, without the kit.

  • @alekseykostyuk3806
    @alekseykostyuk3806 Год назад +2

    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.

  • @joelv4495
    @joelv4495 Год назад

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

  • @anj000
    @anj000 10 месяцев назад +2

    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.

  • @iggydotdev
    @iggydotdev Год назад +1

    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)

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

      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

  • @erickmoya1401
    @erickmoya1401 Год назад

    21:15 what are you using to take so long?

  • @suikast420
    @suikast420 11 месяцев назад +1

    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?

  • @Macintoshdfr
    @Macintoshdfr Год назад +9

    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 Год назад

      You do realize htmx is a javascript lib right?

    • @_bradleystrider
      @_bradleystrider Год назад +3

      @@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 Год назад +2

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

    • @superquantumcomputer
      @superquantumcomputer Год назад

      ​@@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 :))

  • @aghileslounis
    @aghileslounis Год назад

    When the Top G validates your work 😎

  • @jdawgforealz
    @jdawgforealz Год назад

    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.

  • @lukasmolcic5143
    @lukasmolcic5143 Год назад +1

    no types is the only reason I am still not down with htmx for larger projects

  • @EliSpizzichino
    @EliSpizzichino Год назад +1

    I haven't seen any good reason to switch from svelte

  • @mornwind318
    @mornwind318 Год назад +1

    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.

  • @nineephe
    @nineephe Год назад

    I like to use go+quicktemplate. It is a bit arcane but it is compiled so it is type safe

  • @kekw7793
    @kekw7793 Год назад +1

    So its becoming kind of php?

  • @aazzrwadrf
    @aazzrwadrf Год назад

    how does hot reloading work? ui without hot reloading is insane.

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

    • @mrX666-s9p
      @mrX666-s9p Год назад +5

      Another ohh this is the best thing this will revolutionize this crap looks wack 🤣

    • @RoyRope
      @RoyRope Год назад

      @@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 Год назад

      @@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 Год назад

      @@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 Год назад

      @@christiansakai you again fail to address any of my points sir, which is quite remarkable in such a lengthy post.🤣

  • @s_oneg
    @s_oneg Год назад +8

    Hey! Love your videos that contains Go 😅. Keep it up! Hopefully we see more of it

  • @egzakharovich
    @egzakharovich 8 месяцев назад

    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.

  • @nexovec
    @nexovec Год назад +1

    "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.

  • @Summersault666
    @Summersault666 Год назад +4

    Django 5.0 + htmx

    • @rachidboudjema8807
      @rachidboudjema8807 9 месяцев назад

      Django 5 + Htmx + Hyperscript... Never looked back

  • @daltonyon
    @daltonyon Год назад +1

    Everyday I'm more excited with go lang

  • @oussamasethoum1665
    @oussamasethoum1665 Год назад

    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

  • @superquantumcomputer
    @superquantumcomputer Год назад +6

    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? 🤔🤔

  • @su1cedek
    @su1cedek Год назад +1

    It finally happened

  • @emokjulev9936
    @emokjulev9936 10 месяцев назад

    looks like that c# for front ned

  • @TheNewton
    @TheNewton Год назад

    19:18 just config hell anxiety things ♾.

  • @liftingisfun2350
    @liftingisfun2350 Год назад

    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.

  • @MainBeta
    @MainBeta 11 месяцев назад

    Some people have forgotten that client-side rendering + json was invented to unify backend for web and mobile applications?

  • @jessequartey
    @jessequartey Год назад

    Immediately there is a notification over 1000 people said "Yes i want to listen to this guy talk."

  • @zabialy2919
    @zabialy2919 Год назад +2

    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 Год назад

      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 Год назад

      MVC?

    • @zabialy2919
      @zabialy2919 Год назад

      @@erickmoya1401 I ment instead of having NextJS consuming an API, having my Backend returning the view basically.

    • @zabialy2919
      @zabialy2919 Год назад

      @@kristun216 Yeah, sounds smart. Thanks :)

    • @superquantumcomputer
      @superquantumcomputer Год назад +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

  • @doesitmatter
    @doesitmatter Год назад

    13:55 is that what react users be like once they discover proper frameworks?
    Wait cant you do that in svelte? 🤔

  • @em11l
    @em11l 6 месяцев назад

    4:30, I don't think that's the case. I am using Sveltekit with Django as the backend. The kit part of sveltekit serves as a mediator for integrating whatever api I want. I am not fond of JS backends for handling hard logic. Also htmx sucks :D would never use that due to how its made.

  • @ericgarza283
    @ericgarza283 10 месяцев назад

    6:35 is exactly why I hate this usage of JSON

  • @ZiggyJFox
    @ZiggyJFox Год назад

    Still not convinced to how this would work with complex front ends. I think I am going to prove myself wrong.

  • @IndellableHatesHandles
    @IndellableHatesHandles Год назад

    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__ Год назад +1

      sounds Dutch to me. edit: it's Belgian.

  • @yamix-tr
    @yamix-tr 4 месяца назад

    4:20 not a surprise that it makes sense also to use Laravel

  • @just_ppe
    @just_ppe Год назад +7

    so we're back to the idea of generating html in backend (kinda jsp?), which ~15 years was considered a very bad idea and all the spa framework madness have started?

  • @jeremybuckets
    @jeremybuckets Год назад

    MVC stands for Modals, Very Cool!

  • @miracleinnocent2649
    @miracleinnocent2649 Год назад +1

    I knew The most Backend Language Programmers that will adopt HTMLx is Golang devs

  • @GreyDeathVaccine
    @GreyDeathVaccine 11 месяцев назад

    So Templ is basically a reinvented PHP?
    I love HTMX BTW.

  • @fuzzy-02
    @fuzzy-02 10 месяцев назад

    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

  • @akamenskiy
    @akamenskiy Год назад

    is this an ASMR video? Why do I need to max out sound level to barely hear what either of you are saying?

  • @console.logged
    @console.logged Год назад +3

    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 Год назад +1

      Yup, I have found the same problem multiple times but I really have not tried hard enough

  • @ClaudioBrogliato
    @ClaudioBrogliato Год назад

    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.

  • @jaketompkins2794
    @jaketompkins2794 11 месяцев назад

    They've got squigglies. Say no more

  • @_diversable_
    @_diversable_ Год назад

    +1 for Leptos

  • @Comeyd
    @Comeyd Год назад

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