Buy HTML5 Unleashed Book by Simon Sarris - Bookswagon
close menu
Bookswagon
search
My Account
Home > Computer programming / software engineering > Web programming > HTML5 Unleashed
HTML5 Unleashed

HTML5 Unleashed


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

HTML5 Unleashed is the authoritative guide that covers the key web components driving the future of the Web. Students will learn to harness the power of HTML5 to create web apps and solutions that deliver state-of-the-art media content and interactivity with new Audio, Video, and Canvas elements. Comprehensive and up-to-date, HTML5 Unleashed is organized as an accessible guide of tutorials and practical references. Because HTML5 covers a far-reaching set of standards, each chapter in HTML5 Unleashed is written to stand on its own. Whether you choose to skip around or teach it cover to cover, full-color syntax and figures in HTML5 Unleashed ensure that students do not need to be next to a computer to learn the most important concepts of the modern Web.



Table of Contents:

Introduction 1

Who Should Read This Book? 2

HTML5 and Related Technologies 2

Software Requirements 3

Code Examples 3

How This Book Is Organized 3

Part I: Background 4

Part II: New HTML Elements 4

Part III: Canvas 4

Part IV: HTML5’s JavaScript APIs 4

Links and Real-World Examples 5

Chapter 1: Why HTML5? 7

How Did We End Up Here? 7

The Web Takes Off 9

The Rise of the Browser Plug-In 9

Web 2.0 10

HTML5 11

What Exactly Is HTML5? 11

The Importance of HTML5 12

Are Plug-ins Dead? 14

Summary 14

Chapter 2: Important Concepts for HTML5 15

The Goals of HTML5 15

Improving the Native Web 15

More Done with Less Code 16

The Semantic Web 16

Requisites for HTML5 Development 16

Modern Browser Developer Tools 16

HTML5 Fallbacks: Shims, Shivs, and Polyfills 17

Feature Support and Detection 18

Summary 19

Chapter 3: Getting Started with HTML5: Semantic Tags, Forms, and Drag and Drop 21

Ensuring Backward Compatibility with the New HTML Tags 21

The HTML5 Shim 22

HTML5 Boilerplate 23

Starting from the Top 23

The Doctype 23

Meta Character Encoding 24

HTML5 Syntax and Validation 24

How You Should Write Your HTML 27

Housekeeping 29

HTML5 Semantic Elements and Other Presentational Tags 31

HTML5 Semantic Tags 31

Document Outlines in HTML5 33

Minor Semantic and Presentational HTML5 Tags 35

Visual HTML5 Tags: and 37

HTML5 Forms 40

Form Input Types 40

New Form Input Attributes and Elements 47

Drag and Drop in HTML5 53

The Basics 53

Drag Data and Effects 55

Drag Events 58

Summary 67

Chapter 4: Rich Media Tags: Video and Audio 69

The Video Element 71

Video Formats and Support 71

Using the Video Element 75

The Audio Element 77

Audio Formats and Support 77

Using the Audio Element 79

Encoding Your Media 80

Conversion Tools 81

Supporting Older Browsers 81

Video and Audio Attributes 82

Video-Only Attributes 82

Attributes Shared Between Audio and Video 85

JavaScript API 90

The readyState and Starting at a Specified Time 92

The playbackRate and Time Control 93

Loading Videos Sequentially 94

Custom Controls 95

Advantages and Disadvantages of the HTML5 Media Tags Versus Flash 95

Ease of Use and Extensibility 95

Platform Support 96

Feature Support 96

Media Protection 97

Future Developments 97

WebRTC 97

WebVTT and the Tag 98

The Full-Screen API 100

The Web Audio API 100

The Embed Element 101

Summary 101

Chapter 5: 2D Canvas 103

Browser Support 104

Internet Explorer 105

Testing for Support 105

What Canvas Can and Cannot Do 106

A Comparison with SVG 107

Where Canvas Shines 109

When to Not Use Canvas 109

Don’t Use Canvas for General UI 111

Getting Started with Canvas 111

An HTML Page with a Canvas 113

Canvas Attributes 115

toDataURL 116

Context Methods and State 117

A Quick Look at the Properties and State Available 117

Understanding Drawing, Starting with Rectangles 118

fillStyle and strokeStyle 119

Paths 120

Understanding the Canvas Coordinate System 122

Line Styles 125

Curves 127

Ellipses 133

isPointInPath 135

Path Filling--The Winding Number Rule 135

Summary of Context State So Far 138

Saving and Restoring 140

Transformation Matrix 141

translate 141

scale 143

Saving and Restoring Affect How Drawing Functions Act on a Transformed Canvas 143

rotate 146

transform and setTransform 150

Keeping Track of Transformations 152

In-Memory Canvases 154

Using Images and Other Canvases 160

Double Buffering 161

Image Data and Pixel Manipulation 162

getImageData 162

createImageData 164

putImageData 164

Image Security on the Canvas 171

CORS 172

But I Want to Test My Image Data Code Locally! 172

Gradients and Patterns 173

Linear Gradients 173

Radial Gradients 175

Gradient Performance and Reuse 177

Patterns 179

Shadows 182

Compositing 184

Compositing Examples 186

Clipping 189

Clearing Nonrectangular Areas 190

Using Text 192

First the Bad Parts 192

Drawing Text 194

Fonts 195

textBaseline 197

textAlign 197

Measuring Text 198

Performance 199

Canvas Context Recap 200

Styling 200

Shadows 200

State 200

Rectangles 200

Paths 201

Image Drawing 202

Transformation 202

Compositing 202

Text 202

Image Data 203

Summary 203

Chapter 6: Making Canvas Interactive and Stateful 205

Canvas Coordinates--Mouse and Touch 205

getBoundingClientRect 206

Computing Element Offset 207

Canvas Animation 210

Letting the Browser Take Control with requestAnimationFrame 210

Animation and Timing 212

Canvas Interactivity Example: Making and Moving Shapes 215

Getting Started 216

The Shapes We Draw 217

Keeping Track of Canvas State. 218

Mouse and Touch Events 219

Getting Input Coordinates 222

Drawing 223

Complete Canvas Interactivity Example 225

Summary 231

Chapter 7: Canvas Performance, Tips, and Peculiarities 233

Canvas Peculiarities and Tips 234

CSS Width and Height 234

Paths or Images Look Blurry 234

The Methods save and restore 236

Clipping Regions Can Only Get Smaller and Cannot Be Reset 237

Security Exceptions, Cross-domain Images, and Image Data 238

Transformations Affect Drawing in Addition to Paths 238

A Performance Primer 239

Tools of the Trade 240

Before We Get to Canvas 245

The DOM and Canvas 248

Caching Context Properties 248

Stop Using save and restore 250

Caching with Images and In-Memory Canvases 251

Images 252

Text 252

Shadows 253

Gradients 254

Paths 255

Multiple Canvases 256

Keeping Track of Objects 257

Hit Testing 257

Size Matters 260

Summary 261

Chapter 8: The Future of Canvas and 3D Canvas 263

The Future of 2D Canvas 263

New in the Specification 264

Hints from the Browsers 270

3D (WebGL) Canvas 271

WebGL Libraries 272

Summary 275

Chapter 9: Geolocation API 277

Understanding Latitude and Longitude 278

Types of Geolocation Data 280

The Old Ways 280

The HTML5 Way--New Methods for Geolocation 281

HTML5 Geolocation API 282

Geolocation Support 283

Using Geolocation 283

The API 283

Geolocation in Action 288

Where Am I? 288

A Trailblazing App 293

Summary 299

Chapter 10: HTML5 Storage Options 301

Older Storage Methods 301

Browser Cookies 301

Flash Cookies 302

userData 302

Along the Way 302

Web Storage--sessionStorage and localStorage 303

sessionStorage 303

localStorage 304

API 304

WebSQL Database 307

IndexedDB 308

Getting Started with IndexedDB 308

Looking Further 322

FileSystem API for Local Read/Write Access 323

FileSystem API Example 324

Offline Pages and the Application Cache 326

Using the Application Cache 327

Important Notes About the Application Cache 330

Summary 331

Chapter 11: Messaging and Web Workers 333

The Web Messaging API and Cross-Document Messaging 333

Sending and Receiving Messages 334

Channel Messaging 336

Security with Web Messages 338

Web Workers 339

Getting Started with Web Workers 340

A Simple Example 342

Shared Web Workers 345

Web Worker Considerations 349

Summary 351

Chapter 12: Network Communication: WebSockets and XMLHttpRequest Level 2 353

Real-Time Communication with WebSockets 354

Before WebSockets 354

Getting Started with WebSockets 355

A Complete WebSockets Example 358

Server-Side WebSockets 359

New AJAX Capabilities with XMLHttpRequest Level 2 359

New Features in XHR2 360

Summary 364

Chapter 13: Microdata, Other Small Things, and Beyond HTML5 365

Microdata 365

Getting Started with Microdata 367

A Microdata Recipe Example 371

New Browser Features Not Covered in This Text 373

Honorable Mention: The File API 373

Other New Browser Features 375

The Future 378

The Future of Web Development 379

Summary 380

Index 381



About the Author :

Simon Sarris is a web developer focusing primarily on the HTML5 Canvas. Simon has earned a reputation as a go-to source for HTML5 answers. He contributes to the question-and-answer website StackOverflow and has provided the most answers for both the Canvas and HTML5 tags. Simon blogs about Canvas and JavaScript topics, and you can find him online at www.simonsarris.com.


Best Sellers


Product Details
  • ISBN-13: 9780672336270
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Sams Publishing
  • Height: 232 mm
  • No of Pages: 432
  • Weight: 702 gr
  • ISBN-10: 0672336278
  • Publisher Date: 25 Jul 2013
  • Binding: Paperback
  • Language: English
  • Spine Width: 17 mm
  • Width: 181 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
HTML5 Unleashed
Pearson Education (US) -
HTML5 Unleashed
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

HTML5 Unleashed

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    Fresh on the Shelf


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!
    Your IP: 216.73.216.226 IN