|
|
 |
Article:
 |
 |
Prototype: Easing AJAX's Pain
|
| Subject: |
why the Hash object? |
| Date: |
2006-04-26 11:44:06 |
| From: |
schvenk |
|
|
|
|
Is there any advantage to the Prototype Hash object beyond the keys, values, and inspect methods? Hashing is inherent in basic JS objects...wouldn't using something like Hash incur unnecessary overhead? |
- why the Hash object?
2006-04-27 06:10:54 bwp
[Reply]
Prototype's Hash object also has convenient merge() and toQueryString() methods. This article shows the merge() method. Here's a link to an excellent reference to the Hash object:
http://www.sergiopereira.com/articles/prototype.js.html#Reference.Hash
You can pass a JS object as a parameter to the $H() Prototype method; the return value is one of these hash objects. At the very least, Prototype saves the development/debugging time associated with creating your own hash utility object.
|
 |
Sponsored By:
|