七段

无论怎样,请让我先感谢一下国家。

BlogJava 首页 新随笔 联系 聚合 管理
  35 Posts :: 2 Stories :: 7 Comments :: 0 Trackbacks

I was told something about js module framework two years ago. But without a deep dive into it, so that I have to ride out large bundles of js files in a mess on our projects for a long time. After kejun’s YUI presentation on D2 2009, I thought that it’s time to change.

Why use js module?

1, better js organization, readable + flexible + dependencies ordering

2, better performance, asynchronize loading JIT

How we did it before?

1, inline script in jsp : hard to unittest, make the file looks tedious and ugly

2, separated js script file: bad organization, too many ugly import tag <script>

What is the existed solution?

1, YUI module: http://developer.yahoo.com/yui/yuiloader/

2, Jawr: a tunable packaging solution for Javascript and CSS written in java

3, jQuery getSscript: http://ejohn.org/blog/degrading-script-tags/

4, jspkg: http://jspkg.sourceforge.net/docs/index.html

5, module.js http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader

 to do ...

posted on 2010-01-04 23:41 sevenduan 阅读(1555) 评论(0)  编辑  收藏 所属分类: JavaScript

只有注册用户登录后才能发表评论。


网站导航:
博客园   IT新闻   Chat2DB   C++博客   博问