What is JS like
But wait, what is exactly jQuery?
jQuery is a super popular library that allows you to do a lot of stuff with really minimal effort. It basically registers the global
$ variable and assigns tons of helper functions to it. So you can do
$.post to POST,
$.get to GET,
$.animate to animate.
With webpages built on the back-end, jQuery can get handy with quadrillions of plugins available everywhere. Like, creating a datatable is more like, googling that, putting a JS and CSS file in the head, and wee.
But really, jQuery is so much counter-productive and sometimes just plain odd. Like, this is an example of how badly can a jQuery function be named. But anyways jQuery doesn’t really go so far when you try build things like SPAs and complex dashboards, because that’s what frameworks are for.
Frameworks in general, from what I’ve experienced, just encapsulate the whole processes from creating to running and displaying your application in a certain way that performs, develops, and scales really great. It lets you structure your code and connect it together in a certain way where all management and complexities such as performing DOM operations are outsourced away to the framework. It defines your application design.
The only disadvantage of using a modern framework is that it gets really hard with ES5, you need at least ES6 to really make use of things and make stuffs stuff (verb) better, which is limited to only a newer set of browser versions.
No not really, most of everyone uses ES6 AND support older browsers. How? well, simply put, a transpiler is used. Babel is one of those fancy transpilers that converts your ES-whatever code to some old JS, and things just automagically work. Babel has lots of plugins to do a lot of transpilations, React has even its own Babel plugin to transpile some react-specific code. Babel’s output is usually passed to webpack to bundle modules.
Yep, one more thing
Webpack is a module bundler, it bundles out all of the modules, components, and combines them with their dependencies (such as those installed via NPM) to create some static JS that represents the whole of your logic, which is usually the JS that actually gets loaded by the browser.
So TL;DR huh?