Prototype - Good/Bad/Why?

M

Matt Kruse

Matt did mention in one of the recent, colossal jQuery threads that he
uses jQuery at work and doesn't have much time for his own code
anymore. I don't know if he is keeping up to date.

I don't read this group as intensely anymore, but I'm flattered that I
am remembered! ;) I will now proceed to wander off-topic...

I do not write much code anymore, either at home or work. You know how
it goes, all genius must happen before wife and kids, and I'm way too
late for that. I consider most of my code to be pretty solid for what
it does, and there isn't a lot of need to re-visit it. Certainly some
of it should be removed or re-written, since I now know better
practices and could create a better product. But for the most part, I
think a lot of my previous work (certainly not all of it) is still
pretty good.

I have updated some of my code recently, like the table sorting/
filtering/paging library, but I haven't put all the latest stuff out
there. I just don't have much time anymore, or to be honest, much
interest. I use jQuery quite a bit at work and for personal stuff. Not
because it's perfect, because it's certainly not, but because I know
my limited scope and requirements and the trade-off of using a single
library that does everything _I_ need correctly in the environment _I_
know I have versus writing things from scratch definitely leans in the
favor of the jQuery approach.

So lately some of my efforts have been put into writing jquery plugins
for personal/work purposes, or fixing existing plugins, or patching
jquery code to work as I would like it to.

I also spend more time working on Gadgets these days, which I find
more interesting :)
http://www.google.com/ig/authors?hl=en&[email protected]
I don't think Matt's library should be mentioned because it is not a
frequently asked question. Also there is not a consensus that Matt's
library is bad (actually it is probably the contrary) so I wouldn't
want to imply anything about his code.

My code may be known in small circles, but nowhere close to libraries
like jquery, prototype, etc. I doubt that anyone looking for pros/cons
of "major libraries" would be looking for comments on my code.

Matt Kruse
 
T

Thomas 'PointedEars' Lahn

timothytoe said:
Until a clj Nazi codes a "correct" library with the capabilities of ^^^^^^^^
jQuery or Prototype or YUI, those libraries will be continue to be
used to make websites. [...]

Godwin's Law. You lose.


PointedEars, with a fitting random signature
 
T

Thomas 'PointedEars' Lahn

David said:
One flat namespace is all that is required IMO. Its only purpose is
to keep the global namespace clean.

There are no namespaces in implementations of ECMAScript up to Edition 3
Final. In such a highly dynamic language, it borders to self-delusion to
think that those "namespaces" uninitiated people talk about would
automatically help to keep the global "namespace" clean. That they do not
can be be readily observed with the number of "namespaced" libraries (and
mindless accreditions of those in script-kiddie Web sites) which fail to
declare identifiers as local variables.


PointedEars
 
T

Thomas 'PointedEars' Lahn

John said:
To help you out the correct quote is:
"Since valid HTML is simply a subset of XML, having an efficient way
to parse and browse DOM documents is absolutely essential for making
JavaScript development easier." (Chapter 1, Page 8)

Are you serious and currently capable of cognitive reasoning? Then you
should be able to read both the HTML and the XML Specifications and
recognize that what you wrote is complete utter nonsense.

JFYI: HTML is an application of SGML. XML is a subset of SGML. XHTML is
an application of XML. And finally, your statement is, even if corrected
*accordingly*, a non sequitur.

I can only second what was said before: you really should stop with
everything that involves Web software development until you got the very
basics, the above included. Any other course of action is a recipe for
disaster, as (unfortunately) jQuery readily reveals.


PointedEars
 
D

David Mark

According to the author of JQuery there are cases where it's the only
thing that "works". You can't test for rendeing bugs by feature detection.
You can have browsers that implement a feature so badly that you must
avoid it, even if feature detection detects it.

It is important to make the distinction between feature testing and
feature detection. The former can weed out or compensate for broken
features, whereas the latter can only tell if the features are
present.
There is no easy way to make two pieces of crap compatible :)

Nobody said it is easy. The oft-repeated myth is that it is
impossible.
 
D

David Mark

No, that's the real world, where people don't care if it works in

What the developers care about is immaterial.
anything but IE and Mozilla, and are happy if it also works in

That isn't the real world for users of other agents.
Safari, Opera and Konqueror too. That real world, which is nowhere
near the utopia where everybody writes web pages that work in all
browsers.

The imagined utopia is a world where mobile devices, set top boxes and
other off-brand browsers do not exist. That does not describe the
public Internet today and will diverge futher from reality in the
future. It is best to get a handle on it now.
 
D

David Mark

There are no namespaces in implementations of ECMAScript up to Edition 3

Thanks for that. I think we all know what the term "namespace" means
in the context of this discussion.
Final.  In such a highly dynamic language, it borders to self-delusion to
think that those "namespaces" uninitiated people talk about would
automatically help to keep the global "namespace" clean.  That they do not
can be be readily observed with the number of "namespaced" libraries (and
mindless accreditions of those in script-kiddie Web sites) which fail to
declare identifiers as local variables.

Incompetent implementations aside, adding methods to a single globally
declared object generates far less pollution than creating a new
property of THE Global Object for every function in a library.
 
T

Thomas 'PointedEars' Lahn

David said:
David said:
Then there is that ridiculous "namespace."
Namespacing seemed stupid to me, at first. I mean, these aren't
"packages", they're just objects.
One flat namespace is all that is required IMO. Its only purpose is
to keep the global namespace clean.
There are no namespaces in implementations of ECMAScript up to Edition 3 [...]
Final. In such a highly dynamic language, it borders to self-delusion to
think that those "namespaces" uninitiated people talk about would
automatically help to keep the global "namespace" clean. That they do not
can be be readily observed with the number of "namespaced" libraries (and
mindless accreditions of those in script-kiddie Web sites) which fail to
declare identifiers as local variables.

Incompetent implementations aside, adding methods to a single globally
declared object generates far less pollution than creating a new
property of THE Global Object for every function in a library.

Not necessarily.


PointedEars
 
D

David Mark

David said:
David Mark wrote:
Then there is that ridiculous "namespace."
Namespacing seemed stupid to me, at first. I mean, these aren't
"packages", they're just objects.
One flat namespace is all that is required IMO.  Its only purpose is
to keep the global namespace clean.
There are no namespaces in implementations of ECMAScript up to Edition 3 [...]
Final.  In such a highly dynamic language, it borders to self-delusion to
think that those "namespaces" uninitiated people talk about would
automatically help to keep the global "namespace" clean.  That they do not
can be be readily observed with the number of "namespaced" libraries (and
mindless accreditions of those in script-kiddie Web sites) which fail to
declare identifiers as local variables.
Incompetent implementations aside, adding methods to a single globally
declared object generates far less pollution than creating a new
property of THE Global Object for every function in a library.

Not necessarily.

It is one vs. many. How could you consider many to be less pollution
than one?
 
R

Richard Cornford

Thomas said:
Are you serious and currently capable of cognitive reasoning? Then
you should be able to read both the HTML and the XML Specifications
and recognize that what you wrote is complete utter nonsense.

JFYI: HTML is an application of SGML. XML is a subset of SGML.
XHTML is an application of XML. And finally, your statement is, even
if corrected *accordingly*, a non sequitur.
<snip>

Obviously true as that is, plus the chronological consideration were it is
difficult to see how HTML could come into existence being a subset of
something that had not yet come into existence itself, the assertion is not
about HTML as such, but rather about "valid HTML". The latter might be taken
as asserting a relationship between the specific mark-up of valid HTML and
XML. Of course that would not help as valid HTML mark-up does not even
necessarily satisfy XML's well-formed-ness rules, and with regard to HTML
elements with EMPTY content models validness in HTML would preclude even the
possibility of satisfying XML's requirement for XML mark-up to be "well
formed".

Disregarding that still leaves the implied IF-THEN relationship between the
section of the 'sentence' before the comma and the section after it, and the
veracity of the section after it (particularly given the use of javascript
in non web browser contexts).

Richard.
--
"In JavaScript, null, 0, '', false, and undefined are all equal (==) to each
other, since they all evaluate to false. This means that if you use the code
test == false, it will evaluate true if test is also undefined or equal to
null, which may not be what you want." - John Resig: Pro JavaScript
Techniques. 2006
 
R

Richard Cornford

Gregor said:
Thomas 'PointedEars' Lahn meinte:
John Resig wrote:

[snip]

I doubt that he is reading this reply...

Don't bet on that. How do you think he found the signature in the first
place if not looking himself up on Google? The reply(s) may be found in the
same way.

Richard.
 
D

David Mark

Gregor Kofler said the following on 2/18/2008 3:39 AM:
Thomas 'PointedEars' Lahn meinte:
John Resig wrote:

I doubt that he is reading this reply...

That's his loss. John Resig could learn a lot from this group and this
thread in particular.

It is also the loss of anybody who relies on his code to build Web
pages and applications, their clients, and ultimately the unwitting
end-users. Then there are those who attempt to learn about JavaScript
and general browser scripting issues from studying his code, blogs,
books, etc.

Clearly his inability to come to terms with his own incompetence and
refusal to learn from those who know better results in damages that
are far-reaching and losses that are virtually incalculable.
 
D

David Mark

David Mark said the following on 2/18/2008 5:25 AM:




Gregor Kofler said the following on 2/18/2008 3:39 AM:
Thomas 'PointedEars' Lahn meinte:
John Resig wrote:
[snip]
I doubt that he is reading this reply...
That's his loss. John Resig could learn a lot from this group and this
thread in particular.
It is also the loss of anybody who relies on his code to build Web
pages and applications, their clients, and ultimately the unwitting
end-users.  Then there are those who attempt to learn about JavaScript
and general browser scripting issues from studying his code, blogs,
books, etc.
Clearly his inability to come to terms with his own incompetence and
refusal to learn from those who know better results in damages that
are far-reaching and losses that are virtually incalculable.

The true loss is that Richard quoting his book (which is what I assume
he is doing) could lead to the opposite reaction whereby people start
thinking Richard agrees with it and that it becomes acceptable. After
all, "Richard Cornford said it in Usenet".

Yes, that thought occurred to me as well. Viewing some of the
messages from this thread (specifically the absurdist signatures) out
of context could result in the mistaken impression that Richard is a
fan of this menace.
 
G

Gregor Kofler

Randy Webb meinte:
Gregor Kofler said the following on 2/18/2008 3:39 AM:
Thomas 'PointedEars' Lahn meinte:
John Resig wrote:

[snip]

I doubt that he is reading this reply...

That's his loss. John Resig could learn a lot from this group and this
thread in particular.

Well, since he is a self-proclaimed "JavaScript evangelist" (as a
non-native speaker I find such notions ...er... odd), I suppose he
relies on "believing" instead of "learning and understanding".

Gregor
 
D

David Mark

Randy Webb meinte:
Gregor Kofler said the following on 2/18/2008 3:39 AM:
Thomas 'PointedEars' Lahn meinte:
John Resig wrote:
[snip]
I doubt that he is reading this reply...
That's his loss. John Resig could learn a lot from this group and this
thread in particular.

Well, since he is a self-proclaimed "JavaScript evangelist" (as a

LOL. I haven't heard that one before.
non-native speaker I find such notions ...er... odd), I suppose he

English is my first language and I don't know what that means either.
relies on "believing" instead of "learning and understanding".

Exactly. And he only preaches to his own choir. When addressing more
enlightened denominations (this group for example), he comes off as a
"JavaScript charlatan" and is quickly booed off the stage.
 
G

Gregor Kofler

David Mark meinte:
LOL. I haven't heard that one before.

Here:
http://ejohn.org/about/

Since he is the "JavaScript Evangelist for the Mozilla Corporation" I
should reconsider my using of Firefox... But then: Perhaps he's just the
professional guinea pig for debugging add-ons like FireBug.

Gregor
 
R

RobG

David Mark said the following on 2/18/2008 5:25 AM:
Gregor Kofler said the following on 2/18/2008 3:39 AM:
Thomas 'PointedEars' Lahn meinte:
John Resig wrote:
[snip]
I doubt that he is reading this reply...
That's his loss. John Resig could learn a lot from this group and this
thread in particular.
It is also the loss of anybody who relies on his code to build Web
pages and applications, their clients, and ultimately the unwitting
end-users.  Then there are those who attempt to learn about JavaScript
and general browser scripting issues from studying his code, blogs,
books, etc.
Clearly his inability to come to terms with his own incompetence and
refusal to learn from those who know better results in damages that
are far-reaching and losses that are virtually incalculable.
The true loss is that Richard quoting his book (which is what I assume
he is doing) could lead to the opposite reaction whereby people start
thinking Richard agrees with it and that it becomes acceptable. After
all, "Richard Cornford said it in Usenet".

Yes, that thought occurred to me as well.  Viewing some of the
messages from this thread (specifically the absurdist signatures) out
of context could result in the mistaken impression that Richard is a
fan of this menace.

I think they are humorous. If they stimulate debate, in whatever
forum that may be, then they are a good thing.
 
T

toby.oconnell

dhtml said the following on 2/17/2008 3:37 AM:

[snip]
Pick Popular libraries that getasked about frequently. EXT, YUI,

What constitutes "asked about frequently"?

The one recurring one that gets asked about, more than any other, is
prototype.js


Apparently, some criteria were used to determine which topics to add
to the FAQ since the FAQ is not empty. Perhaps those same criteria
could be applied to framework-related questions. If the regulars here
are tired of fielding framework/library questions, that would be a
good indicator that those questions are "asked about frequently."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top