HTMX is Pro-JavaScript @JSNation - Interview w/ Carson Gross

Поділитися
Вставка
  • Опубліковано 16 лис 2024

КОМЕНТАРІ • 18

  • @christopherderrell8470
    @christopherderrell8470 Місяць тому

    When he says Javascript is a dynamic language (not the best for large codebases), what does he mean?

    • @msucsciinstructor6572
      @msucsciinstructor6572 Місяць тому +1

      just that larger codebases tend towards static typing like typescript or whatever

    • @Svish_
      @Svish_ Місяць тому

      The larger the codebase, the harder it is to "just know" what's going on.
      Take the example `function format(date, options)`. In a very small codebase, that only you work on, you might know that it's supposed to return a string, that `date` is supposed to be a Date, and that `options` is supposed to be an object with for example a required format string, a locale, or whatever. But the more code is in your codebase, and the more people work on it, it becomes harder and harder, impossible even, to "just know" these things.
      This is where for example Typescript, or non-dynamic languages, are super valuable. Then you'd instead see in your code `function format(date: Date, options?: { format: string }): string`, and you'd immediately know, with no experience with the code base, what this function expects.

  • @cahva2
    @cahva2 Місяць тому

    Im playing GTA 5 (again). Is that Los Santos hat that Carson is wearing? 😁

  • @Terr590
    @Terr590 Місяць тому +6

    HTMX is pro-spaghetti code

    • @nguyen_tim
      @nguyen_tim Місяць тому +1

      How so? Genuinely curious by what you mean.

    • @Terr590
      @Terr590 Місяць тому +8

      ​​@@nguyen_timHaving templates dependant on your logic and having them loosely coupled and spread out in a lot of different files always spirals out of control eventually.
      Especially since the DOM has a lot of ephemeral state that cannot be represented easily with templates (for example scroll position), which results in a lot random snippets of JS that work against the architecture of your code base.
      That's the reason why the component model of modern JS frameworks won. It is much better for organizing your code. And there's also an added DX and UX advantage of sharing code between the backend and frontend.

    • @nguyen_tim
      @nguyen_tim Місяць тому +1

      @@Terr590 All good points! I appreciate the explanation.
      I’ve enjoyed using HTMX on small projects where the scope is limited and client side JavaScript is kept to a minimum.
      But I can see how it can cause more headaches than it’s worth when the project gets larger and (god forbid) successful.
      That being said, I’ve never written a large scale app with HTMX so take my opinions with a grain of sodium chloride.

    • @msucsciinstructor6572
      @msucsciinstructor6572 Місяць тому +6

      love spaghetti

    • @chrisj21b
      @chrisj21b Місяць тому +1

      At least it is not pro-lasagna code

  • @seanmchugh2866
    @seanmchugh2866 Місяць тому

    STOP DOING THINGS TO JAVASCRIPT - horizontal crapware

  • @sasquatch_devs
    @sasquatch_devs Місяць тому

    First!

  • @erickzelaya3651
    @erickzelaya3651 Місяць тому

    First