Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Services understading #6

Answered by Mulkave
undjike asked this question in Q&A
Discussion options

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.

You must be logged in to vote

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

Comment options

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.

You must be logged in to vote
0 replies
Answer selected by Mulkave
Comment options

Okay, it's perfectly clear now... Thanks.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6 on December 10, 2020 21:19.

AltStyle によって変換されたページ (->オリジナル) /