LABjs¡¢RequireJS¡¢SeaJS Äĸö×îºÃÓã¿ÎªÊ²Ã´£¿

µ¼Óï LABjs µÄºËÐÄÊÇ LAB£¨Loading and Blocking£©£ºLoading Ö¸Òì²½²¢ÐмÓÔØ£¬Blocking ÊÇָͬ²½µÈ´ýÖ´ÐС£LABjs ͨ¹ýÓÅÑŵÄÓï·¨£¨script ºÍ wait£©ÊµÏÖÁËÕâÁ½´óÌØÐÔ£¬ºËÐļÛÖµÊÇÐÔÄÜÓÅ»¯¡£LABjs ÊÇÒ»¸öÎļþ
LABjs µÄºËÐÄÊÇ LAB£¨Loading and Blocking£©£ºLoading Ö¸Òì²½²¢ÐмÓÔØ£¬Blocking ÊÇָͬ²½µÈ´ýÖ´ÐС£LABjs ͨ¹ýÓÅÑŵÄÓï·¨£¨script ºÍ wait£©ÊµÏÖÁËÕâÁ½´óÌØÐÔ£¬ºËÐļÛÖµÊÇÐÔÄÜÓÅ»¯¡£LABjs ÊÇÒ»¸öÎļþ¼ÓÔØÆ÷¡£

RequireJS ºÍ SeaJS ÔòÊÇÄ£¿é¼ÓÔØÆ÷£¬³«µ¼µÄÊÇÒ»ÖÖÄ£¿é»¯¿ª·¢ÀíÄºËÐļÛÖµÊÇÈà JavaScript µÄÄ£¿é»¯¿ª·¢±äµÃ¸ü¼òµ¥×ÔÈ»¡£

Ä£¿é¼ÓÔØÆ÷Ò»°ã¿É½µ¼¶ÎªÎļþ¼ÓÔØÆ÷Óã¬Òò´ËʹÓà RequireJS ºÍ SeaJS£¬Ò²¿ÉÒÔ´ï³É LABjs µÄÐÔÄÜÓÅ»¯Ä¿µÄ¡£

RequireJS ºÍ SeaJS ¶¼ÊǺܲ»´íµÄÄ£¿é¼ÓÔØÆ÷£¬Á½ÕßÇø±ðÈçÏ£º

1. Á½Õ߶¨Î»ÓвîÒì¡£RequireJS Ïë³ÉΪä¯ÀÀÆ÷¶ËµÄÄ£¿é¼ÓÔØÆ÷£¬Í¬Ê±Ò²Ïë³ÉΪ Rhino / Node µÈ»·¾³µÄÄ£¿é¼ÓÔØÆ÷¡£SeaJS ÔòרעÓÚ Web ä¯ÀÀÆ÷¶Ë£¬Í¬Ê±Í¨¹ý Node À©Õ¹µÄ·½Ê½¿ÉÒԺܷ½±ãÅÜÔÚ Node ·þÎñÆ÷¶Ë

2. Á½Õß×ñÑ­µÄ±ê×¼ÓвîÒì¡£RequireJS ×ñÑ­µÄÊÇ AMD£¨Ò첽ģ¿é¶¨Ò壩¹æ·¶£¬SeaJS ×ñÑ­µÄÊÇ CMD £¨Í¨ÓÃÄ£¿é¶¨Ò壩¹æ·¶¡£¹æ·¶µÄ²»Í¬£¬µ¼ÖÂÁËÁ½Õß API µÄ²»Í¬¡£SeaJS ¸ü¼ò½àÓÅÑÅ£¬¸üÌù½ü CommonJS Modules/1.1 ºÍ Node Modules ¹æ·¶¡£

3. Á½ÕßÉçÇøÀíÄîÓвîÒì¡£RequireJS ÔÚ³¢ÊÔÈõÚÈý·½Àà¿âÐÞ¸Ä×ÔÉíÀ´Ö§³Ö RequireJS£¬Ä¿Ç°Ö»ÓÐÉÙÊýÉçÇø²ÉÄÉ¡£SeaJS ²»Ç¿ÍÆ£¬¶ø²ÉÓÃ×ÔÖ÷·â×°µÄ·½Ê½À´“º£ÄÉ°Ù´¨”£¬Ä¿Ç°ÒÑÓнϳÉÊìµÄ·â×°²ßÂÔ¡£

4. Á½Õß´úÂëÖÊÁ¿ÓвîÒì¡£RequireJS ÊÇûÓÐÃ÷Ï﵀ bug£¬SeaJS ÊÇÃ÷ÏÔûÓÐ bug¡£

5. Á½Õ߶Ե÷ÊԵȵÄÖ§³ÖÓвîÒì¡£SeaJS ͨ¹ý²å¼þ£¬¿ÉÒÔʵÏÖ Fiddler ÖÐ×Ô¶¯Ó³ÉäµÄ¹¦ÄÜ£¬»¹¿ÉÒÔʵÏÖ×Ô¶¯ combo µÈ¹¦ÄÜ£¬·Ç³£·½±ã±ã½Ý¡£RequireJS ÎÞÕâ·½ÃæµÄÖ§³Ö¡£

6. Á½ÕߵIJå¼þ»úÖÆÓвîÒì¡£RequireJS ²ÉÈ¡µÄÊÇÔÚÔ´ÂëÖÐÔ¤Áô½Ó¿ÚµÄÐÎʽ£¬Ô´ÂëÖÐÁôÓÐΪ²å¼þ¶øдµÄ´úÂë¡£SeaJS ²ÉÈ¡µÄ²å¼þ»úÖÆÔòÓë Node µÄ·½Ê½Ò»Ö£º¿ª·Å×ÔÉí£¬Èòå¼þ¿ª·¢Õß¿ÉÖ±½Ó·ÃÎÊ»òÐ޸ģ¬´Ó¶ø·Ç³£Áé»î£¬¿ÉÒÔʵÏÖ¸÷ÖÖÀàÐ͵IJå¼þ¡£

»¹Óв»ÉÙϸ½Ú²îÒì¾Í²»¶à˵ÁË¡£

×ÜÖ®£¬SeaJS ´Ó API µ½ÊµÏÖ£¬¶¼±È RequireJS ¸ü¼ò½àÓÅÑÅ¡£Èç¹û˵ RequireJS ÊÇ Prototype Àà¿âµÄ»°£¬Ôò SeaJS ÊÇ jQuery Àà¿â¡£

×÷ÕߣºÓñ²®
Á´½Ó£ºhttp://www.zhihu.com/question/20342350/answer/14828786
http://www.aseoe.com/ true LABjs¡¢RequireJS¡¢SeaJS Äĸö×îºÃÓã¿ÎªÊ²Ã´£¿ http://www.aseoe.com/show-12-689-1.html report <£¿php echo strlen($content) / 2; ?> LABjs µÄºËÐÄÊÇ LAB£¨Loading and Blocking£©£ºLoading Ö¸Òì²½²¢ÐмÓÔØ£¬Blocking ÊÇָͬ²½µÈ´ýÖ´ÐС£LABjs ͨ¹ýÓÅÑŵÄÓï·¨£¨script ºÍ wait£©ÊµÏÖÁËÕâÁ½´óÌØÐÔ£¬ºËÐļÛÖµÊÇÐÔÄÜÓÅ»¯¡£LABjs ÊÇÒ»¸öÎļþ
TAG:labjs requirejs seajs
±¾Õ¾»¶Ó­ÈκÎÐÎʽµÄתÔØ£¬µ«ÇëÎñ±Ø×¢Ã÷³ö´¦£¬×ðÖØËûÈËÀͶ¯³É¹û
תÔØÇë×¢Ã÷£º ÎÄÕÂתÔØ×Ô£º°®Ë¼×ÊÔ´Íø http://www.aseoe.com/show-12-689-1.html

[Ç°¶Ë²å¼þÍƼö] Plugin

1 2 3 4
  • jQueryʵÏÖÖð×ÖÖð¾äÏÔʾ²å¼þl-by-l.min.js
  • jQuery´ø·½Ïò¸ÐÖªµÄÊó±ê»¬¹ýͼƬ±ß¿òÌØЧ²å¼þ
  • jQuery HotKeys¼àÌý¼üÅÌ°´ÏÂʼþkeydown²å¼þ
  • ÏìӦʽÎÞÏÞÂÖ²¥jQueryÐýתľÂí²å¼þ
ÏìӦʽÎÞÏÞÂÖ²¥jQueryÐýתľÂí²å¼þ
webÇ°¶Ë¿ª·¢
°®Ë¼×ÊÔ´Íø Copyright 2012-2014 Www.Aseoe.Com All rights reserved.(½úICP±¸13001436ºÅ-1)