-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: change from "do" to "consider" adding 'Service' suffix to Service (02-04) classes because it doesn't improve clarity or add value #841
Comments
@GUSCRAWFORD the Angular official style guide has some good reasons 😃 . Please note that these are not strict rules, but if you ask me I try to follow them every day, since they are written from Angular experts 😏 |
@bampakoa What's been the value in following 02-04 in your experience?
For my part, to play devil's advocate the only example of the value that comes to mind is implementing |
If I see a variable named Conversely, if I see a variable named I think it improves clarity. |
@GUSCRAWFORD In addition to @mattgrande's comment:
There is no harm in not following the rules, you will be still writing in Angular 😃 It is really helpful that we, as Angular developers, speak the same language and use the same notations in our everyday coding. |
@mattgrande I would almost agree, only that when I think of myself coding with the
:) I'm not trying to be too picky, but there:
I feel it's just extra typing, and no benefit to readability or clarity |
I think every development team should conform to the same set of rules in the context of the same language. In our front end development team, which consists mostly of Angular developers, we need to understand each other's source code quickly in case we need to. Think what will happen, If I use Service suffix, another one uses SVC suffix and a third one none of them.
I prefer folder-by-feature structure. It gives me a better understanding of the structure of my application.
There is no need to use it yet in my case but I know that it will there in case I have to. |
@bampakoa this is a reason you like the rule, it's not an example of the rule avoiding a confusion for your team. Lack thereof a clear example speak to my point. Do you not separate feature related services into their own folder even within a feature-by-folder? If I'd never even seen your code or was looking at it for the first time I could infer the same details of the design without injectables explicitly named xService I want to generate services with the client and just in this instance, adding the service suffix to the name should be explicit (i.e. Ng cli g "myService") |
Based on usage-pattern, what value is there in naming
Data
classDataService
?The text was updated successfully, but these errors were encountered: