Why I don't use...
I'm numbering my arguments just to be able to reference them. Order does not reflect priority.
It's huge, both in terms of complexity and in resulting file size.
It has a dumb API: the only door to jQuery is a global
$) function. This means that very different use cases require the same API call, delegating the responsibility of detecting the desired use case to the function. This results in the
jQueryfunction being unnecessarily complex and slow.
Think for a second that you use the same function to perform many different things that you would otherwise be able to express at coding time, not run time:
// Select a single element by its ID $("#header") // Select many elements by their class $(".sticky") // Parse HTML and create new elements $("<div>") // Wrap an existing DOM element, probably for doing things like attaching events $(<DOM element>) // A unique use case: wrapping document for later binding of the ready event. $(document)
- It's monolithic. Some elements can be taken out, with extra effort, but everything still depends on a huge monolithic dependency, ActiveSupport.
"But tool X is changing towards a more (modular|scalable|modern) approach"
Sure, but the practices that tool X encouraged for so long mean that:
Adoption of the new, shiny version will either be very slow or never happen. Old applications and plugins won't work on the new version out of the box.
The practices that tool X encouraged for so long created a mindset on developers which is very hard to change.