用AOP进行透明的契约式设计。
你可以概括描述一下契约式设计吗?
你可以概括描述一下契约式设计吗?
Bill Venners: Could you give an overview of Design by Contract?
实际上,契约式设计倡导起首写断言。
实际上,契约式设计提倡首先写断言。
契约式设计或防御性编程。
单元测试和契约式设计
当然,这就是契约式设计技术所包含的内容了。
This is, of course, where the techniques of Design by Contract come in.
契约式设计是一种发现和修复代码中逻辑错误的工具。
Design by contract is a tool for finding and fixing logic bugs in code.
注意,在生产部署时可以关闭契约式设计测试,以消除它们的开销。
Note that Design by Contract tests can be turned off in production deployments to remove their overhead.
静态验证和契约式设计理论大部分属于确定性理论的范畴。
Static verification and design by contract relay on theorems that are mostly based on deterministic approach.
编写契约式设计测试,实际上可以不需要Contract4J。
You don't really need Contract4J to write Design by Contract tests.
BertrandMeyer介绍了契约式设计的概念。
Bertrand Meyer introduced the concept of Design by Contract.
理解了用AOP实现契约式设计的必要基础设施后,就可以让它工作了。
Now that you understand the necessary infrastructure for implementing Design by Contract with AOP, you can put it to work.
契约式设计也做了显式的合约定义,而在单元测试中这些更隐式。
Design by contract also makes explicit the contract definition that is more implicit in unit tests.
契约式设计比起单元测试有些优势,但是这两种方法是互补的。
Design by Contract has some advantages over unit testing, but the two methods are complementary.
AspectJ主页:了解使用方面进行契约式设计测试的更多内容。
AspectJ home page: Learn more about using aspects for Design by Contract testing.
代码契约(Code Contracts)是“契约式设计”的。NET实现。
Code Contracts is the.net implementation of the Design by Contract concept.
正如前面提到过的,单元测试和契约式设计用不同的方式实现类似的目标。
As previously noted, it is true that unit testing and Design by Contract accomplish similar objectives by different means.
契约式设计避免了额外的编码并提高了性能,只要所有的客户都遵守契约。
Design by contract avoids extra code and improves performance, as long as all clients of a class abide by the contract.
另一种方法是契约式设计,这是阐明组件设计细节的一项切实可行的技术。
Another approach is design by Contract, a proven technique for clarifying component design details.
使用契约式设计,可以用可编程表达式指定对于组件输入和返回结果的要求。
With Design by Contract, you can use programmatic expressions to specify the requirements on inputs to a component, as well as on the returned results.
所以,严格来说,契约式设计看起来可能根本不是AOP 技术的备选方案。
Therefore, strictly speaking, it may appear that Design by Contract isn't an appropriate candidate for an AOP approach at all.
重要模式包括契约式设计、定义良好的接口、可组合性、可预测的行为和组件测试。
Significant patterns include design by contract, well-defined interfaces, composability, predictable behavior, and component testing.
接着谈到契约式设计(Designby Contract)原则和需求管理。
He then goes into Design by Contract principles, and requirements management.
契约式设计让类的设计者专注于实现了类的功能性的逻辑,而不用担心实参的有效性。
Design by Contract lets the class designer concentrate on the logic that implements the class functionality without worrying about the validity of arguments.
契约式设计的一个主要优势是,它在接口或类本身当中提供了关于预期行为的显式信息。
One of the major benefits of Design by Contract is that it provides explicit information within the interface or class itself about expected behavior.
像Contract4J这样的契约式设计工具在单元测试比较分散或比较困难的时候最有帮助。
A Design by Contract tool like Contract4J is most helpful in situations where unit testing is sparse or difficult.
然而,契约式设计认为契约对于软件的正确性至关重要,它们应当是设计过程的一部分。
However, DbC considers these contracts to be so crucial to software correctness that they should be part of the design process.
契约式设计的“严重失败”性质把契约行为的调试简化为每个过程的意图被清晰地规定。
DbC's "fail hard" property simplifies the debugging of contract behavior as the intended behavior of each routine is clearly specified.
应用推荐