PHP 业务逻辑管理与事件驱动编程
1. 业务逻辑结构化示例
先来看一个购物车输出示例,如下是 shopping-output.txt 的内容:
Your shopping cart contains :
Item - Quantity - Net Price Each - Total Price inc. Tax
=======================================================
Brie - 3 - 7 - 21.42
Shorts - 1 - 9.99 - 10.99
The Dictionary - 2 - 4.99 - 10.48
=======================================================
Thank you for your order.
USD 42,89 will be charged to your card when your order is dispatched.
Tax Summary for this order :
array(3) {
["cheeses"]=>
float(0.42)
["clothes"]=>
float(1)
["books"]=>
float(0.5)
}
这是一个虚构的美国零售商的购物车输出,从货币符号能看出其地域特征。若该零售商发现可以通过创建专门的欧洲网站来增加欧洲销量,比如推广布里干酪(针对喜爱奶酪的法国人)和词典(因为英国人可能拼写不好)。由于新网站的所有交易都遵循
PHP事件驱动与异步编程实践
超级会员免费看
订阅专栏 解锁全文
7675

被折叠的 条评论
为什么被折叠?



