CQRS /事件采购项目结构 [英] CQRS/Event sourcing project structure

查看:126
本文介绍了CQRS /事件采购项目结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用事件采​​购和我在想,如果这种类型的项目,应在Visual Studio不同的方式相比,涉及多个层次的其他项目的结构我的第一个项目CQRS?

I have my first CQRS project which uses event sourcing and I was wondering if this type of project should be structured in a different way in Visual studio compared to other projects that involve multiple tiers?

例如,在创建pastt项目有层,如远程,应用服务,域名等,并很清楚每一层/装配触及它下面的人。这些组件好像做了很多,像使用NDepend的工具没有透露太多关于该项目的结构。

For example, in the pastt projects created had layers such as Remoting, App services, domain etc and it was clear each layer/assembly touched the one below it. These assemblies seemed to do a lot and using a tool like NDepend did say much about the structure of the project.

然而,随着CQRS项目将是更好只是为了有较小的组件,显示他们的意图,即对命令装配,另外对于事件,另外对于事件处理程序等。

However, with a CQRS project would it be better just to have smaller assemblies that show their intent i.e. assembly for commands, another for events, another for event handlers etc.

现在用NDepend的它会给我一个更好的再presentation如何组件使用。

Now with NDepend it would give me a better representation how the assemblies are used.

TIA

JD

推荐答案

我一般组织我CQRS项目是描述他们的意图的较小的项目 - 命令,域事件,解归,仓库,命令服务等

I generally structure my CQRS projects with smaller projects that are descriptive of their intent -- Command, Domain, Event, Denormalizer, Repository, Command Service, etc.

这使得它更容易通过你的解决方案,这种方式来浏览,也使得它更容易(在船上未来或新的团队成员)人在你的团队,你的系统的各个组成部分的工作。

It makes it much easier to navigate through your solution this way, and also makes it easier for others on your team (or new team members coming on board) to work with the various components of your system.

另外,如果你有一个团队这方面的工作,你可以很容易地让其中一组主要侧重于域项目(可能是您的高端团队成员),而您的初级成员可以在解归项目。

Also, if you have a team working on this, you can easily let one group focus primarily on the domain project (probably your higher-end team members) while your junior members could work on the denormalizer project.

您会结束了(可能)更多的项目,但他们会更小的块,并更容易理解他们的目的。有点像单一职责原则,但是在项目层次。

You'll end up with (probably) more projects, but they'll be smaller chunks and much easier to understand their purpose. Kind of like the Single Responsibility Principle, but at the project level.

希望这有助于。祝你好运。

Hope this helps. Good luck.

这篇关于CQRS /事件采购项目结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆