Viewing the application, which includes, say, companies, I can have a company class. I will have Data Access Layer, which is a list & lt; Company & gt; Populates. However, it will happen at times (like displaying search results) where I only need to display the company name, telephone and postcode properties, and I think it is useless to populate the whole company object with all their properties.
In the context of DDD design, what will be the correct way about this? Do I want to look at specific sections, such as the company searchResult Object which only displays the properties that I am interested in displaying?
It looks like a proper approach for me.
Later, if you have some code for the customer SearchResult
- If you are crazy like nearby ice cream shops, you can compare your domain object. It would be a very easy time to add your CompanySearchResult
to
No comments:
Post a Comment