I came across a new term named CQRS (Command Query Responsibility Segregation) which states that the conceptual model should be split into command model and query model as a typical CRUD model in which the command and query happens in the same model. The article has all theory information.
I don't understand how I should implement this in a project with ASP.net MVC3, EF 4.3 and jQuery.
Can anybody suggest me how to practically implement it in my project?
CQRS takes the defining principle of CQS and extends it to specific objects within a system, one retrieving data and one modifying data. CQRS is the broader architectural pattern, and CQS is the general principle of behaviour.
When to use CQRS pattern. Consider CQRS for the following scenarios: Collaborative domains where many users access the same data in parallel. CQRS allows you to define commands with enough granularity to minimize merge conflicts at the domain level, and conflicts that do arise can be merged by the command.
Command query responsibility segregation (CQRS) is an application architecture pattern. This pattern is often used in event driven applications and is frequently associated with event sourcing. It consists of separating the logic that handles commands from the logic that handles queries.
CQRS Journey is a good place to start. I also suggest you watch A Journey into CQRS on Channel9.
Anyway, the best thing to learn CQRS is to try it by yourself. For me, I have to learn how to adapt it to my projects for around 6 months.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With