A
ashore
Guys, I see a fair bit of negativity around re subject package. Can
someone share your views, either way?
Thanks,
AS
someone share your views, either way?
Thanks,
AS
Guys, I see a fair bit of negativity around re subject package. Can
someone share your views, either way?
Thanks,
AS
Prototype - very bad.
It relies on browser sniffing in lieu of proper feature detection and
testing.
It works (sort of) in a limited set of modern browsers.
It is too large and the design isn't modular.
It is horribly inefficient. Even the lowest level code is tangled up
in syntactic sugar.
It augments host objects, most notably in the (unfortunately named) $
function.
It fails to leverage the inherent power of the JS language, instead
trying to force it to work like a class-based language.
Search the group for more details. Alternatively, read the comments
in the Rails Trac or related blogs.
What goes on behind the scenes in Prototype? Some of the syntactic
sugaring is inefficient. It also makes code that uses prototype
require all of prototype, which is now a lot of code. Object Oriented
and non-modular.
The $super approach caused problems with compressors:http://www5.sys-con.com/read/464826.htm
In fact, YUI compressor has apparently some logic to account for this.
(according to the README).
What do YOU think?
David Mark said the following on 2/15/2008 10:42 PM:
Incompetence and peer pressure. Not knowing better and because
"everybody" is using it.
Guys, I see a fair bit of negativity around re subject package. Can
someone share your views, either way?
<FAQENTRY>
Shouldn't something about Prototype be in the FAQ? It comes up very
frequently.
Peter
Me too. But why 'misnomer'? It reduces the file size pretty well.I highly recommend the YUI "compressor" (misnomer), but certainly not
YUI itself.
Namespacing seemed stupid to me, at first. I mean, these aren'tthe same problems (e.g. browser sniffing, too much sugar, etc.) Then
there is that ridiculous "namespace."
ME? I think I have made that abundantly clear.
than Prototype is jQuery. YUI is slightly better, but still well
south of competent. Using any of these libraries (or God forbid
combinations of them) is a bad idea. The average Web developer can
achieve lousy results on their own, so what is the benefit of adding
100K of third-party incompetence to the mix?
<snip>Randy said:ashore said the following on 2/15/2008 4:53 PM:
Richard Cornford said it better than anybody else I have
ever seen write it and Thomas Lahn uses it in a signature:
Prototype.js was written by people who don't know javascript
for people who don't know javascript. People who don't know
javascript are not the best source of advice on designing
systems that use javascript.
-- Richard Cornford, cljs, ...
It's entirely possible to do this; to reassing a "package"
to a function (or any value, or delete it). It's not safe.
But neither are prototypes.
On the other hand, enforcing namespacing has made my code
more modular. Keeping the global namespace clean is just
a small benefit.
Writing a library is a lot of work.
I want to write a better one.
This includes:
modular desing.
minimal framework.
building things as simple as possible, but not any simpler.
unit testing.
code review.
Now that last one, I could probably use a lot of help on.
Most of the F/E jobs here in the bay area want someone who has
one of the following:
Prototype, YUI, Dojo, Scriptaculous, jQuery. If you can do that
(of fake it good enough), you can make decent money.
Thread coming.It's entirely possible to do this; to reassing a "package"
to a function (or any value, or delete it). It's not safe.
But neither are prototypes.
Javascript is a dynamic language where it is possible to write code that
will 'mess up' pretty much any other code. Nothing is "safe", there are just
varying degrees to which it is easy for programmer to break an existing
system. In the end it is the programmer's responsibility not to be doing
things wrongly, and that is going to be best achieved by understanding the
task in hand, the system it is to be done in/with and the environment(s) in
which it will operate.
Yep.
[snip]
[sip]On the other hand, enforcing namespacing has made my code
more modular. Keeping the global namespace clean is just
a small benefit.
code review.Now that last one, I could probably use a lot of help on.
It is still probably the easiest because all you have to do is post code
here in a readable/understandable form (along with an explanation of what it
is for) and its shortcomings will be pointed out.
My thoughts on the majority of current libraries is that they have been
bought into existence while their authors were experiencing the first flush
of superficial success in browser scripting (the stage where you start to be
able to create things that will work on more than two browsers and then gain
the false impression that you have the problem cracked) and then rushed
before a public hungry for such things.
That's what I see with YAHOO. They can't change some broken core partsfreezing the libraries API (and its approach and the implied code authoring
style).
have the experience to see) that they have made fundamentally flawed design
decisions, and then the freezing of the API that follows from its being used
in the wider world removes any future hope of the overall design being
corrected (even if the authors are willing/ capable of recognising their
mistakes (and the current set seems to include many who have personalities
that are extremely resistant to the very idea that they may have done
anything wrong)).
Generally people who can recognise and learn from their mistakes will do
things better a second time and better yet a third.
This is also the trend in job advertisements in the UK, but not for the jobs
with the "decent money" (though our perceptions of "decent money" may
differ). It probably should not be taken too seriously, as the people doing
the recruiting don't tend to know what they need but have to write
something. It is like all the web development jobs where knowing Dreamweaver
was part of the requirement, regardless of the fact that the odds would be
that someone who knew Dreamweaver well would then not have any actual
technical understanding of web development at all.
timothytoe said:It's all changed out from under you. The libraries are THE major force
in Web 2.0 development now. jQuery is in (I believe) Rails now, and
Drupal, and AIR. You may have disdain for them, but it's a quixotic
(and mildly pathetically humorous) jihad you wage against them.
It's expected behavior. DHTML+AJAX is a disruptive technology, and so
are the libraries that enable its use to mortals. The responses to it
fall neatly into the two expected categories: worship and disgust.
Sure, the libraries are not perfect, but they "get the job done" -
delivering results that are "good enough", and that get better with
every iteration.
<FAQENTRY>
Shouldn't something about Prototype be in the FAQ? It comes up very
frequently.
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. And probably to an acccelerating degree.
And don't underestimate the impact of these libraries
They do damage. They do this by relying on browser bugs, sniffing the
userAgent, and then patching it with a hack. What happens if the
browser is to fix the bug? Chris Wilson takes about IE trying to "not
break the web".
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.