I've been digging into EmberJS for one day :).
I've followed several examples. Some examples used ArrayProxy while others used ArrayController. I looked at the unminified source code and..guess what...Ember.ArrayController is simply extending Ember.ArrayProxy, but there's no extra methods or features in ArrayController.
So..my question is..why do we have two same classes?
From Ember's API Docs:
Note: As of this writing, ArrayController does not add any functionality to its superclass, ArrayProxy. The Ember team plans to add additional controller-specific functionality in the future, e.g. single or multiple selection support. If you are creating something that is conceptually a controller, use this class.
There is no difference between the two classes.
It's for all of us who are coming from SproutCore 0.9.x, 1.x and early SproutCore 2 betas and were just use to the name ArrayController
I think. I'd recommend using ArrayProxy in case the core team decides to depreciate the one line of code that makes ArrayController possible :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With