Web Workers: Multithreaded Programs in JavaScript

0
(0)

Web Workers: Multithreaded Programs in JavaScript
 

  • Author:Ido Green
  • Length: 60 pages
  • Edition: 1
  • Publisher: O’Reilly Media
  • Publication Date: 2012-06-07
  • ISBN-10: 1449322131
  • ISBN-13: 9781449322137
  • Sales Rank: #450244 (See Top 100 Books)
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    Web apps would run much better if heavy calculations could be performed in the background, rather than compete with the user interface. With this book, you’ll learn how to use Web Workers to run computationally intensive JavaScript code in a thread parallel to the UI. Yes, multi-threaded programing is complicated, but Web Workers provide a simple API that helps you be productive without the complex algorithms.

    If you have an intermediate to advanced understanding of JavaScript— especially event handling and callbacks—you’re ready to tackle Web Workers with the tools in this example-driven guide.

    • Start creating Web Workers and understand what they can and can’t do
    • Determine which browser versions support the API
    • Use dedicated Web Workers for tasks that consume a lot of CPU, such as data parsing
    • Explore use cases for creating inline Workers, such as encapsulating a web app in one page
    • Create a shared Worker to communicate multiple web app instances to the server, and other uses
    • Learn best practices for debugging Web Workers
    • Apply Web Workers within the server-side Node environment

    中文:

    书名:Web Worker:JavaScript中的多线程程序

    如果繁重的计算可以在后台执行,而不是与用户界面竞争,网络应用程序会运行得更好。在这本书中,您将学习如何使用Web Worker在与UI并行的线程中运行计算密集型的JavaScript代码。是的,多线程编程是复杂的,但Web Worker提供了一个简单的API,可以帮助您在不使用复杂算法的情况下提高工作效率。

    如果您对JavaScript有中等到高级的了解–特别是事件处理和回调–那么您就可以使用本示例驱动的指南中的工具来处理Web Worker了。

    • 开始创建网络工作者并了解他们能做什么和不能做什么
    • 确定支持该API的浏览器版本
    • 使用专用的Web Worker来执行消耗大量CPU的任务,如数据解析
    • 了解创建内联工作器的使用案例,例如将Web应用程序封装在一个页面中
    • 创建共享工作器以将多个Web应用程序实例与服务器进行通信,以及其他用途
    • 了解调试Web Worker的最佳实践
    • 在服务器端节点环境中应用Web Worker
  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

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

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

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册