我一直在挖掘EmberJS一天:)。
I've been digging into EmberJS for one day :).
我遵循了几个例子。有些例子使用了ArrayProxy,而其他的则使用了ArrayController。我查看了未知的源代码,并猜测什么... Ember.ArrayController只是扩展Ember.ArrayProxy,但在ArrayController中没有额外的方法或功能。
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?
推荐答案两个类之间没有区别。
There is no difference between the two classes.
这是我们所有来自SproutCore 0.9.x,1.x和早期SproutCore 2 betas的人,只是用于名称 ArrayController 我想。如果核心团队决定贬值使ArrayController成为可能的一行代码,我建议使用ArrayProxy: - )
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 :-)
更多推荐
ArrayController和ArrayProxy的目的是什么?
发布评论