Monday, May 4th, 2009
At least, the Java folk definitely cheered.
Jonathan Snook on the other hand has no love for the module pattern and, after using it for some time, now avoids it:
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.
This is going to be contentious, with people feeling one way or another. There is certainly value to the pattern, but maybe it isn’t the right choice for every team? What do you think.
Posted by Dion Almaer at 6:22 am