Reputation: 186
I am designing our cms platform. I meet the question about how combine response data. I know two way solution1 and solution2. Which is better? Why? Anyone have better way.
Upvotes: 1
Views: 52
Reputation: 45124
You will have to share the context with us to a definite answer but will the information available I can give you the following.
Solution 1 is tightly coupled entities are in the long run can be a problem but it will be easier to maintain if you have coupled entities in the correct manner.
Solution 2 has a better separation of concerns but you will have to clearly identify entities and will have multiple files to maintain.
Usually a single entity represents a single table in the table with the constraints of the table.
Upvotes: 1