mirror of
https://github.com/HackSoftware/Django-Styleguide.git
synced 2025-06-24 06:53:19 +03:00
Update README.md
This commit is contained in:
parent
e8a2f23784
commit
4271ec5865
|
@ -710,9 +710,9 @@ So we will follow the following naming convention in our service layer here at S
|
||||||
- Class-based service should be named in this pattern `ObjectService`, if this object has a few domains that requires services, it should be named in this pattern instead `ObjectDomainService`.
|
- Class-based service should be named in this pattern `ObjectService`, if this object has a few domains that requires services, it should be named in this pattern instead `ObjectDomainService`.
|
||||||
- The actual function services inside the class should be named in this pattern `action`.
|
- The actual function services inside the class should be named in this pattern `action`.
|
||||||
|
|
||||||
If you tak a look on the example above you will get a better grasp. In the example we have `FileDirectUploadService` service class and inside it the `start` and `finish` function services.
|
If you take a look at the example above you will get a better grasp. In the example we have the `FileDirectUploadService` service class and inside it the `start` and `finish` function services.
|
||||||
|
|
||||||
This is what we prefer in Shahry's projects asit has a nice feature:
|
This is what we prefer in Shahry's projects as it has a nice feature:
|
||||||
|
|
||||||
- **Namespacing.** It's easy to spot all services inside the `UserService` class and it's a good idea to put them in a `users.py` module if the `UserSerivce` class gets big enough.
|
- **Namespacing.** It's easy to spot all services inside the `UserService` class and it's a good idea to put them in a `users.py` module if the `UserSerivce` class gets big enough.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user