[WIP] Proof of Concept for new Architecture #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR I am writing a Proof of Concept for the new foundation of
Resourceful.
There is a decent chance that this will be deleted again but to get an idea
of the direction that we might take with Resourceful I have written this PoC.
The basic idea is that each action in a REST is a Command in the sense of a
Command Bus. When you issue a POST, PUT or DELETE then a Command with your
preferred name is issued (because it is linked to the route and method) and
when you issue a GET request you can provide a Projection that will assemble
the data that you need and return a representation specific to your wishes.
What is central in this design is that the relation between resources and
entities is fully decoupled (contrary to the previous design) so that you
can choose to, for example, return multiple representations of the same
entity. One for mobile, one for desktop, one for tablet for example.
The following is a list of stuff that I can now think of that needs to be
done:
but also on mimetype, or request parameter
simple crud operation would work
improve on the simple CRUD scenario
based on commands and not on state transitions.