深入编程:HTML5应用程序开发

5星 · 超过95%的资源 需积分: 10 10 下载量 171 浏览量 更新于2024-07-30 1 收藏 1.38MB PDF 举报
"Programming HTML5 Applications"是一本由Zachary Kessin编写的关于HTML5应用程序开发的电子书。这本书深入探讨了如何利用HTML5构建强大的Web应用,并涵盖了JavaScript的核心概念、测试策略以及本地存储等关键主题。 在第一章"The Web as Application Platform"中,作者介绍了Web作为应用程序平台的发展,强调了HTML5在提升Web应用功能方面的重要性。他指出,随着Web技术的进步,开发者能够创建出具有更多交互性和复杂性的应用程序,从而超越传统的静态网页。 第二章"The Power of JavaScript"深入讲解了JavaScript语言的关键特性。Kessin讨论了JavaScript的胜利,解释了非阻塞I/O和回调函数如何改进了Web应用的性能。他还介绍了λ(lambda)函数的强大之处,以及闭包的概念,这是JavaScript中实现模块化和数据隐藏的关键工具。此外,他还探讨了函数式编程的概念,以及如何通过原型扩展对象。Kessin还讨论了函数的原型扩展、柯里化(currying)以及对象参数,以及数组迭代操作,这些都极大地增强了JavaScript的灵活性和功能性。 第三章"Testing JavaScript applications"关注的是JavaScript应用的测试实践。书中提到了QUnit作为JavaScript测试框架的一个例子,提供了简单的示例来说明如何使用QUnit进行测试。同时,Kessin还介绍了模拟(mocking)和桩(stubs)的概念,以及Selenium——一个用于Web应用自动化测试的工具。他详细解释了Selenium的命令结构,如何使用Selenium IDE构造测试,以及如何自动运行测试。此外,他还提到了Selenium RC和测试农场,这使得在不同环境和浏览器上进行大规模测试成为可能。 第四章"LocalStorage"探讨了HTML5中的本地存储特性,包括localStorage和sessionStorage对象。这些对象允许Web应用在用户浏览器中存储数据,从而实现离线功能和数据持久化。Kessin展示了如何使用这些对象来保存和检索用户数据,这对于构建更健壮和用户友好的Web应用至关重要。 "Programming HTML5 Applications"是一本全面介绍HTML5应用程序开发的指南,它不仅覆盖了HTML5的新特性,还深入剖析了JavaScript的核心概念,以及测试和数据存储的最佳实践。对于想要提升Web开发技能的开发者来说,这本书是宝贵的参考资料。
2010-09-21 上传
Pro HTML5 Programming: Powerful APIs for Richer Internet Application Development Copyright © 2010 by Peter Lubbers, Brian Albers, Frank Salim All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-2790-8 ISBN-13 (electronic): 978-1-4302-2791-5 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. President and Publisher: Paul Manning Lead Editor: Clay Andres Development Editor: Matthew Moodie Technical Reviewer: Paul Haine Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Coordinating Editor: Laurin Becker Copy Editors: Heather Lang, Andy Rosenthal, Nancy Sixsmith Compositor: Kimberly Burton Indexer: Julie Grady Artist: April Milne Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. For information on translations, please e-mail rights@apress.com, or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at www.prohtml5.com and also at www.apress.com.