12
Dec
2005

Prototype.js reviewed

I spend the last days (including the weekend) in getting into prototype.js by Sam Stephenson.

Here is a quick guide.

And it made my head ache. The problem with javascript is that there are soooo many ways to achieve something.

The part i like the most on prototype.js is that it's divided in smaller packages which allows you to take out what you need. But at some points it's trying to do too much. I can't see the advantage of introducing another bunch of new concepts to javascript (enumerations) just because it's cool and you can do it. It blows up the size of the lib and it BREAKS the Array object. (for (var i in arr) ...). So using prototype.js in the same page with other Javascript libs will break for sure.

There are two subprojects that caught my interest. script.aculo.us and behaviour.

script.aculo.us because it was written by an austrian and has a very cool DragAndDrop implementation.

And behaviour because it provides a real cool function: document.getElementsBySelector(element).
element accepts style selectors, and returns an Array of elements. [originally developed by Simon Willison]

If you patch this function with:

document.getElementsBySelector = function(selector, parentElement) {
..
  var currentContext = (parentElement) ? new Array($(parentElement)) : new Array(document);
...
you get a very powerful node selector.

For those who just need a small part of all that might also want to take a look at:moofx

Javascript

The World's Most Misunderstood Programming Language

nur für den fall das ich es noch nie verlinkt habe
logo

Mat's Blog

California Dreaming

Users Status

You are not logged in.

Search

 

Weather

Aktuelles Wetter in Kitzbuhel:


Temperatur: 13 C
UV Index: 1
Luftfeuchte: 67 %
Sichtweite: N/A km
Luftdruck: 1020.0 mb
Windstärke: 3 km/h

Weather data provided by weather.com

Get Firefox

Get Firefox!

Currently Reading


William Gibson, Jarreth Merz, Matthias Scherwenikas
Neuromancer, 3 Audio-CDs

Archive

December 2005
Sun
Mon
Tue
Wed
Thu
Fri
Sat
 
 
 
 
 1 
 2 
 3 
 5 
 6 
 7 
 8 
11
17
20
21
22
24
25
26
27
28
29
30
31
 

Recent Updates

und wie sieht es mit...
und wie sieht es mit deiner privaten Hochzeit aus? ;-) wünsche...
flog - 23. Oct, 20:49
Danke!
Danke Matthias für deinen Beitrag zu diesem Schritt....
Sierra - 22. Oct, 12:44
Ja, das Offline Problem...
Ja, das Offline Problem ist auch mein Hauptproblem....
matthias - 23. Sep, 14:36
ich verwende am Mac ausschließlich...
ich verwende am Mac ausschließlich die Browser...
smeidu - 23. Sep, 14:22
Stimmt -
Den Eindruck kann ich nur bestätigen; in der Bedienung...
N_Haase - 29. Jul, 13:24
Dach
und da oben am Dach, da sollte doch seit Jahren eine...
Sierra - 12. Jun, 10:47
but yammer accepts
no Austrian mobile numbers :(
cqeb - 15. Dec, 23:45
das verpasse ich leider......
das verpasse ich leider... http://twitter.com/flog/st atus/998712029
flog - 10. Nov, 21:38

Status

Online for 2150 days
Last update: 3. Mar, 15:52

Credits

vi knallgrau GmbH

powered by Antville powered by Helma


Creative Commons License

xml version of this page

twoday.net AGB