The Problem with Native JavaScript APIs

0
(0)

The Problem with Native JavaScript APIs
 

  • Author:Nicholas C. Zakas
  • Length: 16 pages
  • Edition: 1
  • Publisher: O’Reilly Media
  • Publication Date: 2012-08-08
  • ISBN-10: B008MYLMHG
  • ISBN-13: 9781449339951
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    Many features inspired by popular JavaScript libraries are now available as native JavaScript APIs in today’s powerful browsers. While that may seem convenient given all of the JavaScript you need to write, relying on these APIs will only make code maintenance more difficult in the long run.

    In this report, Nicholas Zakas—consultant and former front-end tech leader at Yahoo!—provides a case study to show how different browsers can develop native APIs for the same specification and still end up with different interpretations. You’ll discover how these APIs can tie your code to specific browsers, forcing you to upgrade application logic whenever new browsers and new browser versions are released.

    Table of Contents

    The Problem with Native JavaScript APIs 1
    Issues with Native APIs 2
    Case Study: matchMedia() 3
    Facades and Polyfills 5
    What to Do? 6

    中文:

    书名:本机JAVASCRIPT API的问题

    受流行的JavaScript库启发的许多特性现在都可以在当今功能强大的浏览器中作为原生的JAVASCRIPT API使用。虽然考虑到您需要编写的所有JavaScript,这似乎很方便,但从长远来看,依赖这些API只会使代码维护变得更加困难。

    在这份报告中,雅虎顾问和前前端技术负责人Nicholas Zakas提供了一个案例研究,展示了不同的浏览器如何为相同的规范开发原生API,并最终得到不同的解释。您将发现这些API如何将您的代码绑定到特定的浏览器,迫使您在发布新浏览器和新浏览器版本时升级应用程序逻辑。

    目录表

    原生JAVASCRIP1的问题
    本机API的问题2
    案例研究:MatchMedia()3
    立面和多层填方5
    怎么办?5.

  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册