Re: prototype.js (was Re: Ajax Timeouts)
- From: RobG <rgqld@xxxxxxxxxxxx>
- Date: Wed, 24 May 2006 03:54:35 GMT
Tony wrote:
Matt Kruse wrote:Chaprasi wrote:
Hi I need help with prototype while doing ajax calls. So this is my
JS which does a ajax calls
Prototype.js is generally avoided by most people in this group.
You won't find much help for it here.
I haven't really looked at prototype.js - would you mind sharing why it's generally avoided?
In no particular order:
1. It modifies the protoype of some built-in objects so that
using say, for..in with an array object produces unexpected results.
2. It requires a different syntax, so that instead of using say:
var el = document.getElementById('someID');
you use:
var el = $('someID');
Instead of looping through a number of IDs, you'd use:
var els = $('someID_01', 'someID_02', elRef_03);
3. Having used and become dependent on its syntax, you'll
have to learn 'real' JavaScript at some point.
4. It is utterly undocumented by the author and only very
sparsely commented. Some other attempts at documentation:
<URL:http://blogs.ebusiness-apps.com/jordan/pages/Prototype%20Library%20Info.htm>
<URL:http://www.sergiopereira.com/articles/prototype.js.html>
<URL:http://wiki.script.aculo.us/scriptaculous/show/Prototype>
<URL:http://www.snook.ca/archives/000531.php>
5. There is no support community or blog of any real substance
6. It has about 2,0000 lines of code when only a small subset
might be needed. It is not easy to use only portions,
as many functions are reliant on others. Those dependencies
are not documented.
7. Its feature detection is sparse and it is likely to fail in
many browsers with no chance of recovery
8. It encourages bad coding practice with functions like:
Try.these( func01(...), func02(...), func03(...) );
as a shortcut for multiple try..catch blocks and replacement
for feature detection.
And so on...
--
Rob
Group FAQ: <URL:http://www.jibbering.com/faq/>
.
- Follow-Ups:
- Re: prototype.js (was Re: Ajax Timeouts)
- From: Tony
- Re: prototype.js (was Re: Ajax Timeouts)
- From: Richard Cornford
- Re: prototype.js (was Re: Ajax Timeouts)
- From: petermichaux
- Re: prototype.js (was Re: Ajax Timeouts)
- References:
- Ajax Timeouts
- From: Chaprasi
- Re: Ajax Timeouts
- From: Matt Kruse
- prototype.js (was Re: Ajax Timeouts)
- From: Tony
- Ajax Timeouts
- Prev by Date: Re: relation between prototype and Prototype.js
- Next by Date: Re: jslint doesn't like my syntax for conditional object creation
- Previous by thread: Re: prototype.js (was Re: Ajax Timeouts)
- Next by thread: Re: prototype.js (was Re: Ajax Timeouts)
- Index(es):
Relevant Pages
|