Reputation: 1833
The way I understand it, we are encouraged to name Ember instances lowercase:
App.mailtruck = Em.Object.create({...});
...and classes uppercase:
App.Mailtruck = Em.Object.extend({...});
Would it be correct to say that instances of Ember.Namespace are the sole exception to this rule? Also, are there any cases besides Namespaces where this convention is strictly important?
Upvotes: 2
Views: 770
Reputation: 16163
Yes, namespaces are the exception to this rule. As you said, it's lowerCase
instances and UpperCase
classes. Also Mixins
should be named UpperCase
, so it's: App.LoggerMixin = Ember.Mixin.create({});
(Thanks @sly7_7 for the catch)
Further details can be read in the great blog post by the Emberist: http://www.emberist.com/2012/04/09/naming-conventions.html.
Upvotes: 2