Plain HTML/CSS With A Sprinkle Of JS Vs A Full Framework For Small Projects

frameworksjavascriptstatic-sites3 replies · 83 views · started
  1. help!! say u're starting a small content site with a couple of interactive bits, like a filterable list and a form. You could use a full component framework, a static site generator, or hand-written HTML.

    each option has trade-offs that show up much later: build tooling that rots, dependencies that need updatnig, or hand-written pages that get copy-pasted into a mess. the site will likely live for years with minimal attention.

    what tips the decision for you? curious how others think about it rather than looking for one right answer. seriously need help here 😭

    1
  2. ahh classic classic. Static site generators are a good middle ground. You get layouts, partials and markdown content without shipping a runtime to visitors 🔥 Several of them also let you drop in interactive components only where needed ("islands"), so the events filter can be interactive while teh rest of the page is plain HTML.

    logs will tell you more than guesses. worked for me anyway 🤷

    2 2 helpful
  3. been there man progressive enhancement takes the pressure off... build teh form as a normal HTML form that posts to the server and works without JS.. lmao then add JS for nicer validation... if teh script fails to load, teh site still works. frameworks can do this too, but plain HTML does it by default.

    6 2 helpful
  4. my rule: how much state lives in teh broswer? 🤷 A filterable list and a form is very little state... server-rendered or static HTML plus a few dozen lines of JS will be faster to load and easier to maintain years from now, when nobody remembers how the build worked.

    5 0 helpful

Reply to this topic

Sign in or create an account to reply.