10->The Specification Pattern(feifengxlq预定)
时间:2006-03-27
来源:互联网
The Specification
Pattern
AS AN APPLICATION TAKES SHAPE, bits of business logic sprout up everywhere, seemingly of
their own volition. One object must limit items based on price; another object must choose
the right rate for sales tax; and yet another must determine if any special conditions apply to
the current order. Some business rules are simple, requiring little more than one or two boolean comparisons,
while other rules can require protracted computations, needing database queries and user
input to guide them.
Writing code transforms the abstract (a business rule) into something concrete. But abstractions
(such as shopping styles, tax rates, and shipping fee calculations) have a way of evolving and multiplying
and such changes can easily overwhelm a hapless developer. To stay safe―as you’ve seen so far in
this book―it’s ideal to encapsulate and isolate what readily changes whenever possible. And indeed,
that’s also a wise strategy for business rules, too.
作者: PHPChina 发布时间: 2006-03-26
作者: Bantu 发布时间: 2006-03-28
作者: luocatboy 发布时间: 2006-03-29
作者: feifengxlq 发布时间: 2006-03-29
目前完成了该章节的1/3
计划这周翻译完毕,下周开始校验。
作者: feifengxlq 发布时间: 2006-04-04
作者: PHPChina 发布时间: 2006-04-06
作者: feifengxlq 发布时间: 2006-04-07
引用:
原帖由 phpchina 于 2006-4-6 12:02 发表飞凤和bantu到时协助校验!:D
作者: Bantu 发布时间: 2006-04-07
现在进行校验阶段!
作者: feifengxlq 发布时间: 2006-04-07
business logic 商业逻辑
Hard Coded Specification. 硬编码规范
Policy Factory方案工厂 策略工厂
Specification pattern 规范模式
WACT Web Application Component Toolkit WEB应用程序组件工具箱
HashMap哈希图
PolicyFactor方法器
Constructor 构造器
作者: feifengxlq 发布时间: 2006-04-08
需要权限是50以上
[ 本帖最后由 feifengxlq 于 2006-4-9 13:59 编辑 ]
作者: feifengxlq 发布时间: 2006-04-08
作者: PHPChina 发布时间: 2006-04-09
:)
作者: Bantu 发布时间: 2006-04-09
我去试试先~
作者: feifengxlq 发布时间: 2006-04-09
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28