Hi guys
Is there already a way to use the compiled property name, or would you be able to add this feature to the compiler please ?
Why is it useful :
Because at the moment, everybody who wants to implement dynamic binding to properties of a model, has to force the compiler not to minify the properties of the model.
This is really bad, especially since the models are usually also the objects that go forward and backward between server and client and unminified properties make each object sooo much bigger.
So having almost everything compiled and minified is definately the best solution. The Node.js WebServices can use the same Property Mapping File and even C# WebServices can easily use the Property Mapping File in a custom JavaScriptSerializer (I can provide the code to everybody who is interested in that).
What do we need :
...
MyModel.prototype.TheWayToLongPropertyName = 4711;
...
myView.bindProperty(myModel, goog.getPropertyName("TheWayToLongPropertyName"), function(oldValue, newValue){.....});
during compilation the compiler then replaces that to:
myView.bindProperty("dF");
A goog.getPropertyName function like that would help everybody who loves closure and wants the most advanced minification possible for everything (even data and model objects).
Is there a chance that we can get this in closure ?
Best regards
Bernd