-
-
Notifications
You must be signed in to change notification settings - Fork 58
-
Hi, I'm following this issue #69 and I'm wondering whether in my case, I've misunderstood the purpose of services.
I have a system on which we have a chat, project managenement, human resources management and some others. I though each should be considered as a service because each has several feutures and quite different logics.
If I should only have 3 services (web, api and admin), not sure It will be optimal as each section of the project is a larget set.
Beta Was this translation helpful? Give feedback.
All reactions
There is no misunderstanding to the purpose of services at all on your side. Since Lucid is a flexible architecture and is only providing the "shell" of your application, its principles do not dictate what the services are and which pattern is followed in creating them. It is use-case dependant so you may use it whichever way that's best for your purpose. Web, Api and Admin are just simple examples of one approach. Yours surely qualifies to be another where each of PM, HR and Chat gets their own space due to the degree of difference between their processes.
Just make sure you don't tangle responsibility and introduce cross dependency between them. You may use Domains and Data to share fun...
Replies: 2 comments
-
There is no misunderstanding to the purpose of services at all on your side. Since Lucid is a flexible architecture and is only providing the "shell" of your application, its principles do not dictate what the services are and which pattern is followed in creating them. It is use-case dependant so you may use it whichever way that's best for your purpose. Web, Api and Admin are just simple examples of one approach. Yours surely qualifies to be another where each of PM, HR and Chat gets their own space due to the degree of difference between their processes.
Just make sure you don't tangle responsibility and introduce cross dependency between them. You may use Domains and Data to share functionality instead, even if it meant to also have PM, HR and Chat domains to hold their functionalities (in addition to others), it would still make sense for each service to have its own commands, seeders, migrations, features, routes etc.
The boundaries are set by you and your team to ensure a consistent usage of the architecture.
Beta Was this translation helpful? Give feedback.
All reactions
-
Okay, it's perfectly clear now... Thanks.
Beta Was this translation helpful? Give feedback.