asp.net mvc 3 - CQRS Commands as Models for POST actions -
i'm getting started cqrs, , thought make sense use command object model on forms. can take advantage of of client-side validation commands using dataannotations, client-side validation, makes pretty clean...
my question... raise problems? if command not have default constructor, make process impossible? need create own commandmodelbinder can constructor inject aggregate id?
your thoughts, can't find technique anywhere , im assuming because doesn't work.
i'd recommend take @ greg young's article on task-based ui's on how dtos , messages interact system (both client-side , server-side).
i agree sebastian commands match user interface like. result, you'll need have separate dto/model classes , commands. that's not bad thing model result of query-side of system , shouldn't exact duplicate of messages you're sending system.
also, keeping commands separate model, concern command constructors goes away. controller collects information client, constructs command , submits it.
if you're getting started cqrs, greg's site (cqrsinfo.com) pretty good, 6 1/2 hours video. yes, it's 6 1/2 hours, great introduction , overview of cqrs about. helped me out tremendously.
hope helps!
Comments
Post a Comment