D
David Mark
Asen said:They often use the word "magic". That is marketing strategy. There is
many books which explain jQuery or better to say, those books are for
jQuery propaganda. If you open jquery.com you can see a bold
sentence:
| jQuery is designed to change the way that you write JavaScript.
If I am looking for framework for specific application and I see that
sentence I will hit the close button and gone away. If someone want to
change the language, he is free to implement own language. If they try
to change my style of programming that mean more time for development
of my project. And of course that changes do not guarantee nothing.
They not guarantee real improvements and unfortunately they are not
provide any improvements. They only provide excuses for unreasonable
development. Does anybody explain the meaning of:
jQuery.isPlainObject
What should mean "plain object"? In theirs documentation is written:
LOL. That was isObjectLiteral (which is even goofier) until I brought
it up on review.
| Description: Check to see if an object is a plain object
| (created using "{}" or "new Object").
That is just native object for which next object in prototype chain is
object referred by Object.prototype. Why they need to recognize
prototype chain of native objects, especially in this way? What non-
generic can do it on Object instance to need recognize?
Could someone explain these question.
In short, jQuery (and other similarly incompetent efforts like Dojo)
relies on untenable "overloading" strategies. The classic case is
requiring discrimination between host objects and Object objects. Taken
a step further in the absurd direction, arrays are often tossed into
that mix (hence the "need" to use an "isArray" function). You just
can't do that reliably in JS and there is never any need to try.
The long answer is that the jQuery authors are often ignorant about the
concepts they attempt to abstract. They don't even understand the
various methods for measuring element dimensions. You won't get far
with an abstraction that favors one form over another as "better". And
of course, attributes are not properties, properties are not attributes
and neither is "better" than the other. You've got people who don't
know what they are doing trying to provide a layer for others who don't
know what they are doing. That's why they constantly change the thing.
Not just little bits, but wholesale design changes that invalidate
previous applications (not to mention browsers). Of course, the biggest
(and most needed) changes can never happen until they tear down the
whole thing and start over with a design that is realistic for JS and
browser scripting. But that will require people with practical JS and
browser scripting experience (not just those who imagine contributing to
jQuery or Dojo or whatever counts in that column).
I recently saw where the Prototype people are proposing a "new
Prototype". I'm not even sure what that means (blobs of browser
sniffing JS do not a brand make). But if you've got architects who
created a condemned structure, requiring it to be torn down and rebuilt
from scratch, would you really bring them back for an encore? The same
goes for Dojo, YUI, extJS and other diaries of mad browser sniffers.
They had their shot and they muffed it. Nobody needs an old or new
Dojo. Nobody but Yahoo ever needed a YUI and sure as hell you don't
need to pay some slob from "Firebug University" for their bloated widgets.