OO Style of writing code
myapp.Log = (function() {
var f = {}
f.name = "blah";
f.seq = 0;
f.someFunction = function(msg) {
// do something here
};
f.someOtherFunction = function(id) {
// do something here
};
return f;
})();
// now we can call Log's someFunction like the following
myapp.Log.someFunction("hello world");