7 ms·
The more I work with advanced JS frameworks, the more I think I could also have done it with just vanilla javascript (with some jquery). Webapps I made 10 years
by noud 4y ago
The more I work with advanced JS frameworks, the more I think I could also have done it with just vanilla javascript (with some jquery). Webapps I made 10 years ago where no less responsive than the webapps I make now. Nor do they take more time to create. The only difference is the size of the applications. They significantly increase with all overhead of frameworks. I wouldn't be surprised when webapp development will return partly to what it was a decade ago, where small (stand-alone) libraries are preferred to these huge, batteries-included, frameworks.
edit: With some exceptions. Some webapps are huge. They are near impossible to program without a solid framework. But this is no more than 5% of all the webapps I create.
- lukevp 4y agoReact and react-dom are < 100kb compressed, which is pretty much how big jquery is. Preact is even smaller. Which framework are you talking about that’s huge and batteries-included? if you want to drop react in a script tag and write JS that’s compatible with all browsers, you can do that too.
- fwip 4y agoI got curious and looked it up, looks like Jquery is about 30kb compressed & minified nowadays: https://mathiasbynens.be/demo/jquery-size https://mathiasbynens.be/demo/jquery-size
- helloguillecl 4y agoIf you are running a client side app generally you’ll need many other libraries as well. Just to name a few: GraphQL, i18n, Google Firebase, Date parser/formatter, Numbers, etc.
- nawgz 4y ago> GraphQL What libraries does this require? I'm just issuing fetch requests and getting back JSON. Apollo is absolutely NOT EVEN CLOSE TO required to do GQL... Honestly, both GraphQL and everything else listed seems pretty orthogonal to the original discussion of frameworks... Whether you used VanillaJS or React or a server-rendering platform, your choices of internationalization & datastores & auth & functionality require code...
- helloguillecl 4y agoIf you bring HTML rendering to the client you will need a ton of other libraries as well. There are several GraphQL libraries supporting different features, of different sizes.
- nawgz 4y agoI don't really follow your overall point. The discussion was around how "frameworks are huge", and now you're saying... You need other libraries than the framework for HTML rendering? > There are several GraphQL libraries And some of them are tiny, which is antithetical to your previous point...
- helloguillecl 4y agoNo discussion is about the architectural model, not only frameworks. Do client side rendering of HTML and you’ll need libraries, just like you do on the backend.
- nawgz 4y agoThe frameworks ARE the HTML rendering. We're really running in circles about nothing in particular here, I think it's ok to leave.
- ptx 4y ago> If you bring HTML rendering to the client The client being the browser? Isn't HTML rendering what it does? What kind of HTML rendering are you talking about?
- helloguillecl 4y agoYou render HTML with React or PHP. The browser renders a webpage using the rendered HTML, CSS and sometimes Javascript.
- 4y ago
- _hcuq 4y agoI agree. Every time I try out a framework, it always turns out to be easier to create vanilla Js for the few functions that I actually need. The one exception being JQuery. That was useful.
- nawgz 4y agoI feel comments like this must come from an individual who should actually be using SSR (Server Side Rendering) and just spitting out HTML. There is no world that composition of components - the #1 reason to use frameworks - can be solved by a "few functions", and anyone who is building serious UIs will tell you you're pretty boned without composition.
- _hcuq 4y agoMy UI is almost certainly more “serious” than yours. But it was started in 2004, long before frameworks were invented….. Just saying vanilla is not nearly as difficult as people think.