0

In a recent interview with Amazon I have been rejected because I could not tell the advantage and disadvantage of making model and Entity classes different and same.

I have always created Model and Entity class same.

Can anybody help me on that with an example? Interviewer said you are making strong binding of UI+DB if you are keeping it same.

richytong
  • 2,387
  • 1
  • 10
  • 21
Shruti sharma
  • 199
  • 6
  • 21
  • 67

1 Answers1

2

It's true by making same class for Entity and Model you are tightly binding UI and DB, simple example of why should avoid is -> most of the time, we modify response like adding DTO, modifying format of date and so on. which could impact your database calls (DTO layer).you can read more here