Vocab: DTOs, endpoints, routes, models
Endpoint vs api route
- Realistically, interchangeable with api route. Theoretically it's a url without any data inside it, whereas api route can include data (e.g. like a transaction id)
- Make a GET call or a POST call
- Call an endpoint
- Call then response
Models, objects, DTOs
DTO: data transfer object. The "Data transfer" makes it super clear that this object is what is being transferred from the server and received by the client.
- What the client does with the DTO is out of scope. You don't expect clients to talk about passing on a DTO. Rather clients will use properties from the DTO either directly, or to create a new object or model
Model: theoretically interchangeable with object. This is what is used inside the client's codebase. A model can be the same as a DTO, or it can be made with any properties.
Object, same as model. However in Android there is a concept that all types inherit from an "Object", kind of like
NSObject
in Swift. So to avoid confusion as to whether you meant that "Object", or a model, it's clearer to use Model.