An error occurred while fetching folder content.

Carl Jones
authored
We chose to provide a service-level interface to get the charities. We also chose to return a list of DTOs (data transfer objects) rather than the domain objects themselves. The DTOs are read-only (immutable) versions of the domain objects, but they could be different with fewer fields, combinations of fields, special formatting, etc. We do this so that the receiving component (which in our case will be a controller) can directly change the domain objects. The metaphor is that when you approach a service till and ask for some information, you are typically given a disposable copy of the state of the domain (maybe your account) rather than direct access to the account itself. The person supplying the service will coordinate the changes based on instructions and data that you provide. We've added MockCharityRepository.java to simulate a class that will provide a set of domain objects. In the future, we'll replace this with a database-facing component. We've also added a test to check that the service is working. This runs without needing any Spring framework code.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name | Last commit | Last update |
---|---|---|
.. |