I am planning to build an Angular app that can be really scale. Meaning, it will contains many part that will be develop by different people and will be adding in new part / feature from time to time.
I have read some articles about Angular best practices in naming and folder structure organization, such as:
Angularjs code/naming conventions
AngularJS best practices for module declaration?
Angular - Best practice to structure modules
All of it focuses on folder structure & module naming. But how about the controller & services naming conventions?
For example, if I have a structure like this:
angular.module("myApp",['myApp.groups','myApp.users']);
angular.module("myApp.groups",['myApp.groups.controllers','myApp.groups.directives']);
angular.module("myApp.users",['myApp.users.controllers','myApp.users.directives']);
Should I name controller for myApp.groups.controllers
module to be myApp.GroupsController
? Or just GroupsController
? If just GroupsController
, it will be possible conflict of naming if someone else develop another component with controller named GroupsController
.
So, what is the best practice for naming controllers & services for huge application that will scale?