It seems like every week there is another ground-breaking new web framework. Some of them are interpreted, some compiled. Some of them are based on HTML tags, some component driven, and so on.
So, what would the "ideal" framework look like, maybe using ideas of existing frameworks? Of course, no framework is perfect for use everywhere, but what would come close?
Latest comments (58)
Vue is the closest to my ideal now.
I would also prefer something like this, except no Virtual DOM.
Hi, if you like Rust, try to look at MoonZoon.rs. Not production ready yet, but you can find ideas and docs in its readme and there are working examples in the repo.
Something that gets things done without too much learning curve that is coupled with design software like Xd & Figma for you to translate from design to code.
Without installing a bunch of libraries just to get started. Adopting modular approach using WebAssembly as their core package management is really a good start so anyone can use the compiled modules and adopt it into their website for different purposes.
I come from a django/flask background so I really like 1 way to do things to get started while adding more functionality when you need more stuff.
Solid js is heading in the right direction. Though webcomponents would be future proof. Frameworks like lit and stencil do this pretty well. Personally I am looking for an easy to integrate web assembly framework.
For me, Angular with faster hmr, build times comparable to vite.js and support for framer-motion. That should do it for me.
Silverlight
I have recently been exploring flutter/dart
It's not html, it's not css, it's not javascript, but it makes for beautiful pages.
What I find most appealing is write once compile to web, desktop or mobile
If you want to try something different (and it is very different) have a look.
Happy Coding
I would say the closest is Angular. It lacks the better performance and smaller bundle size and more 3rd-parties of other solutions, but it has an amazing philosophy, ease of development and general stability which would really justify some more support from the community instead of pure hatred.
You have mandatory TypeScript and RxJs and first-party packages for routing, fetching and forms, which is pure gold. The rest is meh and should be improved.
Angular is especially awesome when you scale , but it's not the best for small apps.
Ideally, a framework should:
There is no ideal framework. Be a good engineer that is properly trained and good things will come
Could you imagine a web without HTML? A framework that works on the DOM directly could be much smarter than what we see today. The Document Makeup Library (DML) is one first step in this direction.
DML sounds interesting, but writing a whole lot of JavaScript would feel weird.
No, DML is VERY different.
You do not write too much Javascript. As an example, the DML-homepage was set up using only two short HTML-pages. Each page contains about 100 lines of project specific Javascript-code, no HTML, only very few CSS. Behind the scenes you can use some libraries that do the work for you. So, the whole site with numerous pages was created using markdowns, the content is build dynamically after page load. All the routing is done dynamically while the page content is loaded.
Why do I call this a "framework"? Because it contains everything you need to build a web page or a SPA.
There are lot´s of examples on dev.to that show, that sources usually are very short.
This may server as an example:
HTML
DML
But the approach is far more powerful than you can see from this few lines. Instead of building pages "by hand", you let Javascript do the work. Want to create 10000 buttons? Just write a loop to do the work:
Voila! with only two lines
One library and a text editor is really all you need.
You think, 10000 functions may be too much, can we save some memory?
ok, this was three lines of code, but only one alert function for all buttons.
You will need to learn Javascript, but it is the only tool you will need. This pays back very soon!
I would love to see an exhaustive official standard library as in other languages
The ideal framework for me doesn't get in the way and has just enough tools to get the job done, supports tree shaking, has the performance of hand optimized code, foregoes needless abstractions, provides an enjoyable developer experience and doesn't fill node_modules with a GB of dependencies. It basically consists of manageable reactivity and JSX as a template language (because of the superior tooling). Also, it would be free and open and supported by a welcoming and friendly community.
Only a few weeks ago, I found Solid.js and it seems to be as close to this as it gets.
The best framework for me is "no framework". Nothing beat writing things from scratch.
Yea, nothing beats running your own code on the silicon you've mined with your own hands... 😝
The ideal framework would be one that doesn't try to put web technologies into everything. Ideally, web frameworks should stay web frameworks. Electron, React Native, stuff like that doesn't make sense to me - why reuse a web-language to do non-web stuff? Just because we can?
Now, sticking to the web, anything that doesn't rely on node_modules (or better - that doesn't rely on the Node way of doing things) at all, no bundling, with the minimal tooling possible. Just plain JS files that you can drop into your HTML files and be good to go.
Seriously speaking, front-end development is a nightmare. Even the so-hated PHP is a better language to work with (for me) because it is so much simpler!
We reuse a web-language to do non-web stuff because nobody wants to learn a whole new language and maintain a different codebase for non-web stuff like apps.
While the no-node way is easier, it's not very flexible. You can't have multiple file components, or stuff like that. If you need those, in the end you will have to compile it.
He is talking about Javascript frameworks that work on user interface not desktop or mobile apps