Comparison
The comparison is as below:
Return Entities Directly | Use DTO Language | |
---|---|---|
Similarities | Both can present DTO type definitions for the return type of each API to client developers | |
Both can generate online OpenApi docs and TypeScript RPC code | ||
Both can show information in code comments to clients | ||
Differences | Directly return entities (Easy) | Need to use DTO language to quickly generate DTO types |
Need @FetchBy annotation in RestController to supplement type info for entity types | Directly develop RestController based on the generated DTO types (Easy) | |
More oriented to external API exposure | Both external exposure and internal use are applicable |
tip
No matter how users choose, Jimmer can elegantly solve the
with development costs unimaginable in other JVM stacks.