I have been reading about revealing module pattern
in Addy Osmani's book. It highlights following disadvantage:
A disadvantage of this pattern is that if a private function refers to a public function, that public function can't be overridden if a patch is necessary. This is because the private function will continue to refer to the private implementation and the pattern doesn't apply to public members, only to functions.
Public object members which refer to private variables are also subject to the no-patch rule notes above.
As a result of this, modules created with the Revealing Module pattern may be more fragile than those created with the original Module pattern, so care should be taken during usage.
I'm not an expert in JS and it is not making much sense to me. Also book doesn't provide any examples of these disadvantage comparing to module pattern.
I googled and found this on here:
Revealing module pattern disadvantages
which again I'm not able to grasp. As examples being used are using constructor functions.
Could someone please ELI5 please.
I have following html form: <form method="POST" action="uploadImage" enctype="multipart/form-data"> <input type="file" class="file" name="file"/> ...
I have following html form: <form method="POST" action="uploadImage" enctype="multipart/form-data"> <input type="file" class="file" name="file"/> ...
I am developing an app using jQuery Mobile with PHP. I am not using Phonegap or other frameworks. I need to find user's geolocation. If user device's GPS is off, then I cant get a location. now I need ...
I am developing an app using jQuery Mobile with PHP. I am not using Phonegap or other frameworks. I need to find user's geolocation. If user device's GPS is off, then I cant get a location. now I need ...
I have a very simple module that I am bundling with Browserify. I want to use that bundle both in the browser as well as in node. In node, it works just fine if I require the non-bundled module; ...
I have a very simple module that I am bundling with Browserify. I want to use that bundle both in the browser as well as in node. In node, it works just fine if I require the non-bundled module; ...
I have the following iframe: <iframe name="content" src="" style="position: absolute; left: 0px; top: 28px;" allowtransparency="true" border="0" scrolling="yes" width="100%" frameborder="0" height=...
I have the following iframe: <iframe name="content" src="" style="position: absolute; left: 0px; top: 28px;" allowtransparency="true" border="0" scrolling="yes" width="100%" frameborder="0" height=...