3 ms·
It is actually amazing how much can be done with vanilla JS without fancy frameworks.
by richrichie 3y ago
It is actually amazing how much can be done with vanilla JS without fancy frameworks.
- dylan604 3y agoWhy is that amazing to you? Frameworks are just vanilla JS wrapped up in specific functions to that framework that do a lot of abstraction level work for you.
- mp05 3y agoPerhaps it's strange to the uninitiated that so many seemingly useless/redundant abstractions exist around something that seems pretty capable of doing the job without a bunch of handwaving. If you never worked with the DOM in 2012 and had a need to support every browser out there, you'd not understand the pain that was involved.
- dylan604 3y agoThe one thing that I thought was a pro for frameworks were all of the compatibility tricks they abstracted away. It allows for your code to be cleaner by not having to constantly use if branches testing the user's browser. It meant that the frameworks update kept up with any new quirks freeing me from constantly researching them and updating my code. My code can stay the same, and my project stays up to date with those quirks by updating the framework.
- reactordev 3y agoIt only seems capable due to those frameworks and abstractions. At the end of the day, there are only so many builtin types and functions on the core runtime. Everything else is up to the ecosystem to provide. Just like C or C++, at it's core, it's just a basic language for things. It's the libraries of code from others that give it [more] powers.
- mp05 3y ago> It only seems capable due to those frameworks and abstractions. Are talking about Javascript or the DOM? I write a lot of NodeJS and since somewhere around v8 or 9 it became pretty nice to use.
- reactordev 3y agoNodeJS is a framework. It adds to base JavaScript API’s for working on the system side. It’s an abstraction (albeit, additions) that give you more functions.
- mp05 3y ago> NodeJS is a framework. Huh, I had no idea. Sometime around Node 8.x, the async/await functionality in the ECMA spec was finally added to the stable API and I began to enjoy writing Javascript as a result. The language had a feature that was good, but the abstraction did not yet fully support it without a flag. The ECMAScript language is a good language.
- ivanjermakov 3y agoActually everything can be and _is_ done with vanilla JS. It's just frameworks and libraries that abstract this complexity away. I think the problem is not so much about JS as a language, but about the amount of low quality libraries and frameworks that make it more productive.
- happytoexplain 3y agoFrameworks generally don't enable you to do something, they provide a framework in which you can do something you already could, but in a way that's more organized, efficient, extensible, robust, and/or stable. I.e. they enforce rules. You can come up with those rules yourself and follow them ad hoc. All the framework does is programmatically enforce them and abstract away boilerplate (e.g. "define X as a function of declarative state" is a common one, like React for UI).
- random9749832 3y agoIt is turing complete language. Why would you be limited? You could write anything even with brainfuck.