Search

5/07/2009

Ajaxian » No love for the module pattern?

Ajaxian » No love for the module pattern? - for this kind of topic, comments are always worth of reading.

Avoiding the Module Pattern makes debugging easier.
When it comes to troubleshooting a particular troublesome page, I like to crank open Firebug’s console and play around willy-nilly. The ability to reshape objects lets me test theories before putting them into practice with real code. It also allows me to inspect things to make sure they’re working as they should.

Make extending easier
Another frustration I have with it is the difficulty in being able to extend your objects. You can’t just add additional functions onto it because you won’t have access to the properties defined within.

JavaScript should be malleable
One of the features that attracts me to developing in JavaScript is the ability to manipulate objects so readily. As a result, the module pattern is something I try to avoid.

沒有留言: