Your SlideShare is downloading. ×
Underscore.js-- a utility-belt library for JavaScript                                By zfcao@corp.netease.com            ...
underscore ?不扩展任何 JavaScript 的原生对象委托浏览器原生的方法向上兼容 es5
Underscore vs jQuery Utilities                                                             =N aN ?Collections : $.each vs...
Jquery -- dom(browser)Underscore help html5 in client  and node in server!!
所以咧……        Tips: 并不完全能取代 jquery.util ,旨在补充 jquery 或 raw javascript                                     _.groupBy        ...
思考:把 {a:1,b:2,c:3} 转换成“ a=1&b=2&c=3“  ?_({a:1,b:2,c:3}).chain().map(function(v,k){return k += +v}).value().join("&");
jquery                                     backbone                                           用来实现前端 MVC 架构组织提供 dom 操作, aj...
用到我们项目中去 :
api:http://documentcloud.github.com/underscore/docs/underscore.htmlhttp://underscorejs.org/http://www.css88.com/doc/unders...
MORE:Underscore 竟然有 php, lua, perl 的移植了 ?http://brianhaveri.github.com/Underscore.php/http://vti.github.com/underscore-per...
THE ENDTHANK YOU
Underscore
Underscore
Upcoming SlideShare
Loading in...5
×

Underscore

899

Published on

 a utility-belt library for JavaScript By zfcao@corp.netease.com at
2012-09-07

Published in: Technology, Design
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
899
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Underscore"

  1. 1. Underscore.js-- a utility-belt library for JavaScript By zfcao@corp.netease.com 2012-09-07
  2. 2. underscore ?不扩展任何 JavaScript 的原生对象委托浏览器原生的方法向上兼容 es5
  3. 3. Underscore vs jQuery Utilities =N aN ?Collections : $.each vs _.each Na N ==比较: http://jsperf.com/jquery-each-vs-for-loop/12Arrays :$.unique()+$.merge() vs _.union()比较: http://jsperf.com/merge-vs-unionObjects : $.extend() vs _.extend()比较: http://jsbin.com/atetew/5/editTemplates:$. template () vs _. template ()比较: http://jsperf.com/template-vs-template
  4. 4. Jquery -- dom(browser)Underscore help html5 in client  and node in server!!
  5. 5. 所以咧…… Tips: 并不完全能取代 jquery.util ,旨在补充 jquery 或 raw javascript _.groupBy _.reduce _.reject _.include _.sortBy _.key(obj)_.bind(func ,object) _.memorize(func,[hashFunc]) _.throttle(func,wait)
  6. 6. 思考:把 {a:1,b:2,c:3} 转换成“ a=1&b=2&c=3“  ?_({a:1,b:2,c:3}).chain().map(function(v,k){return k += +v}).value().join("&");
  7. 7. jquery backbone 用来实现前端 MVC 架构组织提供 dom 操作, ajax 支 •Model持 •View •Collection •router underscore 对 ecmascript 补充,提供 常用方法的支持 eg : http://arturadib.com/hello-backbonejs/docs/5.html
  8. 8. 用到我们项目中去 :
  9. 9. api:http://documentcloud.github.com/underscore/docs/underscore.htmlhttp://underscorejs.org/http://www.css88.com/doc/underscore
  10. 10. MORE:Underscore 竟然有 php, lua, perl 的移植了 ?http://brianhaveri.github.com/Underscore.php/http://vti.github.com/underscore-perl/http://mirven.github.com/underscore.lua/http://lodash.com/ 是对 underscore的改进,号称 8 倍速度于 underscore
  11. 11. THE ENDTHANK YOU

×