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,302
  • 9
  • 18
Shruti Sharma
  • 28
  • 3
  • 17

1 Answers1

1

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