Skip to Content
MOBILE WEB程式設計--第二版
book

MOBILE WEB程式設計--第二版

by Maximiliano Firtman
December 2013
Intermediate to advanced
752 pages
16h
Chinese
GoTop Information, Inc.
Content preview from MOBILE WEB程式設計--第二版
行動 JavaScript
|
463
在分析框架或程式庫時,必須瞭解:最重要的部分是載入與解析 JavaScript 檔。為了解
jQuery 核心檔案,瀏覽器需要取得並解析大約 100 KB JavaScript 碼,即使我們暫
時不會使用它也是如此。下載並解析大型檔案將會傷害網站的效能,並占用電池電力,
所以請在你真正需要時才謹慎地使用它們。
給你一個概念,在某些舊型的 BlackBerry 4.x 設備上,瀏覽器需要 8 秒鐘的時間來解析
jQuery 核心檔,在這段期間,它會顯示「載入中」,此時使用者無法與網站互動。
如果你只因為不想輸入
document.getElementById()
document.querySelector()
而使用 jQuery,請馬上從你的行動網站中移除所有的 jQuery 參考。
Vanilla JS
Vanilla JS
http://vanilla-js.com
)是一種快速、輕量、跨平台的框架,可建構驚人且
強大的 JavaScript 應用程式。你可以用它來創建自己的模組,它可支援動畫、正規
表達式、closures、陣列庫、DOM Ajax 及其他。馬上去查看網站:這個網站可以
比較它與 jQueryPrototypeDojoMooTools 的效能,讓你看到它有多麼快速。
ReadyGo !我在這裡等你回來。
如果你已經看完這個網站並且回來這裡了,或許你已經知道它是一個帶有諷刺意
味的程式庫。Vanilla JS 並不存在,因為它只是一般的 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

成為卓越程式設計師的38項必修法則

成為卓越程式設計師的38項必修法則

Pete Goodliffe
精實企業|高績效組織如何達成創新規模化

精實企業|高績效組織如何達成創新規模化

Jez Humble, Joanne Molesky, Barry O'Reilly

Publisher Resources

ISBN: 9789862769522