Monkey patching (augmenting) is a good solution due to the nature of javascript 
prototypal nature, the problems come when those improvements are not organized 
or documented.

what we do is make this decision
if we wont maintain the the source code, we decorate the original object with a 
new one that exposes the api that we want.
if we will maintain the source then we do the change to be exposed as the 
object api.
if its not one of those cases we have two choices
        inherit from that object
        augment te instance of that object (is inherit on the prototype 
paradigm either way) but this is only when one specific instance needs a minor 
improvement.

i hope that helps, it has helped us alot.

On Mar 11, 2011, at 10:53 AM, gaz Heyes wrote:

> On 11 March 2011 16:45, Scott Greenfield <[email protected]> wrote:
> Mr. Ramirez.  One resource I would recommend is the book by Douglas Crockford 
> titled "JavaScript: The Good Parts".
> 
> I agree! One of the best books I've read although too short. The railtrack 
> diagrams inspired me to create regular expression sandboxes! 
> 
> -- 
> To view archived discussions from the original JSMentors Mailman list: 
> http://www.mail-archive.com/[email protected]/
>  
> To search via a non-Google archive, visit here: 
> http://www.mail-archive.com/[email protected]/
>  
> To unsubscribe from this group, send email to
> [email protected]

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to