Created
September 5, 2017 16:58
-
-
Save Kolenov/6194575f22b1cc3cdb07e81799b5021f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pageFacade = { | |
updateMenu: function() { | |
loadData(); | |
resizeColumn(); | |
updateCounter(); | |
setLog(); | |
}, | |
doSmthElse: function() { | |
// a lot of methods | |
} | |
}; | |
// Usage: | |
// Instead of all functions invocation | |
pageFacade.updateMenu(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Facade
Wherefore
This pattern provides a convenient higher-level interface to a larger body of code, hiding its true underlying complexity.
Howto
Creating set of facade methods and joining them in one place