构建前端 DSL

目前在传统的软件开发领域 DSL 已经比较普遍,特别是 Martin Fowler 的突出贡献。而在前端领域尚较少涉及,而如果在前端开发中合理使用 DSL 同样也可以有效得减少代码数量,提高可读性。一个常见的应用场景即是前端模板的构建,从本质上看模板也是一个微型语言,因此可以从 DSL 的角度着手,使用工具快速构建一个适合于特定前端框架的模板引擎。本文将以 KISSY XTemplate 为例介绍如何构建前端的 DSL。

【译】不成熟的标准化是我们唯一惧怕的

原文地址:http://yuiblog.com/blog/2008/08/14/premature-standardization/The web is made of open standards. This was a significant factor in the web’s displacement of proprietary application platforms. Openness is hugely attractive, so much so that the web dominates over competitors with better technologies. The difficult tradeoff that comes with a standards-based approach is that it is difficult to innovate. As a result, the basic technologies of the browser have been stalled for a decade. What innovation we’ve enjoyed, such as the Ajax revolution, has come by mining all of the latent, accidental potential of the existing standards. That potential has been used up.