Updating query results

Posted by Francisco Garcia on Programmers See other posts from Programmers or by Francisco Garcia
Published on 2013-10-25T07:28:04Z Indexed on 2013/10/25 10:11 UTC
Read the original article Hit count: 232

Within a DDD and CQRS context, a query result is displayed as table rows. Whenever new rows are inserted or deleted, their positions must be calculated by comparing the previous query result with the most recent one. This is needed to visualize with an animation new or deleted rows.

The model of my view contains an array of the displayed query results. But I need a place to compare its contents against the latest query.

Right now I consider my model view part of my application layer, but the comparison of two query result sets seems something that must be done within the domain layer.

  1. Which component should cache a query result and which one compare them?
  2. Are view models (and their cached contents) supposed to be in the application layer?

© Programmers or respective owner

Related posts about design-patterns

Related posts about mvc