3 ms·
Why are all these frameworks so big. Compiling, boiler plating, templating, huge API's etc. I just want a real component framework where i can have something l
by holoduke 6y ago
Why are all these frameworks so big. Compiling, boiler plating, templating, huge API's etc.
I just want a real component framework where i can have something like:
<script>
include "MyComponentFramework.js"
page = new Page();
panel = new Panel();
button = new Button().addCssClass("buttonclass");
Page.addComponent(panel)
panel.addComponent(button)
button.bind('click',function(){
panel.addComponent(someComponent);
panel.rerender();
}
</script>
I will use something like bootstrap for css.
My backend can be anything. UI is just fetching data via API's
I really don't like templating and compiling on the frontend. It makes the development process slow.
- vosper 6y agoSeems like you're asking for UI components (page, panel, button) that you can just use? This isn't the problem Next is trying to solve. You might be better off with something like MaterialUI, Ant, Bootstrap, of any of the many other batteries-included UI frameworks. Or I guess Web Components were supposed to solve this problem, too, but I think they missed their window.
- eyelidlessness 6y agoBasically what your example is describing is jQuery with some functions wrapped around some stuff. Sure, if you want to write a ton of imperative code, you can do that, but people who have been building UIs on the web for a couple decades have been down that road and have collectively determined it’s a nightmare.
- acoard 6y agoThe main thing this is missing is HTML. Sure, you can use bootstrap across the project, but components need to have their custom CSS too. If you added HTML (or really JSX, but same thing more or less), it might look like: <script> include "MyComponentFramework.js" page = new Page(); function handleClick() { panel.addComponent(someComponent); panel.rerender(); } return <panel> <button on-click=handleClick className="buttonclass"> </panel> </script> At this point, honestly you're not far off from Nextjs. Instead of callinig `new Page()` you'd create a file in `pages/my-page-name.js`.
- crubier 6y agoLol I found the Java Swing developer!