使用骨料的优势 [英] advantage of using aggregate

查看:154
本文介绍了使用骨料的优势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了您关于ddd的文章,这对我非常有用.我想问一下使用聚合的好处是什么(因为它显示一组具有一个根的对象)

如您的示例客户汽车和级别所解释

假设我的代码是

I read your article about ddd and it''s very usefull for me.I want to ask that what is the advantage of using aggregates (as it presents group of objects with one root)

as explained in your example customer car and tier

suppose my code is

public class customer
{
public Integer GetScrapTiers()
{
//this returns no of scap tiers for a customer who has a car
car.tier objcar=new car.tier();
objcar.getNumberofTier(Cust_id,scrap);//for cust_id tyres of type scrap
}

}
[this is an aggregate we can say]
public class Car
{
private Tier
{
private integer getNumberofTier(id,type)
{
//implement..
}
}
}
}

现在通过这种方式,我们将实现聚合或以其他某种方式进行解释.

Now is in this way we will implement aggregate or in some other way please explain.

推荐答案

您似乎想将此问题提交给与他/她的文章有关的作者.

我建议您使用本文结尾处的论坛,以联系作者并快速获得答复.很少您会找到阅读此论坛的作者.

请在文章的消息论坛中发布相同的内容.
It looks like you want to ask this question to an author related to his/her article.

I would suggest you to please use the forum present at the end of the article in order to reach author and get quick response. Rarely you will find authors reading this forum.

Please post the same at the article''s message forum.


这篇关于使用骨料的优势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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