Lately I've found myself pretty deep in the weeds with a lightning application and have a series of questions I'm hoping someone here with some inside knowledge might be able to assist with. Or at least get a conversation started with people in the same boat.
First a high level outline of some observations/issues I've experienced as of Spring 17'
All properties (and more frustratingly getters/setters) must be present on an POJsO before disappearing into the framework b/c you're going to get back a SecureObject and anything you add to it will be ignored.
Functions on your objects will also be 'filtered' and it seems there is some type of memoizing that takes place causing multiple calls to return the same value. Example:
var MyThing = function(){ var array = [1,2,3]; this.getMyArray = function(){ return array;}; this.doSomething = function(){ .... array.push(4); ..... } return this; }; var thing = new MyThing(); thing.getMyArray(); // [1,2,3] thing.doSomething(); thing.getMyArray(); // [1,2,3] !!!!WTF!!! expected [1,2,3,4]
General performance issues in aura:iteration. Even in collections as small as 50-100 items. This is especially an bad if you've setup bindings with "v.data[10]" style expressions and want to reorder/insert/remove items in the array. Seems the framework keeps each component tied to it's position in the array by index rather than the object in the array - which makes sense. But it leaves no performant way to move items or shuffle/sort/filter the list on view. (I've made some good progress and attained decent performance by doing all the component creation and v.body management dynamically, but the code feels real janky)
So some questions:
How does the source code on github compare to what is in salesforce/will be in salesforce? I see exciting commits like "Removal of unfilterEverything()!" and while i didn't go through the full diff, I'm wondering how much of what I see in github I can rely on making its way to Salesforce? and when?
Is there a better place to look to than Salesforce Known Issues and the github source for tracked issues/enhancements? The reason I ask; I have a lot of 'creative workarounds' and less than ideal practices (JSON.parse(JSON.serialize(obj)) in place, but my delivery schedule is flexible enough that I could hold off on band-aids if i knew a fix was imminent.