DDD报告方案 [英] DDD Reporting Scenarios

查看:132
本文介绍了DDD报告方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建将使用MVC3,EF和DDD方法一报告/分析Web应用程序。我havign很难拿出实体或对象类的现有数据库的汇总表。例如,我有订单和订单行作为骨料,客户为实体。这三个对象可以使用DDD的做法,但如果我想有一个OrdersAggregate表,这将contatins如客户名称,付款方式等。

I'm trying to create a reporting/analysis web app that will use MVC3, EF and DDD approach. I'm havign a hard time to come up with entities or object classes for aggregated tables on existing database. For example, I have Orders and OrderLine as an aggregate and Customers as Entity. This three objects can be modeled using DDD approach but what if I want to have an OrdersAggregate Table which will contatins all the details like customer name, payment type, etc.

我应该在这里创建一个对象类包含客户名称,付款类型等属性或让EF创建他的sql查询,并加入相关的表?我担心这里的表现,这将在云中deploed和交易量巨大召唤。

Should I create an object class here which contain the properties of customername, payment type, etc. or let EF create his sql query and join related tables? I'm worrying about performance here and this will be deploed on a cloud and a huge volume of transactions awaits.

有什么建议?

推荐答案

您可以利用的 CQRS 这里在某些方面采取分离读取模型受益写。

You can utilize CQRS and here in some aspects to take the benefit of separating read model from write.

不必须实现整个结构,只是分开的写模式和服务的读出,这使读出模型发送定制的DTO平为rading和分析的目的,并且另一方面强烈域模型在写模式业务逻辑处理。

Dont have to implement the entire architecture, just separate the read from write model and services, this make the read model send customized DTOs flat for rading and analysis purposes, and a strong domain model on the other hand in the write model for business logic handling.

这个和这个例如

这篇关于DDD报告方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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