DTO naming conventions , modeling and inheritance

Recommendation is that you should just have one DTO class for each entity suffixed with DTO e.g. CustomerEntryDTO for the Customer entity (but you can certainly use inheritance hierarchies as per choice and requirements). Moreover, Add a abstract DTOBase kind of base class or an interface; and do not use such deep inheritance heirarchies for … Read more

Reusing DTO for various request/response types vs explicitness of what is required / what should be returned [closed]

Separate, simple DTOs will make your life infinitely easier. It will require more code, but it will be boring, simple code, that is easily tested, and allows your interfaces to change and evolve independently. Make a DTO for each request endpoint and a separate DTO for each response. Otherwise, you will eventually be sad. If … Read more

Difference between Entity and DTO

Short answer: Entities may be part of a business domain. Thus, they can implement behavior and be applied to different use cases within the domain. DTOs are used only to transfer data from one process or context to another. As such, they are without behavior – except for very basic and usually standardised storage and … Read more

What is the difference between an MVC Model object, a domain object and a DTO

Domain and model objects are essentially the same, and may contain business logic. Depending on implementation, domain and DTO objects may be equivalent if you remove business logic from the model into a service class. Often a key variant of the DTO is the View Model, which is used purely to transfer data between the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)