seas-computing / react-boilerplate

Starting point for react-based projects at SEAS computing
0 stars 1 forks source link

User model being used as DTO #10

Closed rmainwork closed 5 years ago

rmainwork commented 5 years ago

An instance of the user model is being used to type the server response both on the client and the server side. This is likely to cause issues as the client and/or controller would have a hard dependency on the user model and the data storage layer which it interacts with.

Instead a separate DTO (or DTOs) should be used to describe the structure of the data as it crosses process boundaries.

chrxr commented 5 years ago

Estimate: 2 days

rmainwork commented 5 years ago

Actual time taken: 2 days