Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API by 2013

Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API by 2013

Author:2013
Language: eng
Format: epub
Publisher: Packt Publishing


Tip

Try it in jsFiddle:http://jsfiddle.net/kendomobile/gejfm/

We created a module called applicationModule containing a private variable by the name privateVariable, a private function by the name privateFunction, and a public function called publicFunction . The method publicFunction is accessible to the outside world only using applicationModule.publiclyReturnPrivateVar. The objects, privateVariable and privateFunction, are not at all accessible outside of the closure. The final parenthesis causes the function to be invoked.

Thus making use of closures in JavaScript, we implemented encapsulation available in other conventional object-oriented languages. Therefore, we can implement Get and Set properties like in C# by creating a private object and by creating public methods for "getting" and "setting" the values of the private object.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.