久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <tfoot id='5pVDd'></tfoot>

    2. <legend id='5pVDd'><style id='5pVDd'><dir id='5pVDd'><q id='5pVDd'></q></dir></style></legend>

      • <bdo id='5pVDd'></bdo><ul id='5pVDd'></ul>
      <i id='5pVDd'><tr id='5pVDd'><dt id='5pVDd'><q id='5pVDd'><span id='5pVDd'><b id='5pVDd'><form id='5pVDd'><ins id='5pVDd'></ins><ul id='5pVDd'></ul><sub id='5pVDd'></sub></form><legend id='5pVDd'></legend><bdo id='5pVDd'><pre id='5pVDd'><center id='5pVDd'></center></pre></bdo></b><th id='5pVDd'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5pVDd'><tfoot id='5pVDd'></tfoot><dl id='5pVDd'><fieldset id='5pVDd'></fieldset></dl></div>
    3. <small id='5pVDd'></small><noframes id='5pVDd'>

      什么是不使用 jQuery 的經驗技術原因?

      What are some empirical technical reasons not to use jQuery?(什么是不使用 jQuery 的經驗技術原因?)

        <bdo id='6ciru'></bdo><ul id='6ciru'></ul>
          <tbody id='6ciru'></tbody>
          <tfoot id='6ciru'></tfoot>

          <i id='6ciru'><tr id='6ciru'><dt id='6ciru'><q id='6ciru'><span id='6ciru'><b id='6ciru'><form id='6ciru'><ins id='6ciru'></ins><ul id='6ciru'></ul><sub id='6ciru'></sub></form><legend id='6ciru'></legend><bdo id='6ciru'><pre id='6ciru'><center id='6ciru'></center></pre></bdo></b><th id='6ciru'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='6ciru'><tfoot id='6ciru'></tfoot><dl id='6ciru'><fieldset id='6ciru'></fieldset></dl></div>
          • <legend id='6ciru'><style id='6ciru'><dir id='6ciru'><q id='6ciru'></q></dir></style></legend>
            1. <small id='6ciru'></small><noframes id='6ciru'>

                本文介紹了什么是不使用 jQuery 的經驗技術原因?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                背景:我對成天在 HTML、Javascript 和 CSS 上進行攻擊的前端開發人員的數量感到震驚,并且 忽略 像 jQuery( 或其他等效的輔助框架)和 ignore 工具.strong>拒絕使用它們.我不是在談論 JavaScript 大師,我是在談論每天在戰壕中的 Joe 生產開發人員.我收到很多爭論,這些爭論更像是借口或個人意見,我認為這些觀點沒有任何技術價值,我想確保我沒有遺漏什么.

                問題:什么是不使用 jQuery 的經驗技術原因?

                我不是在尋找像其他框架更好"的宗教或教條論據或主觀意見,將 jQuery 視為問題中所有可比框架的稻草人.

                解決方案

                2015 年更新:

                <塊引用>

                在 2011 年的這個答案中,我談論的是 jQuery、YUI 等庫或原型.2015 年的今天,這種推理仍然適用于Angular、React 或 Ember 等框架.在那4年里技術進步很大,即使我看到了很多對 React 或 Angular 的偏見比我對 jQuery 或YUI,同樣的想法——盡管程度較小——仍然存在今天.

                2016 年更新:

                <塊引用>

                強烈推薦幾天前發表的一篇文章:

                • 為什么選擇 jQuery? 作者:Michael S. Mikowski,單頁Web 應用程序

                那篇文章基本上是一個非常詳細的答案問題.如果在我寫下面的答案時它可用 - 我肯定會引用它.

                原答案:

                我將回答有關 jQuery 的問題,但這些與我聽到的反對使用 YUI、Prototype、Dojo、Ext 和其他少數幾個的論點相同.我聽到的主要論點:

                1. 文件大小,在 jQuery 3.2.1 - 可能比一般網站上的徽標小,可以從 Google 的 CDN 提供服務,該 CDN 可能已經在大多數網站的緩存中您的訪客.由于使用 jQuery 總是意味著您自己的 JavaScript 文件的文件大小更小,它實際上可能意味著 更小 下載,即使尚未在瀏覽器緩存中.

                2. 速度 - 編寫純 JavaScript 可能會更快,但編寫 portable JavaScript 對大多數人來說似乎是不可能的.一個速度更快但不能在所有流行瀏覽器上運行的網站在現實世界中毫無用處.此外,jQuery 使用了一些非常重的優化,實際上速度非常快,并且在每個版本中都變得越來越快,因此除了瑣碎的示例之外,手動編寫更快的代碼實際上并不是那么容易.(*)

                3. 知識產權" - 公司害怕使用別人的代碼 - 而事實上 jQuery 是開源和免費軟件,從你奶奶的博客到亞馬遜,從從 Twitter 到美國銀行,從 Google 到微軟——如果他們可以使用它,那么任何公司都可以使用它.

                4. 我不記得聽到過任何其他被認真使用的論點.

                (*) 這是一個簡單的例子:getElementById('someid') vs. jQuery('#someid')

                使用 getElementById 是否更快?是的.當然,當 Blackberry 4.6 返回不再在文檔中的節點時,每個人都會檢查 parentNode 以捕獲它,對嗎?jQuery 可以.每個人都會處理 IE 和 Opera 按名稱而不是 ID 返回項目的情況,對嗎?jQuery 可以.如果您不這樣做,那么您的代碼就不可移植,并且您會引入很難找到的細微錯誤.getElementById 是人們可能找到的最簡單的例子——甚至不要讓我開始討論事件、AJAX 和 DOM...

                更新:

                實際上還有第四個結果是問為什么有人不想使用 jQuery.我忘了把它放在這個列表上,因為它不是真正的答案,而是任何答案的缺乏.評論我昨天被提醒了.這幾乎不是技術原因".將被添加到列表中,但可能仍然很有趣,并且實際上可能是 最常見的反應.

                我個人懷疑所有這些反應的主要原因是我認為是計算機科學進步的最大障礙:我不希望使用它,因為我從未使用過,因此它一定沒那么重要."

                它曾經是對優化匯編器、編譯器、結構化編程、高級語言、垃圾收集、面向對象編程、閉包或幾乎所有我們現在認為理所當然的東西的反應——而今天它是 AJAX 庫.也許有一天沒有人會記得我們曾經在應用程序級別手動與原始 DOM API 交互,就像現在沒有人記得我們曾經使用 原始、樸素、難以理解的十六進制數字.

                Context: I am astounded by the number of front end developers that hack at HTML, Javascript and CSS all day long and that ignore tools like jQuery ( or other equivalent helper frameworks ) and refuse to use them. I am not talking about JavaScript gurus, I am talking about in the trenches every day Joe production developers. I get a lot of arguments that are more like excuses or personal opinions that I don't think have any technical merit, I want to make sure I am not missing something.

                Question: What are some empirical technical reasons not to use jQuery?

                I am not looking for religious or dogmatic arguments or subjective opinions "like some other framework is better", consider jQuery the straw man for all comparable frameworks in the question.

                解決方案

                Update 2015:

                In this answer from 2011 I'm talking about libraries like jQuery, YUI or Prototype. Today in 2015 that reasoning is still applicable to frameworks like Angular, React or Ember. In those 4 years the technology progressed tremendously and even though I see considerably less prejudice against React or Angular than I saw against jQuery or YUI, the same kind of thinking - though to a lesser extent - is still present today.

                Update 2016:

                I highly recommend an article published few days ago:

                • Why jQuery? by Michael S. Mikowski, author of the Single Page Web Applications book

                That article is basically a very detailed answer to this very question. Had it been available when I was writing the answer below - I would have definitely quoted it.

                Original answer:

                I'll answer about jQuery but those are the same arguments that I've heard against using YUI, Prototype, Dojo, Ext and few others. Main arguments that I've heard:

                1. file size, which in fact is 84.6 KB in case of jQuery 3.2.1 - probably smaller than the logo on an average website and can be served from Google's CDN which is likely to be already in the cache of most of your visitors. As using jQuery always means smaller file size of your own JavaScript files, it can actually mean smaller download, even if not already in the browser cache.

                2. speed - writing pure JavaScript may be faster, but writing portable JavaScript seems to be impossible for most of the people. A website that is faster but doesn't work on every popular browser is useless in the real world. Besides jQuery uses some pretty heavy optimizations to actually be pretty damn fast and keeps getting even faster with every release, so it's actually not so easy to write faster code by hand for anything other than trivial examples.(*)

                3. "intellectual property" - a company is scared using someone else's code - while in fact jQuery is open source and free software that is used everywhere from your grandma's blog to Amazon, from Twitter to Bank of America, from Google to Microsoft - if they can use it then any company can use it.

                4. I can't remember hearing any other argument being used seriously.

                (*) Here's a trivial example: getElementById('someid') vs. jQuery('#someid')

                Is using getElementById faster? Yes. And of course everyone always checks the parentNode to catch when Blackberry 4.6 returns nodes that are no longer in the document, right? jQuery does. And everyone handles the case where IE and Opera return items by name instead of ID, right? jQuery does. If you don't do it then your code is not portable and you introduce subtle bugs that can be very difficult to find. And getElementById is the most trivial example that one could possibly find - don't even get me started on events and AJAX and the DOM...

                Update:

                There is actually a fourth result of asking why someone doesn't want to use jQuery. I forgot to put it on this list because it is not really an answer but rather the lack of any answer. The comment I got yesterday reminded me about it. This is hardly a "technical reason" to be added to the list but may be interesting nonetheless and may actually be the most common reaction.

                What I personally suspect to be the main underlying reason to all of those reactions, though, is what I believe to be the biggest obstacle to progress in computer science: "I don't want to use it because I never did, therefore it must not be that important."

                It was once the reaction to optimizing assemblers, compilers, structured programming, higher level languages, garbage collection, object oriented programming, closures or pretty much everything that we now take for granted — and today it's AJAX libraries. Maybe some day no one will remember that we once used to manually interact with the raw DOM API on the application level like now no one remembers that we once used to write programs using raw, unadorned, inscrutable hexadecimal numbers.

                這篇關于什么是不使用 jQuery 的經驗技術原因?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)

                • <legend id='lmxFB'><style id='lmxFB'><dir id='lmxFB'><q id='lmxFB'></q></dir></style></legend>

                        <tbody id='lmxFB'></tbody>

                        <small id='lmxFB'></small><noframes id='lmxFB'>

                      1. <i id='lmxFB'><tr id='lmxFB'><dt id='lmxFB'><q id='lmxFB'><span id='lmxFB'><b id='lmxFB'><form id='lmxFB'><ins id='lmxFB'></ins><ul id='lmxFB'></ul><sub id='lmxFB'></sub></form><legend id='lmxFB'></legend><bdo id='lmxFB'><pre id='lmxFB'><center id='lmxFB'></center></pre></bdo></b><th id='lmxFB'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lmxFB'><tfoot id='lmxFB'></tfoot><dl id='lmxFB'><fieldset id='lmxFB'></fieldset></dl></div>
                        <tfoot id='lmxFB'></tfoot>
                          <bdo id='lmxFB'></bdo><ul id='lmxFB'></ul>
                          主站蜘蛛池模板: 北条麻妃国产九九九精品小说 | 成人字幕网zmw| 免费福利视频一区二区三区 | 国产一区二| 在线播放一区二区三区 | 欧美精品一区二区免费视频 | hitomi一区二区三区精品 | 农村黄性色生活片 | 亚洲一区二区不卡在线观看 | 精品久久久久久久久久 | 亚洲一区精品在线 | 欧美一区二区三区在线看 | 国产乱码精品一区二区三区中文 | 成人深夜福利在线观看 | 韩国成人在线视频 | 久久久久久久久久久久久9999 | 久久国产一区二区三区 | 91视频大全 | va在线| 精品一区二区在线视频 | 欧美一级久久 | 久久免费精品 | 黄色大片视频 | 91精品国产一区二区三区香蕉 | 欧美在线| 狠狠干狠狠插 | 亚洲国产精品一区 | 久草久| 亚洲国产专区 | 国产欧美日韩一区 | com.国产| 精品不卡 | 精品视频久久久 | 亚洲精品91 | 一区二区三区国产精品 | 一区二区三区在线播放 | h视频在线免费观看 | 麻豆久久久久久久久久 | 欧美成人精品一区二区男人看 | 日韩电影中文字幕 | 天天色官网 |