Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Angular is the only framework in that list. Angular elements would be my choice for most things because I like flexibility with good defaults, testing and type checking ootb.
React will be the simplest, but require more plumbing. Use this if you only need to add views and basic routes.
jQuery should be legacy only.
Better and easy isn't an intersection that exists.
yellow-dog4757279dVue is the best compromise between easy and good
hjk101233778dHonestly I don't get the crap jQuery gets. It's not legacy. For example jQuery really out performs the vanilla "framework". It doesn't crash all the time a freaking element does not exist and is readable while having almost no overhead in real world application.
If you need to do some Dom manipulation use jQuery, it's still the best for that.
If you go the react way, take a look at mobx before you go redux.
That sentiment is dangerously stuck in the past.
- all the Dom manipulation, traversal and query is vanilla now, it's not "the best for that" anymore in any sense
- $ajax is replaced by fetch, xmlhttprequest at worst
- jQuery has no update cycle coordination, so at any significant number if jQuery managed elements in the DOM you run the risk of forced repaints and layout thrashing and poor performance
- contributing to the previous, no two things in jQuery are aware of each other, everything is an island. Because of this, two instructions querying the global DOM can collide, and there's no single ownership
- there's no compile time support for jquery in regards to how it interacts with the DOM, so you end up passing strings as templates routinely (no AST)
- traversal performance is 4x slower than native, on its best day
- animation performance is awful, doesn't use modern features and competes with css animations
- people lean into plugins, so you end up with version competition
- it doesn't respect the modules paradigm, which leads to duplication
It was designed as an all the things polyfill for browser differences in the "bad parts" era. John Resig did amazing work, so amazing that the things he did shaped what is now. jQuery is 30kb your site just doesn't need anymore.
Gnonpi83478dI'd say start with simple jQuery and when you want to move to more sophisticated frontend, move to React/VueJs. As a primarily Python backend guy, I prefer using VueJs as creating a hierarchy of components and the event handling is a bit simpler
Taqsblaz353078dThank you all for your contribution/advice/suggestions/enlightenment
From the looks of things:
hjk101233778d@SortOfTested well I have a lot of faith in your as you are one of the more knowledgeable people on the planet.
I have not looked at it since vanilla was all the rage about a year or two ago. Have not done any new jQuery projects since then either. As you can see on http://youmightnotneedjquery.com/ things just require far less and more concise code in jQuery. Every performance comparison was horribly in favour of vanilla. I could optimize the examples in a minute and have negligible performance difference. (Couldn't find the article and jsfiddle on slack anymore sorry). We have a large customer base on ie11 but that is finally going down a bit. So if I evaluate it again I might completely agree with you!
And of course as with JS you have to avoid the bad parts/plugins.
I've suffered a lot, and share my pain for free 😉.
The IE bit is your technical debt coming back to haunt you. Microsoft is consistent on it's messaging that IE isn't a browser, it's a compatibility solution for code that cannot change.
The flip side of that message is, if you can't get them on at least Edge chromium, you will be obliged to continue digging yourself deeper.
Taqsblaz353078dSuch a question with so many good response
It only got 1 ++
Typical lyf of a Dev :-D
Develop a system that generates thousands and yu only get a tap on the shoulder