HACKER Q&A
📣 dennisy

Do we need JavaScript web frameworks?


This may well be a controversial question, but as a developer who hates doing UI work, but would like to be able to build UIs for my projects I often find myself wondering why not build and render everything on the server?

Thinking about the internet I assume this is how most stuff worked in the past, and clients had little logic. We now have Vue, React etc and really heavy websites.

So I would like to understand is there a level of complexity at which a UI framework is needed? Do people build UIs using for example Python? Why not have a Python lib to build a full UI?


  👤 pdenton Accepted Answer ✓
I build all my client side JS with this: http://vanilla-js.com/

(And a copy of the ECMAScript specification.)


👤 ale_jacques
There are some alternatives: - https://htmx.org - https://unpoly.com

And, as mentioned by @throwaway888abc, there's also https://hotwired.dev/


👤 throwaway888abc
Did you build and maintain UI ? Pick the approach whits suits you best.

Also note - Hotwire

Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire

https://hotwired.dev/


👤 shanghaikid
It depends on what you do.

If it is simple page, vanilla js is enough. If it is a simple page application, using vanilla js is ok, but eventually you will find you need a framework or your code base is already a framework.


👤 trs8080
any backend api/framework layer (django, fastapi, flask, etc) + templates. also not a controversial question -- there's a "does anyone else hate javascript/react?" thread on HN pretty much every week or so.

if you don't need a frontend framework, don't reach for a frontend framework.


👤 mathiasrw
If you don't pick a framework, you will end up building one yourself.