-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore(WIP): add architecture readme #1
Conversation
Architecture.md
Outdated
|
||
## Service | ||
|
||
A `Service` provides a dependency needed by a `Controller`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Services are more general. Controllers consume services for sure, but Services can be used anywhere.
Generally the type of Service dictates where it should be used.
An infrastructure service is used in Controllers, but not in domain methods etc.
Architecture.md
Outdated
|
||
## Resource | ||
|
||
A `Resource` provides specific `Request/Response` messages that `Controller`s take as input or return as output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And Client
s use them to derive fully typed api cleints.
Let's rename |
Similar to `Entity`s, `Value-Object`s also abstract a _business domain object_. The core difference between `Entity`s and `Value-Object`s is that `Value-Object`s do not have a unique identifier. | ||
`Value-Object`s too are defined by their data shape and their business logic, and those too are defined through `Schema` and `Core` logic inthe same packages where `Entity`s are defined. | ||
|
||
An example of a `Value-Object` might be an email or a geographical `Address`. An `Order` might have a delivery `Address` but this `Address` is only defined by its content. `Value-Object`s are generally attached to `Entity`s and modifications of `Value-Object`s are indistinguishable from replacing the `Value-Object`s as they do not hold any unique identifier and their identity is defined by their content only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an Email is generally a refined primitive string, not a value Object.
We should add a section about such Refinements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what would be an example of a Value-Object
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@enricopolanski usually Address, defined as e.g addressfield1, 2, 3, street, number, zip, etc.
I wanted to recheck what I wrote few weeks ago when analyzing the architecture.
I think this is a nice starting point, but I feel like half through the list of components I keep giving definitions and examples but don't really tie it to the
effect-ts-app
boilerplate anymore.What I'd like to do before merging it, is to tie it more closely to the boilerplate architecture trying to show the various components definitions against the boilerplate itself and it's structure.
Any feedback is more than welcome.