As our team is growing I've noticed that different developers put their class methods in different orders. For instance:
var Foo = Backbone.Model.extend({
someVar: {},
initialize: function() {...},
fetch: function() {...},
handleFetchRepsonse: function() {...},
getFoo: function() {...},
render: function() {...},
renderFoo: function() {...},
});
vs.
var Foo = Backbone.Model.extend({
fetch: function() {...},
getFoo: function() {...},
handleFetchResponse: function() {...},
initialize: function() {...},
render: function() {...},
renderFoo: function() {...},
someVar: {},
});
It seems like it'd be more convenient if everyone used roughly the same criteria when they order their methods (if for no other reason than to make it easier to find stuff). However, I'm wondering if:
A) that is even possible/realistic (or should I simply accept the fact that everyone is going to have a different order)?
B) if so, what sort of ordering should that be (the only really consistent one I can think of is alphabetical, but that seems less than ideal)?