SlideShare uma empresa Scribd logo
1 de 50
Baixar para ler offline
面向未来的前端类库开发
 — KISSY 类库构想与实践



 王保平(玉伯)@ 淘宝
    2010/12/18
Topics
•   KISSY 类库介绍
•   种子 seed
•   种子的长大 core
•   基亍 mixin 的 UI 组件构建
•   展望
不重复造“相同的”轮子
KISSY on Github
小巧灵活,简洁实用
使用起来让人感觉愉悦
• switchable
             • calendar
components   • overlay
             •…
             • dom
             • event
   core      • ajax
             • ...

             • kernel
   seed      • web
             • loader
种子 seed
web apps



        components



          core
 {dom/event/anim/ajax/…}


      web.js
                           loader
      kernel                        seed
{kissy.js, lang.js}
kissy.js
(function(host, S) {

  var meta = { mix: function },
      seed = (host && host[S]) || {};

  host[S] = meta.mix(seed,meta,false);

})(this, „KISSY‟);
• 原子(meta):
    var meta = { mix: fn }


• 宿主(host):
    (function(host, S) {
     })(this, „KISSY‟);

• 种子(seed):
    seed = (host && host[S]) || {};
    meta.mix(seed, meta, false);
• 种子具有 mix() 和 host 两方面特性。

• 一个系统诞生自一个种子,host 是种子的
  培育土壤,种子通过不断 mix() 而成长,
  可生长成任意复杂的系统。

• 传入的种子可以是已存在的复杂系统。
用 jQuery 做种子
<script src=“jquery.js”></script>
<script>
  window[„KISSY‟] = jQuery;
</script>
<script src=“kissy.js”></script>
<script>
  KISSY(„<p>Hello world!</p>‟)
       .appendTo(document.body);
</script>
种子的长大
<script src=“labjs.js”></script>
<script>
  KISSY.mix(KISSY, $LAB);
</script>
<script>
  KISSY.script(„a.js‟).wait()
       .script(„b.js‟);
</script>
基亍 seed, 构建基础类库的方式



① seed + mix(开源类库)
② seed + mix(自主研发)
③ seed + mix(开源类库 + 自主研发)
• KISSY 选择第三种方式

• mix 的开源类库有:sizzle, json2

• seed 和其他功能自主研发
kernel 的特性
• host 无关,可运行在任意宿主环境中
 例子一:在 BESENShell 中运行
 例子二:在 Photoshop CS5 中运行
 好处一:在服务器端运行
 好处二:可装载到任意闭包,沙箱隔离


• 与 ES5 兼容
 面向未来,春暖花开
与浏览器相关的方法



      web.js
                       loader
      kernel
{kissy.js, lang.js}



                 模块注册/加载/调用
loader
• 内置模块,无需 add, 直接 use
• 支持静态和劢态两种方式

KISSY.add(„modName‟, {
  fullpath: „path/to/mod.js‟,
  requires: [„core‟]
});

KISSY.use(„modName,calendar‟, callback);
用 S.app 构建应用
KISSY.app(„D2‟);

D2.add(„克军‟, {
    fullpath: „中国/北京/豆瓣‟
});

D2.use(„克军‟, function() { … });

D2.namespace(„China‟);
前端页面构建

               Module
     Module               Module



Module                             Module
              PageLogic

                Apps
               KISSY
小结
•   系统诞生亍种子
•   种子通过 mix 长大
•   KISSY 选择 seed + mix(开源 + 自主研发)
•   seed 里包含 kernel + web.js + loader
•   kernel 与 host 无关
•   构建应用的方式:S.app
•   kissy seed 是一个独立的迷你类库
种子的长大 core
模块化、颗粒化

• 模块是 kissy 里文件级
  的代码组织方式

• 一个模块可以由多个
  子模块组成
API 的 20/80 原则
• 实现常用的 20% 功能
• 满足用户 80% 的需求



• 例子一:selector 默认只支持 #id tag.class
• 例子二:dom 中无 range 相关方法
core 层的实现方式
attr 的演化(1)

DOM.getAttribute =
  function(el, name) {
  }

DOM.setAttribute =
  function(el, name, value) {
  }
attr 的演化(2)

DOM.attr =
  function(el, name, value) {
    if(value === undefined) {
      return getAttribute(el, name);
    }
    setAttribute(el, name, value);
  }
attr 的演化(3)

DOM.META.getAttribute = fn
DOM.META.setAttribute = fn

DOM.attr = publish(„Attribute‟);
attr 的演化(4)
DOM.META = {
  getAttribute: fn,
  setAttribute: fn,
  getStyle: fn,
  setStyle: fn,
  …
};

S.publish(DOM.META).to(DOM, config);
attr 的演化(5)

S.publish(DOM.META).to(DOM, cfg);
S.publish(Event.META).to(Event, cfg);
S.publish([DOM, Event]).to(Node, cfg);

S.Node(„<p>‟)
 .attr(„data‟, „Hedger is an JS ninja!‟);
实现方式小结
• 一处只干一件事
• 用 META 层封装原子方法
• 用 publish 机制变换为 public api

• 注1:目前尚未完成重构。
• 注2:要特别感谢 QWrap 团队的分享,publish 构想借
  鉴了 QWrap 的 retouch 思路。
• 注3:做好后,会尝试将 META 层独立开源出来,使得能
  像 sizzle 一样,可复用到其他类库,可自由替换。
基亍 Base 的组件开发
Base 示例
小结
• 代码组织方式:模块化 、颗粒化
• 代码实现方式:META 层 + publish 变换
• 组件基础构建:Base
基于 mixin 的 UI 组件构建
基亍约定的 UIBase Extension
• constructor / destructor
• UI 的三个阶段:renderUI / bindUI / syncUI
• uiSetAttribute
function Position() {}
Position.ATTRS = { x:{}, y:{}, xy:{} }
Position.prototype = {
  __renderUI: fn,
  __bindUI: fn,
  __syncUI: fn,
  _uiSetX: fn,
  __destructor: fn
}
模拟 C++ 的多继承
基亍 mixin 的多继承小结
• 世界很复杂,完美的类抽象很难
• 适度继承 + 选择性 mix
• 约定优亍配置

• 好处:可复用性高,整体维护方便

• 不足:成员冲突,门槛稍高
展望
Roadmap

   社区化、子品牌




       常用组件

基础核心
期待这里出现你的名字
It’s NOT the destination,

but just where we BEGIN!
Any Questions?


kissy: http://kissyteam.github.com/
twitter: @lifesinger
blog: http://lifesinger.org/
gtalk: lifesinger@gmail.com

Mais conteúdo relacionado

Mais procurados

使用kslite支持第三方内容开发
使用kslite支持第三方内容开发使用kslite支持第三方内容开发
使用kslite支持第三方内容开发leneli
 
超。光速 網站最佳化實戰 -twMVC#8
超。光速 網站最佳化實戰 -twMVC#8超。光速 網站最佳化實戰 -twMVC#8
超。光速 網站最佳化實戰 -twMVC#8twMVC
 
使用Bigpipe提升浏览速度
使用Bigpipe提升浏览速度使用Bigpipe提升浏览速度
使用Bigpipe提升浏览速度kumawu
 
Asp.net on windows azure cloud service (updated)
Asp.net on windows azure cloud service (updated)Asp.net on windows azure cloud service (updated)
Asp.net on windows azure cloud service (updated)Jeff Chu
 
Gulp.js 自動化前端任務流程
Gulp.js 自動化前端任務流程Gulp.js 自動化前端任務流程
Gulp.js 自動化前端任務流程洧杰 廖
 
快速入坑 Node.js - 0613 SITCON 雲林定期聚
快速入坑 Node.js - 0613 SITCON 雲林定期聚快速入坑 Node.js - 0613 SITCON 雲林定期聚
快速入坑 Node.js - 0613 SITCON 雲林定期聚Lorex L. Yang
 
&#37096;&#33853;&#26684;&#34892;&#37559;
&#37096;&#33853;&#26684;&#34892;&#37559;&#37096;&#33853;&#26684;&#34892;&#37559;
&#37096;&#33853;&#26684;&#34892;&#37559;jehuen
 
编辑器设计Kissy editor
编辑器设计Kissy editor编辑器设计Kissy editor
编辑器设计Kissy editortaobao.com
 
Koubei banquet 34
Koubei banquet 34Koubei banquet 34
Koubei banquet 34Koubei UED
 
浅析浏览器解析和渲染
浅析浏览器解析和渲染浅析浏览器解析和渲染
浅析浏览器解析和渲染Ailsa126
 
Web App 调试基础 (1)
Web App 调试基础 (1)Web App 调试基础 (1)
Web App 调试基础 (1)Xiaoping Feng
 
Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練Joseph Chiang
 
Style基础优化之独角兽篇
Style基础优化之独角兽篇Style基础优化之独角兽篇
Style基础优化之独角兽篇fangdeng
 
支付宝CSS构架
支付宝CSS构架支付宝CSS构架
支付宝CSS构架Sofish Lin
 
Alice库构建
Alice库构建Alice库构建
Alice库构建Sofish Lin
 
Ch04 會話管理
Ch04 會話管理Ch04 會話管理
Ch04 會話管理Justin Lin
 
编辑器设计U editor
编辑器设计U editor编辑器设计U editor
编辑器设计U editortaobao.com
 
第三方内容开发最佳实践
第三方内容开发最佳实践第三方内容开发最佳实践
第三方内容开发最佳实践taobao.com
 
Yui rocks
Yui rocksYui rocks
Yui rocksAdam Lu
 

Mais procurados (19)

使用kslite支持第三方内容开发
使用kslite支持第三方内容开发使用kslite支持第三方内容开发
使用kslite支持第三方内容开发
 
超。光速 網站最佳化實戰 -twMVC#8
超。光速 網站最佳化實戰 -twMVC#8超。光速 網站最佳化實戰 -twMVC#8
超。光速 網站最佳化實戰 -twMVC#8
 
使用Bigpipe提升浏览速度
使用Bigpipe提升浏览速度使用Bigpipe提升浏览速度
使用Bigpipe提升浏览速度
 
Asp.net on windows azure cloud service (updated)
Asp.net on windows azure cloud service (updated)Asp.net on windows azure cloud service (updated)
Asp.net on windows azure cloud service (updated)
 
Gulp.js 自動化前端任務流程
Gulp.js 自動化前端任務流程Gulp.js 自動化前端任務流程
Gulp.js 自動化前端任務流程
 
快速入坑 Node.js - 0613 SITCON 雲林定期聚
快速入坑 Node.js - 0613 SITCON 雲林定期聚快速入坑 Node.js - 0613 SITCON 雲林定期聚
快速入坑 Node.js - 0613 SITCON 雲林定期聚
 
&#37096;&#33853;&#26684;&#34892;&#37559;
&#37096;&#33853;&#26684;&#34892;&#37559;&#37096;&#33853;&#26684;&#34892;&#37559;
&#37096;&#33853;&#26684;&#34892;&#37559;
 
编辑器设计Kissy editor
编辑器设计Kissy editor编辑器设计Kissy editor
编辑器设计Kissy editor
 
Koubei banquet 34
Koubei banquet 34Koubei banquet 34
Koubei banquet 34
 
浅析浏览器解析和渲染
浅析浏览器解析和渲染浅析浏览器解析和渲染
浅析浏览器解析和渲染
 
Web App 调试基础 (1)
Web App 调试基础 (1)Web App 调试基础 (1)
Web App 调试基础 (1)
 
Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練Node.js 入門 - 前端工程開發實務訓練
Node.js 入門 - 前端工程開發實務訓練
 
Style基础优化之独角兽篇
Style基础优化之独角兽篇Style基础优化之独角兽篇
Style基础优化之独角兽篇
 
支付宝CSS构架
支付宝CSS构架支付宝CSS构架
支付宝CSS构架
 
Alice库构建
Alice库构建Alice库构建
Alice库构建
 
Ch04 會話管理
Ch04 會話管理Ch04 會話管理
Ch04 會話管理
 
编辑器设计U editor
编辑器设计U editor编辑器设计U editor
编辑器设计U editor
 
第三方内容开发最佳实践
第三方内容开发最佳实践第三方内容开发最佳实践
第三方内容开发最佳实践
 
Yui rocks
Yui rocksYui rocks
Yui rocks
 

Destaque

Dialysis dose prescription (the basics) dr ujjawal
Dialysis dose prescription (the basics) dr ujjawalDialysis dose prescription (the basics) dr ujjawal
Dialysis dose prescription (the basics) dr ujjawalUjjawal Roy
 
Erlang游戏开发
Erlang游戏开发Erlang游戏开发
Erlang游戏开发litaocheng
 
Erlang开发及应用
Erlang开发及应用Erlang开发及应用
Erlang开发及应用litaocheng
 
Couchdb Beijing Openparty
Couchdb Beijing OpenpartyCouchdb Beijing Openparty
Couchdb Beijing Openpartylitaocheng
 
Memcached 剖析
Memcached 剖析Memcached 剖析
Memcached 剖析litaocheng
 
Physiological function of pd
Physiological function of pdPhysiological function of pd
Physiological function of pdAhmed Salah
 
Basement Membrane Abnormalities
Basement Membrane AbnormalitiesBasement Membrane Abnormalities
Basement Membrane Abnormalitiesedwinchowyw
 
Erlang Practice
Erlang PracticeErlang Practice
Erlang Practicelitaocheng
 
Jose Maria Morales - Spain - Tuesday 29 - HLA for Renal Allocation
Jose Maria Morales - Spain - Tuesday 29 - HLA for Renal AllocationJose Maria Morales - Spain - Tuesday 29 - HLA for Renal Allocation
Jose Maria Morales - Spain - Tuesday 29 - HLA for Renal Allocationincucai_isodp
 
Heparin and dialysis – hhd and pd
Heparin and dialysis – hhd and pdHeparin and dialysis – hhd and pd
Heparin and dialysis – hhd and pdsocialkidney
 
Diabetes insipidus
Diabetes insipidusDiabetes insipidus
Diabetes insipidusbmartin53
 
Approach to a child with hematuria
Approach to a child with hematuriaApproach to a child with hematuria
Approach to a child with hematuriaSunil Agrawal
 
KIDNEY TRANSPLANTATION SEMINAR PRESENTATION
KIDNEY TRANSPLANTATION SEMINAR PRESENTATIONKIDNEY TRANSPLANTATION SEMINAR PRESENTATION
KIDNEY TRANSPLANTATION SEMINAR PRESENTATIONfareedresidency
 
Kidney transplantation
Kidney transplantationKidney transplantation
Kidney transplantationJijo G John
 

Destaque (16)

Dialysis dose prescription (the basics) dr ujjawal
Dialysis dose prescription (the basics) dr ujjawalDialysis dose prescription (the basics) dr ujjawal
Dialysis dose prescription (the basics) dr ujjawal
 
Erlang游戏开发
Erlang游戏开发Erlang游戏开发
Erlang游戏开发
 
Erlang开发及应用
Erlang开发及应用Erlang开发及应用
Erlang开发及应用
 
Couchdb Beijing Openparty
Couchdb Beijing OpenpartyCouchdb Beijing Openparty
Couchdb Beijing Openparty
 
Memcached 剖析
Memcached 剖析Memcached 剖析
Memcached 剖析
 
Physiological function of pd
Physiological function of pdPhysiological function of pd
Physiological function of pd
 
Basement Membrane Abnormalities
Basement Membrane AbnormalitiesBasement Membrane Abnormalities
Basement Membrane Abnormalities
 
Erlang Practice
Erlang PracticeErlang Practice
Erlang Practice
 
Jose Maria Morales - Spain - Tuesday 29 - HLA for Renal Allocation
Jose Maria Morales - Spain - Tuesday 29 - HLA for Renal AllocationJose Maria Morales - Spain - Tuesday 29 - HLA for Renal Allocation
Jose Maria Morales - Spain - Tuesday 29 - HLA for Renal Allocation
 
Heparin and dialysis – hhd and pd
Heparin and dialysis – hhd and pdHeparin and dialysis – hhd and pd
Heparin and dialysis – hhd and pd
 
Hemodialysis basics
Hemodialysis basicsHemodialysis basics
Hemodialysis basics
 
Diabetes insipidus
Diabetes insipidusDiabetes insipidus
Diabetes insipidus
 
Diabetes Insipidus
Diabetes InsipidusDiabetes Insipidus
Diabetes Insipidus
 
Approach to a child with hematuria
Approach to a child with hematuriaApproach to a child with hematuria
Approach to a child with hematuria
 
KIDNEY TRANSPLANTATION SEMINAR PRESENTATION
KIDNEY TRANSPLANTATION SEMINAR PRESENTATIONKIDNEY TRANSPLANTATION SEMINAR PRESENTATION
KIDNEY TRANSPLANTATION SEMINAR PRESENTATION
 
Kidney transplantation
Kidney transplantationKidney transplantation
Kidney transplantation
 

Semelhante a KISSY Mechanism

KISSY for starter
KISSY for starterKISSY for starter
KISSY for starteryiming he
 
.NET Conf Taiwan 2022 - Tauri - 前端人員也能打造小巧快速的 Windows 應用程式
.NET Conf Taiwan 2022 - Tauri -前端人員也能打造小巧快速的 Windows 應用程式.NET Conf Taiwan 2022 - Tauri -前端人員也能打造小巧快速的 Windows 應用程式
.NET Conf Taiwan 2022 - Tauri - 前端人員也能打造小巧快速的 Windows 應用程式升煌 黃
 
Web development with zend framework
Web development with zend frameworkWeb development with zend framework
Web development with zend frameworkthinkinlamp
 
Node js实践
Node js实践Node js实践
Node js实践myzykj
 
Kissy模块化实践
Kissy模块化实践Kissy模块化实践
Kissy模块化实践yiming he
 
Simple kissy1.3
Simple kissy1.3Simple kissy1.3
Simple kissy1.3yiming he
 
合久必分,分久必合
合久必分,分久必合合久必分,分久必合
合久必分,分久必合Qiangning Hong
 
Node.js在淘宝的应用实践
Node.js在淘宝的应用实践Node.js在淘宝的应用实践
Node.js在淘宝的应用实践taobao.com
 
D2_node在淘宝的应用实践_pdf版
D2_node在淘宝的应用实践_pdf版D2_node在淘宝的应用实践_pdf版
D2_node在淘宝的应用实践_pdf版Jackson Tian
 
编辑器设计2
编辑器设计2编辑器设计2
编辑器设计2yiming he
 
DEV305 - ASP.NET 5 開發攻略
DEV305 - ASP.NET 5 開發攻略DEV305 - ASP.NET 5 開發攻略
DEV305 - ASP.NET 5 開發攻略Will Huang
 
课题二:Node.js那些事儿
课题二:Node.js那些事儿课题二:Node.js那些事儿
课题二:Node.js那些事儿Liu Allen
 
Artifacts management with CI and CD
Artifacts management with CI and CDArtifacts management with CI and CD
Artifacts management with CI and CDChen-Tien Tsai
 
Php study.20130110
Php study.20130110Php study.20130110
Php study.20130110bngoogle
 
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩Wen-Tien Chang
 
KISSY Editor Design 2
KISSY Editor Design 2KISSY Editor Design 2
KISSY Editor Design 2yiming he
 
Template mb-kao
Template mb-kaoTemplate mb-kao
Template mb-kaoxwcoder
 

Semelhante a KISSY Mechanism (20)

KISSY for starter
KISSY for starterKISSY for starter
KISSY for starter
 
.NET Conf Taiwan 2022 - Tauri - 前端人員也能打造小巧快速的 Windows 應用程式
.NET Conf Taiwan 2022 - Tauri -前端人員也能打造小巧快速的 Windows 應用程式.NET Conf Taiwan 2022 - Tauri -前端人員也能打造小巧快速的 Windows 應用程式
.NET Conf Taiwan 2022 - Tauri - 前端人員也能打造小巧快速的 Windows 應用程式
 
kissy@2013
kissy@2013kissy@2013
kissy@2013
 
Web development with zend framework
Web development with zend frameworkWeb development with zend framework
Web development with zend framework
 
Node js实践
Node js实践Node js实践
Node js实践
 
Kissy模块化实践
Kissy模块化实践Kissy模块化实践
Kissy模块化实践
 
Simple kissy1.3
Simple kissy1.3Simple kissy1.3
Simple kissy1.3
 
合久必分,分久必合
合久必分,分久必合合久必分,分久必合
合久必分,分久必合
 
Node.js在淘宝的应用实践
Node.js在淘宝的应用实践Node.js在淘宝的应用实践
Node.js在淘宝的应用实践
 
D2_node在淘宝的应用实践_pdf版
D2_node在淘宝的应用实践_pdf版D2_node在淘宝的应用实践_pdf版
D2_node在淘宝的应用实践_pdf版
 
Berserk js
Berserk jsBerserk js
Berserk js
 
编辑器设计2
编辑器设计2编辑器设计2
编辑器设计2
 
DEV305 - ASP.NET 5 開發攻略
DEV305 - ASP.NET 5 開發攻略DEV305 - ASP.NET 5 開發攻略
DEV305 - ASP.NET 5 開發攻略
 
课题二:Node.js那些事儿
课题二:Node.js那些事儿课题二:Node.js那些事儿
课题二:Node.js那些事儿
 
Artifacts management with CI and CD
Artifacts management with CI and CDArtifacts management with CI and CD
Artifacts management with CI and CD
 
Mvc
MvcMvc
Mvc
 
Php study.20130110
Php study.20130110Php study.20130110
Php study.20130110
 
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
 
KISSY Editor Design 2
KISSY Editor Design 2KISSY Editor Design 2
KISSY Editor Design 2
 
Template mb-kao
Template mb-kaoTemplate mb-kao
Template mb-kao
 

Mais de lifesinger

SeaJS 那些事儿
SeaJS 那些事儿SeaJS 那些事儿
SeaJS 那些事儿lifesinger
 
SeaJS - 前端模块化开发探索与网站性能优化实践
SeaJS - 前端模块化开发探索与网站性能优化实践SeaJS - 前端模块化开发探索与网站性能优化实践
SeaJS - 前端模块化开发探索与网站性能优化实践lifesinger
 
开放式类库的构建
开放式类库的构建开放式类库的构建
开放式类库的构建lifesinger
 
让开发也懂前端
让开发也懂前端让开发也懂前端
让开发也懂前端lifesinger
 
SeaJS - 跨环境模块化开发实践
SeaJS - 跨环境模块化开发实践SeaJS - 跨环境模块化开发实践
SeaJS - 跨环境模块化开发实践lifesinger
 
Progressive Enhancement
Progressive EnhancementProgressive Enhancement
Progressive Enhancementlifesinger
 
The Beauty Of Refactoring
The Beauty Of RefactoringThe Beauty Of Refactoring
The Beauty Of Refactoringlifesinger
 
Closure Compiler vs YUICompressor
Closure Compiler vs YUICompressorClosure Compiler vs YUICompressor
Closure Compiler vs YUICompressorlifesinger
 

Mais de lifesinger (8)

SeaJS 那些事儿
SeaJS 那些事儿SeaJS 那些事儿
SeaJS 那些事儿
 
SeaJS - 前端模块化开发探索与网站性能优化实践
SeaJS - 前端模块化开发探索与网站性能优化实践SeaJS - 前端模块化开发探索与网站性能优化实践
SeaJS - 前端模块化开发探索与网站性能优化实践
 
开放式类库的构建
开放式类库的构建开放式类库的构建
开放式类库的构建
 
让开发也懂前端
让开发也懂前端让开发也懂前端
让开发也懂前端
 
SeaJS - 跨环境模块化开发实践
SeaJS - 跨环境模块化开发实践SeaJS - 跨环境模块化开发实践
SeaJS - 跨环境模块化开发实践
 
Progressive Enhancement
Progressive EnhancementProgressive Enhancement
Progressive Enhancement
 
The Beauty Of Refactoring
The Beauty Of RefactoringThe Beauty Of Refactoring
The Beauty Of Refactoring
 
Closure Compiler vs YUICompressor
Closure Compiler vs YUICompressorClosure Compiler vs YUICompressor
Closure Compiler vs YUICompressor
 

KISSY Mechanism