CQRS - The query side

Posted by mattcodes on Stack Overflow See other posts from Stack Overflow or by mattcodes
Published on 2010-02-16T15:06:33Z Indexed on 2010/03/07 23:11 UTC
Read the original article Hit count: 418

Filed under:
|
|
|
|

A lot of the blogsphere articles related to CQRS (command query repsonsibility) seperation seem to imply that all screens/viewmodels are flat. e.g. Name, Age, Location Of Birth etc.. and thus the suggestion that implementation wise we stick them into fast read source etc.. single table per view mySQL etc.. and pull them out with something like primitive SqlDataReader, kick that nasty nhibernate ORM etc..

However, whilst I agree that domain models dont mapped well to most screens, many of the screens that I work with are more dimensional, and Im sure this is pretty common in LOB apps.

So my question is how are people handling screen where by for example it displays a summary of customer details and then a list of their orders with a [more detail] link etc....

I thought about keeping with the straight forward SQL query to the Query Database breaking off the outer join so can build a suitable ViewModel to View but it seems like overkill?

Alternatively (this is starting to feel yuck) in CustomerSummaryView table have a text/big (whatever the type is in your DB) column called Orders, and the columns for the Order summary screen grid are seperated by , and rows by |. Even with XML datatype it still feeel dirty.

Any thoughts on an optimal practice?

© Stack Overflow or respective owner

Related posts about cqrs

  • CQRS at Jax Code Camp 2012

    as seen on ASP.net Weblogs - Search for 'ASP.net Weblogs'
    Continuing my CQRS world tour...I gave my CQRS presentation at the Jax Code Camp 2012 this past Saturday.  It was a great crowd with lots of representation from the wicked smart engineers at Feature[23] and others from the Jacksonville developer community. If you'd like to take a… >>> More

  • CQRS without using others patterns

    as seen on Programmers - Search for 'Programmers'
    I would like to explain CQRS to my team of developers. I just can't figure out how to explain it in the simplest way so they can implement the pattern rapidly without any others frameworks. I've read a lot of resources including video and articles but I don't find how to implement CQRS without using… >>> More

  • Domain queries in CQRS

    as seen on Stack Overflow - Search for 'Stack Overflow'
    We are trying out CQRS. We have a validation situation where a CustomerService (domain service) needs to know whether or not a Customer exists. Customers are unique by their email address. Our Customer repository (a generic repository) only has Get(id) and Add(customer). How should the CustomerService… >>> More

  • CQRS - The query side

    as seen on Stack Overflow - Search for 'Stack Overflow'
    A lot of the blogsphere articles related to CQRS (command query repsonsibility) seperation seem to imply that all screens/viewmodels are flat. e.g. Name, Age, Location Of Birth etc.. and thus the suggestion that implementation wise we stick them into fast read source etc.. single table per view mySQL… >>> More

  • CQRS event versioning

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Versioning If your events changes you would create a new version of that event, and keep the old ones. To keep your domain code form being bloated with handling of all versions of events you would basically introduce a component that converts your events from previous to newer versions, and then… >>> More

Related posts about orm