HTML5 in Action cover

HTML5 in Action

No rating yet
Chapters
27
ISBN
9787115378835

Tags

Summary

HTML5 in Action is the Chinese translation of Manning Publications' HTML5 in Action, translated by Zhang Huaiyong and published by Posts & Telecom Press in March 2015. The book assumes the reader is already familiar with standard HTML, focuses on the new features of HTML5, and uses complete projects as its thread to turn specification clauses into runnable examples and code. The book is divided into three parts plus ten appendices. Part One, From Document to Application, gives a quick tour of the basic structure of HTML5 documents, new semantic elements, ARIA accessibility roles, new form features, and microdata, CSS3, JavaScript, and the DOM, and outlines specifications including Canvas, audio and video, drag-and-drop, cross-document messaging, server-sent events, WebSockets, document editing, Web Storage, offline applications, geolocation, IndexedDB, the File API, SVG, and WebGL. Part Two builds browser-based applications: forms with input controls, data binding, and constraint validation; a "super HTML5 editor" for rich-text editing and local file management; a real-time communication application built with SSE and WebSockets; and an offline-capable mobile task application using Web Storage, IndexedDB, and an application cache manifest. Part Three moves into interactive graphics, media, and games: building a game engine with 2D Canvas and handling collision and input; building a responsive in-browser game with SVG; controlling media with video and HTMLMediaElement and building an annotation tool; and finally building a 3D engine with WebGL to complete a small game. The appendices cover the specification landscape, an API quick reference, installing PHP and MySQL, an introduction to computer networking, the Node.js environment, channel messaging, common tools and libraries, and encoding with FFmpeg.

Editor's review

市面上的HTML5书大致分两类:一类把新标签和新API列成词典,读完仍然不会做东西;另一类跟着项目走,把规范当成解决问题的工具。《HTML5实战》属于后者,而且是做得相当扎实的一本。 它从“文档”讲到“应用”:先用一章把语法、语义元素、`aria`、新表单以及与HTML5常被混为一谈的CSS3、Geolocation、WebGL等规范逐条摆清,避免读者把“HTML5”当成一个无所不包的大口袋;随后每一章都以一个能跑起来的小应用为主线——表单与约束验证、富文本编辑器与本地文件系统、SSE与WebSockets实时聊天、离线任务清单、Canvas游戏、SVG游戏、带标注功能的视频播放器,最后用WebGL做一个3D小游戏。项目难度是递进的,读完一本,手里会多出一批可以改造成自己项目的骨架代码。 三位作者背景各异,分别负责不同章节,因此章节风格略有差别,但“先讲清问题,再写代码,最后解释为什么这样写”的节奏保持一致。译文整体通顺,代码与术语保留英文原样,方便对照MDN查阅。 需要提醒的是,原书英文版出版于2014年,中文版2015年面世,书中部分写法(如AppCache离线清单、部分WebGL样板代码)在今天已被Service Worker、现代图形库取代。把它当作理解HTML5能力边界的“地图”和项目练手材料仍然很有价值,但具体API细节请以最新规范文档为准。

Who it's for

A good fit for

  • 有HTML与JavaScript基础、想系统补齐HTML5新特性的前端开发者
  • 需要独立完成小型Web应用、希望跟着完整项目练手的初中级工程师
  • 做移动端H5页面、想弄清离线存储与本地数据方案的技术人员
  • 对Canvas、SVG、WebGL游戏开发感兴趣、想入门图形编程的读者

Not a good fit for

  • 完全没有HTML和JavaScript基础的零起点读者,书中假定你熟悉标准HTML
  • 只想查最新API用法的人,本书部分内容已落后于当前浏览器实现
  • 寻找框架(React、Vue)或工程化、构建工具内容的读者,本书不涉及这些

Reading tips

  1. 先读第1章建立规范全景,分清哪些属于HTML5、哪些是常被捆绑宣传的相邻技术。
  2. 按章跟做项目:边读边在本地跑通代码,改参数、加功能,比只读代码收获大得多。
  3. 遇到AppCache、旧版WebGL样板等过时写法,对照MDN与现行规范确认替代方案(如Service Worker)。
  4. 把附录B的API速查与附录D的网络与WebSocket协议说明当作工具页,需要时回查。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Part 1 Introduction
  2. Chapter 1 HTML5: From Documents to Applications
  3. 1.1 Exploring the markup language: an HTML5 quick tour
  4. 1.2 Web specifications beyond markup: microdata, CSS3, JavaScript, and the DOM
  5. 1.3 HTML5 DOM APIs
  6. 1.4 Other APIs and specifications
  7. 1.5 Summary
  8. Part 2 Browser-Based Applications
  9. Chapter 2 Creating Forms: Input Widgets, Data Binding, and Data Validation
  10. Chapter 3 File Editing and Management: Rich Text Format, File Storage, Drag and Drop
  11. Chapter 4 Messaging: Exchanging Messages with Scripts in HTML5 (SSE, WebSockets)
  12. Chapter 5 Mobile Applications: Client-Side Storage and Offline Execution
  13. Part 3 Interactive Graphics, Media, and Games
  14. Chapter 6 2D Canvas: Low-Level 2D Image Rendering
  15. Chapter 7 SVG: Responsive In-Browser Images
  16. Chapter 8 Video and Audio: Playing Media in the Browser
  17. Chapter 9 WebGL: 3D Application Development
  18. Appendix A HTML5 and Related Specifications
  19. Appendix B HTML5 API Reference
  20. Appendix C Installing PHP and MySQL
  21. Appendix D Introduction to Computer Networking
  22. Appendix E Setting Up a Node.js Environment
  23. Appendix F Channel Messaging
  24. Appendix G Tools and Libraries
  25. Appendix H Encoding with FFmpeg
  26. Appendix I The Next Step for HTML
  27. Appendix J Links and References

FAQ

这本书和陶国荣编著的《HTML5实战》是同一本吗?
不是。同名书有两个常见版本:陶国荣编著、机械工业出版社2011年出版的版本,以及本书——罗伯·克洛泽等四人合著、张怀勇翻译、人民邮电出版社2015年出版的版本。本书译自Manning出版社的《HTML5 in Action》。
读这本书需要什么基础?
原书明确假定读者熟悉标准HTML,因此需要掌握HTML基本标签、CSS基础以及JavaScript与DOM操作。书中重点讲HTML5新增的语义元素、表单特性与各类API,不重复讲授HTML入门知识。
书中的示例代码在哪里下载?
原书提供官方代码仓库,Manning网站该书页面(manning.com/books/html5-in-action)与GitHub上均有示例代码。中文版沿用了这一渠道,可对照章节号查找对应项目。
2015年的书,现在学还有用吗?
核心内容仍然有效:语义元素、表单与约束验证、Canvas、SVG、Web Storage、WebSockets、IndexedDB、地理定位等至今是前端常用能力。但离线应用缓存(AppCache)已被废弃,部分WebGL写法也已更新,建议结合MDN的最新文档学习。
附录里的PHP、MySQL、Node.js内容必须学吗?
不必。这些附录是为书中WebSockets、文件上传等服务端示例准备的环境说明,属于参考材料。若你已有可用的后端或本地开发环境,可以跳过,只按需查阅Node.js与网络协议部分。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category