【发布时间】:2012-11-21 08:52:47
【问题描述】:
Symfony 让我感受到了YAML 的力量。过去,我默认使用 MySQL 为supported_countries、units_of_measure 或sku_conditions 的电子商务网站制作表格。但现在,我可能更喜欢使用YAML 创建config/countries.yml、config/units.yml 或config/skuConditions.yml。所以我很好奇——在这种情况下,当决定解析和分析 YAML 文件 ~ 与 ~ 查询和分析 SQL 数据时,是否需要考虑重要的性能因素?
countries.yml
US:
code: US
name: United States
CA:
code: CA
name: Canada
skuConditions.yml
default-unit: new
units
new:
short: new
long: brand spanking new
description: never been used.
open-box:
short: open
long: pretty much new
description: the box has been opened but never used.
【问题讨论】:
-
+1 跳出框框思考。
-
到目前为止我看到的最大问题是为 .yml 文件找到一个好位置。您真的不希望 .yml 文件位于主包中,因为这会限制可移植性。