"The State of Frontend" by Alexander Davis

Sdílet
Vložit
  • čas přidán 19. 05. 2024
  • 'Frontend Web Development' has a bad reputation for being overly complex and difficult to keep up with, but is there still truth to this these days? And what tools should I use for my next (or first!) ClojureScript web application? Find out in the presentation from JUXT's 10th anniversary party!
    (This is a reupload due to audio issues)
    00:00 - Introduction
    00:21 - Talk Starts
    01:20 - A map of the current frontend landscape
    03:49 - Introducing my recommended 'Stacks' (A stack meaning a set of tools used in a frontend project)
    04:30 - The Standard Stack - Shadow CLJS, Reagent, Re-Frame
    05:40 - Quick overview of React Hooks
    07:10 - The Modern Stack - Shadow CLJS, UIx2, ReFX/Re-Frame
    11:40 - The Dark Side Stack - Vite, Tanstack, Jōtai, TypeScript
    15:45 - The Wild Card - SquintCLJS
    18:29 - Which one to choose?
    20:05 - Q&A
  • Věda a technologie

Komentáře • 12

  • @kentbull
    @kentbull Před 10 měsíci +3

    This is exactly what I needed to hear today. I'm going with standard for now, looking forward to playing with UIx and SquintCLJS. Thank you!

  • @faster-than-light-memes
    @faster-than-light-memes Před 9 měsíci +1

    Very valueable ideas. Thanks.

  • @BobbiCodes
    @BobbiCodes Před 10 měsíci +5

    This is really good! I recently had to work on a React codebase and nearly lost my mind. I was however able to use Vite with plain JavaScript instead of Typescript, using Shadow-cljs to compile the cljs parts.

    • @kai.m
      @kai.m Před 10 měsíci

      If you're losing your mind working on a react codebase then the codebase is probably the problem. Working with react should feel like a breeze, but unfortunately it can't prevent developers from writing bad code.

    • @BobbiCodes
      @BobbiCodes Před 10 měsíci

      I can't blame my coworkers, they were just using the same thing everyone else does, and their code is fine. The fault was all my own, for not ever learning React and frankly not caring to. I was only able to gain traction by stepping away from it as if it was vanilla js, writing my feature, and worrying about the React part later. In the end I was able to just ship an ESM module anyway!

  • @SimonGrayDK
    @SimonGrayDK Před 9 měsíci +1

    I think Rum deserves a mention too. I'm not aware of any other Clojure React wrapper that is fully CLJC-compatible, e.g. it allows you to perform server-side rendering in JVM Clojure. Libraries like Reagent require you to use ClojureScript in the backend for the same functionality.

    • @juxt4112
      @juxt4112  Před 9 měsíci +1

      UIX (mentioned in the talk) is CLJC and they have some docs on SSR, though personally I would stick to plain hiccup or selmer if I was doing server side rendering with Clojure. I think trying to do react SSR with CLJC is a bit of a minefield and I would always reach for Astro or Next JS if I really needed both SSR and React. I've tried SSR with Rum and had quite a few issues with it (though this was 5 years ago or so).
      Just my personal opinion of course, quite possible I was just using it wrong :)
      Alex

  • @pappapez
    @pappapez Před 10 měsíci +3

    Thanks, Alex! This is a fantastic presentation, from idea to execution. There's something with Reagent that fits for me. I love Hiccup and how that makes it easy to treat my views as data. UIx looks fantastic, and I remember how well it just blended in with Reagent when working with Pitch's client, which was using both (and migrating to UIx if, iiuc). I should take Squint for a spin. What is the REPL story there? Also, with the 1:1 mapping to JS, it seems like maybe you loose some hot replacement of new versions of functions and such might work differently/not as well as with regular ClojureScript?

    • @juxt4112
      @juxt4112  Před 10 měsíci +3

      Yeah a lot of people like the concept of Hiccup and if you have a UI that doesn't suffer from performance issues it's still a great choice.
      I'm planning on doing a followup video showing my dev environment with squint (hot code reloading, project structure, repl workflow etc) but the short answer is that the REPL story isn't great (see clojurians.slack.com/archives/C8NUSGWG6/p1687801112497799?thread_ts=1687786096.050629&cid=C8NUSGWG6 for more info on why). However I've gotten by ok with a babashka repl (automatic if you use neovim + conjure, not sure about other editors but sure its possible) so I can at least eval and test pure functions inline, and because the compiled js is more readable the standard js tools are always there for debugging live code. The experience is not as good as a standard CLJS REPL but honestly I don't think the standard CLJS REPL is that great anyway (you can't eval react components, inline callbacks need to be extracted and tagged with #' etc)

    • @CalvaTV
      @CalvaTV Před 10 měsíci +2

      @@juxt4112 ​ I'm having a great time with the ClojureScript REPL! This is reason alone for me to test Squint and Cherry out, to see how Calva likes it. Generally Calva is very Babashka friendly so at least that kind of workflow should be possible. Looking forward to the followup!

    • @pappapez
      @pappapez Před 10 měsíci +2

      Haha, and that was me. I'm getting confused who I am at times...

    • @BobbiCodes
      @BobbiCodes Před 10 měsíci +2

      I just watched the video titled Babashka Conf 2023: "Growing an Ecosystem: Lessons Learned (Closing Keynote)" by Michiel Borkent and was pleased to learn that despite the fact that JavaScript's module system is antithetical to achieving the late-binding required for a REPL context, Michiel will not let that stop us.