Performance: Response DTO for output
MEDIUM IMPACT
This affects the size and structure of data sent from server to client, impacting network load and client rendering speed.
public class UserResponse { private Long id; private String username; private String email; // getters and setters }
public class UserResponse { private Long id; private String username; private String password; private String email; private List<Order> orders; private List<Role> roles; // getters and setters }
| Pattern | Payload Size | Network Impact | Client Parsing | Verdict |
|---|---|---|---|---|
| Large DTO with sensitive and nested data | 50-100kb | High latency | Slow parsing | [X] Bad |
| Minimal DTO with essential fields only | 10-20kb | Low latency | Fast parsing | [OK] Good |