DDD是否适合各种应用? [英] Is DDD suited for all kinds of application?

查看:76
本文介绍了DDD是否适合各种应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里和其他论坛上提出的许多问题中看到的一个常见反应是,您不需要为此进行DDD。它是一个简单的CRUD应用程序,DDD是一项过度设计的项目。

One common reaction that I see for a lot of questions asked here and other forums are like "You don't need to do DDD for that. Its a simple CRUD application, DDD is an over-engineering".

嗯,我是DDD的新手,我认为DDD中有很多元素具有普遍吸引力,可以广泛使用,无论您是否应用程序是复杂的enuf来强制DDD。例如,应用程序分层,DDD识别的不同工件等。可以从基础知识和公认的贫血模型开始,然后朝着尽可能多的纯度工作/重构。

Well I am new to DDD and I feel there are a lot of elements in DDD that has universal appeal and can be used across the board, irrespective of the fact whether your application is complex enuf to mandate DDD. For example, layering of application, differnent artifacts that DDD recognises etc. May be start with the basics and admittedly anemic models and then work/refactor towards as much purity as one can get.

这种方法听起来不错吗?

还是您会说,在每个应用程序的设计中,是否要进行DDD都有一个基本选择

Does this approach sound good?
Or would you say that there is a fundamental choice in design of every application in terms of whether to go DDD way or not , kind of "all-or-none" choice?

更新 (提供更多上下文) ,以回应Hugh在下面的评论)

 我正在围绕现有RuleEngine类应用程序构建Web应用程序,基本上是CRUD和一些验证,不变式,然后是部署过程。规则编写和语义检查由我称为CRUD的一部分独立代码完成,而我的代码中没有任何特定于语义的逻辑。我正在尝试为此应用程序使用DDD,但我发现它可能不够复杂,无法适合DDD范例。没有为该域定义无所不在的语言,即该语言除了命名所涉及的实体集以外还不够专业。我听到我的域专家在创建,编辑和删除实体方面进行了发言。

UPDATE (to provide more context, in response to hugh's comment below)
  I am building a webapp around an existing RuleEngine kind of application, basically CRUD and some validations, invariants and then a process of deployment. The rule-authoring and semantic check is done by a standalone piece of code that i call as part of the CRUD and none of that semantic specific logic is there in my code. I am trying to use DDD for this application, but i see it might not be complicated enough to fit into the DDD paradigm. There is no ubiquitous language defined for the domain i.e the language is not specialized enough beyond naming the set of entities involved. I hear my domain expert speaking in terms of creating, editing, deleting entities.

推荐答案

DDD并非全有。同样,DDD中描述的许多模式也不是新鲜事物,可以在各处找到。埃里克·埃文斯(Eric Evans)(DDD书的作者)只是将它们组装起来,在需要的地方将它们形式化,并使其相互关联。您可以自由使用适合您的问题空间的东西。

DDD is not all-or-nothing. Also, many of the patterns described in DDD are not new and can be found all over the place. Eric Evans (the author of the DDD book) just assembled them, formalized them where needed, and set them in relation to each other. You are free to use what fits to your problem space.

经常被忽略的地方:DDD描述了实现模式以及分析模式。在许多(如果不是大多数)应用程序中,分析模式可能会过大,但实现模式(即实体规范服务)可以是在不太复杂的场景中也很有用。

What is often overlooked: DDD describes implementation patterns as well as analysis patterns. The analysis patterns may be overkill in many (if not most) applications, but the implementation patterns (i.e. Entities, Specifications, Services) can be of great use in less complex scenarios as well.

这篇关于DDD是否适合各种应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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