您知道谈论事件聚合模式的设计模式书籍或视频吗?
我尝试编写自己的事件聚合类,并且阅读了一些文章,但我想逐步使用此模式,例如我想使用 2 个简单的类(例如用户类和电子邮件通知类)创建它,以便当用户通过发送给他的电子邮件更改密码。
我现在不想关心泛型,我希望它尽可能简单。
我根本没有找到任何书籍或视频谈论这种模式,您以前见过吗?
I trying to write my own Event Aggregation class and i go some articles but i want to go step by step with this pattern, for example i want to create it with 2 simple classes, such as User class and Email notification class, so that when user change his password an email sent to him.
I don't want to care for now with generics, i want it as simple as possible.
I didn't find any books or videos talking about this pattern at all, did you met one before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Microsoft 有一个事件聚合快速入门,这是一个合理的代码示例演练。它仅处理几个类,并使用与用户/电子邮件关系(财务交易/日志记录)类似的场景。然而,该示例确实使用了泛型,但这对于所有 PRISM 示例都是相同的,因为这是 Patterns & 的方式。实践实现了事件聚合器模式。
。
Microsoft has an Event Aggregation QuickStart that is a reasonable code sample walkthrough. It deals with only a few classes, and uses a similar scenario to a User / Email relationship (Financial Transaction / Logging). The sample does use generics however, but this would be the same for all PRISM samples as this is the way Patterns & Practices implemented the event aggregator pattern.
.
这听起来不像经典的事件聚合,它有多个事件生产者,你只有一个生产者。但是,如果作为学习练习,您希望使用聚合器模式来分离事件分发,那么 Fowler 的 描述。
This doesn't sound like classic Event Aggregation, which has several Event Producers, you just have one producer. However if, perhaps as a learning exercise, you want to separate the Event distribution by using the aggregator pattern then it seems well covered in Fowler's description.
CodeProject 上的文章:Prism 事件聚合器服务和扩展方法
我也会查看P&P 棱镜
Article at CodeProject: Prism Event Aggregator Service And Extension Methods
I would also check out Prism by P&P