It's possible that this is the case. But my take is that the
quality of JS found around the web is better than it was before
the onset of the GP libraries.
While my impression is that it is about the same.
There are still plenty of really poor scripts floating around
(and I'm talking about ones that make jQuery et al
look positively brilliant)
What about the really poor scripts that use JQuery et al?
but they no longer get the exposure they used to, as it's
become so easy to achieve what these sometimes massive
one-off scripts did using only line or two of jQuery-based
code. (Dojo, MooTools, YUI, whatever.)
The "massive" one-of scripts you refer to (at least the better of
them) tended to be designed to be copied into a web page and then
given a "line or two" of configuration. There is not that much
difference between doing that and using a general purpose library,
except that the one-off script likely did not contain much that it did
not use, but the general purpose library will contain some that is not
used in any equivalent task.
I do see libraries such as JQuery superseding the copy-n-paste script
collections of the past, but only in that they provide the equivalent;
a source of example code that people who don't know what they are
doing can copy and paste into their own pages, achieve a 'working'
outcome, and elaborate through repletion. Indeed, I see that as the
best (if not the only) way in which any new library will achieve
'popularity'. Technical quality will always be largely irrelevant (so
long is it isn't so bad that it is obviously non-functional on common
browsers) because the people looking for a 'solution' to their problem
cannot judge that aspect, while the (relative) ease of pasting an
example into a working context is something that can easily be judged.
Sure these libraries to some degree impose their viewpoints
upon their users -- MooTools users are more likely to look
for OO solutions to their problems, jQuery people always want
to "find something, do something" -- but I don't think
that routinely leads to a a counter-productive skewing of
perspectives.
That isn't what I was referring to. I was thinking in terms of
people's perceptions of their own abilities. I have observed before
that early superficial success (often following earlier frustration)
with the language seems to result in a quite unjustified
overconfidence in ones own abilities, and that while suffering that
overconfidence it becomes difficult to learn/advance (due to the
perception that you have already learnt/advanced). I base this on both
my own experience and observations of others.
I avoided becoming stuck at that first hurdle by interacting with a
(large-ish) number of people who really knew javascript, and were not
afraid letting people know when they were wrong in very plain
language. But what if the people you look to are themselves stuck in
at some early stage, blinded by their overconfidence and trying to be
big fish in some suitably small pond?
I have already cited one example, and here is another in the form of a
book review, of John Resig's "Pro Javascript Techniques":-
<URL:
http://robertnyman.com/2007/01/30/pro-javascript-techniques-by-john-resig/
- where the author concludes:-
"I would say that any JavaScript web developer out there, from
intermediate to advanced, can learn something sincerely valuable from
this book. If you’ve just hooked on JavaScript, and want to be a
scripting star, this is the book that explains how to learn about the
inner workings of object-orientation in JavaScript, event handling and
stretching the limits. With some more appealing use cases, this would
be almost a perfect advanced book about JavaScript."
From which we can conclude that the author sees himself as someone who
should be giving advice on the subject, giving advice on "advance"
javascript learning and so presumably considering himself to be
"advance". Yet where does this review cover the many technical
inaccuracies in Resig's book? Even disregarding the books many other
faults, the many statements made that are just technically false
should not have gone by unnoticed by an "advanced" reader, and so such
a positive conclusion would seem unwarranted. Again the author's
perception of his own abilities have lead poor advice being given, but
advice that will likely impact on its reader's perceptions of their
abilities.
Strange, I commented on the same issue with that pattern in a
different forum a few days ago:
<
http://forum.jquery.com/topic/advanced-plugin-authoring-tutorial>
I hadn't looked at his other posts to realize that he was quite
possibly a blowhard. I just assumed he was confused and had left
behind detritus from earlier versions of his work. But I think the
answer is more fundamental: his grasp of JS is fairly tenuous.
Yes, "enterprise level", "advanced", "pro", ect., yet a fairly tenuous
grasp on javascript. If that is not a skewed perception I don't know
what is.
I think one of the way they advance is to actually wean
themselves away from using their tool of choice, taking with
them some of what they've learned. If they've learned something
about using closures to maintain state from their work with jQuery,
perhaps they'll take that along. If they've learned how to
decorate objects with additional methods from Prototype, maybe
they'll take that. If they've learned how to structure their
JS in an OO manner from MooTools, that might be what they take.
Of course they'll have unlearning to do. But most advancement
involves some degree of unlearning.
But what if the things that they unlearn include the opinion that
starting out using a general purpose liberally was a good idea?
There will always be those who perceive themselves as more
advanced than they are. And some of them will obnoxiously
trumpet themselves and the knowledge they think they've acquired.
They're likely a very small minority.
Small minorities can have a very disproportional influence. People who
trumpet appealing idea will tend to be found appealing; your don't
have to learn javascript in order to script web browsers at an
enterprise level, read this book and you will lean all you need to
know, we have thought of everything so you don't have to ... .
Richard.