JavaScript "namespaces" are really just objects with named properties. In other OO languages (e.g. C ++, C #, etc.) I don't think you need the following:
WITH# -
public static class MyAppName {}
public static class MyArea {}
public static class MySubArea {}
public static class Test {
public string Property1 { get { return "test"; }}
}
Just so you can
MyAppName.MyArea.MySubArea.Test.Property1;
So basically, since JS doesn't actually support namespaces, people invented a hack to simulate namespaces, which then makes it “healthy” to write things like:
myAppSpace.mySubArea.myObject = blah...
source
share