re: 5 Programming Patterns I Like VIEW POST


Instead of switch to object literal I suggest the facade pattern. Going with facade pattern, your IDE will be able to resolve function definition. If this object resolution grows in complexity it will be harder to understand why this generic function refers to and only your debugger can help you.


The details of this would be an interesting topic for a follow-up article.

code of conduct - report abuse