views:

12

answers:

0

Helo Guys,

Currently I am looking to domain driven design and I hope You could give me some advice.

Domain design seems a good thing since the business logic is implemented in the domain. It looks easier to be maintained once I have a good design.

However I have problem to implement them in mobile application. This is a sample case. Maybe the illustration is a bit extreme, but I would like to know how to solve this kind of problem.

Let say I have entity: Invoice which has one to many Product.

Invoice has attribues : "Id, Date, CustomerEntity, InvoiceStyle, field 1, field 2, field 3, field 4, ... and List"

Product: "Id, name, ProducerEntity, Price"

I store the DB in iPhone SQLite. There's around 10.000 invoice data and 20.000 products data.

I need to display a page that display "Invoice Id and Date only". Using standard SQL (but i won't get entity), i will get the best performance by reading "invoice id" and "date" only. And when using Domain/Entity, I will get lot of extra information (even i use lazy loading to load CustomerEntity data".. and my benchmark show it really affects the time.

Could You advice the best pattern to be used in this case?

Thank you in advance