Specification Pattern vs Spec in BDD

耗尽温柔 提交于 2019-12-25 03:45:10

问题


I'm trying to explore Behavior Driven Design and Domain Driven Design. I'm getting that written specifications drive the tests in BDD, but also that business logic can be encapsulated using the specification pattern for re-use in domain objects and repositories, etc.

Are these basically the same concept just used in different ways, used in conjunction together, or am I completely confusing the concepts?

Please shed some light, if possible.


回答1:


BDD or context specification is a style of writing unit tests in a test first manner. DDD is a term coined by Eric Evans that basically re-introduces appropriate design patterns when you are constructing software systems. If you are wanting to do test first development in a context specification style then see this link. From a BDD standpoint there are lots of resources out there if you really want to design your software systems using the patterns described in Eric Evans' book you will find some good resources here



来源:https://stackoverflow.com/questions/1408553/specification-pattern-vs-spec-in-bdd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!