HTML5 Programming for ASP.NET Developers

Book description

HTML5 Programming for ASP.NET Developers teaches you to harness the power and flexibility of HTML5 in your ASP.NET Web Forms and ASP.NET MVC applications. Focusing on the programmable features of HTML5 that will be most useful to you as an ASP.NET developer, this book will take you straight to the heart of what you can get out of this new technology.

HTML5 is an emerging web standard that has received a great deal of attention from browser companies and the developer community, encompassing HTML, JavaScript enhancements and CSS3 specifications. But HTML5 isn't just about markup. A major part of HTML5 is its programmable features and APIs, which make up the core of this book..

HTML5 Programming for ASP.NET Developers will show you how to:

  • Add interactivity and media to your sites using the Canvas and Audio and Video APIs.

  • Make your web applications work offline, understand client side storage options using Web Storage, and work with local files using the File API.

  • Use the Communication API and Web Sockets for easier communication between server and client.

  • Other topics include multithreading with Web Workers, understanding the new input types, using Geolocation, and enhancing your web forms and views with CSS3. All major browsers already support HTML5 to varying degrees and are aggressively working to provide full-fledged standardized support. Start using HTML5 in your projects today, and build future-ready web applications that take advantage of the exciting features that HTML5 has to offer.

    What you'll learn

  • Use Canvas, Audio-Video, Web Storage, History API, File API, Web Workers, Web Sockets, Geolocation and more in ASP.NET

  • Illustrates HTML5 feature utilization in both Web Forms and MVC applications

  • Use JavaScript and jQuery to communicate between HTML5 and ASP.NET server side code

  • Learn to use HTML5 in Visual Studio

  • Learn to style web forms and views with CSS3

  • Develop cross-browser, future-ready web applications

  • Who this book is for

    Whether you've worked on a few small projects, or been working with ASP.NET and ASP.NET MVC for some time, this book will get you up-and-running with HTML5 so you can make it a part of your daily toolkit. If you are comfortable with creating Web Forms and MVC projects, and you care about staying at the cutting edge of the latest web standards and technologies, this book is for you.

    Table of contents

    1. Titlepage
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Introduction
    9. Chapter 1: Overview of HTML5 and ASP.NET 4.5
      1. History of HTML5
      2. HTML5 Page Structure
      3. A Quick Look at HTML5-specific Tags
      4. HTML5 Features of Interest
      5. HTML5 and Browser Support
      6. HTML5 and ASP.NET
      7. Features of the Visual Studio HTML Editor
      8. Sample Web Applications
      9. Summary
    10. Chapter 2: Overview of jQuery
      1. What Is jQuery?
      2. Downloading and Referring to jQuery
      3. Event Handling
      4. jQuery Selectors
      5. Modifying the DOM Using jQuery
      6. jQuery Ajax Techniques
      7. Summary
    11. Chapter 3: Working with Audio and Video
      1. Embedding Media Files Using the <object> Tag
      2. HTML5 Audio and Video Tags
      3. Supported Audio and Video Formats
      4. Implementing a Fallback Mechanism
      5. Programming with the Audio and Video APIs
      6. Creating a Custom Video Player Using the Video API
      7. Summary
    12. Chapter 4: Drawing with the Canvas
      1. The <canvas> Element
      2. Drawing on the Canvas
      3. Drawing Lines
      4. Drawing Curves
      5. Drawing Paths
      6. Drawing Text
      7. Drawing Images
      8. Adding Special Effects
      9. Saving the Canvas State
      10. Saving the Canvas Drawing
      11. Creating Pie Charts Using Canvas Drawing Techniques
      12. Summary
    13. Chapter 5: Working with Forms and Controls
      1. Understanding HTML Forms in ASP.NET
      2. HTML5 Controls
      3. Using HTML5-Specific Input Types
      4. Other Validation Attributes
      5. Performing Custom Validations
      6. HTML5 Input Types and ASP.NET Validation Techniques
      7. Customizing Validation Messages
      8. Other Improvements to the <input> Element
      9. Designing an Employee Data Form
      10. Designing a User Registration Form
      11. Summary
    14. Chapter 6: Using History API and Custom Data Attributes
      1. The History Object
      2. Understanding the History-Tracking Problem
      3. The Solution
      4. Understanding the History API
      5. Browser Support
      6. Custom Data Attributes
      7. Summary
    15. Chapter 7: Storing Data in Web Storage
      1. Overview of Web Storage
      2. Session Storage and Local Storage Objects
      3. Using the sessionStorage and localStorage Objects
      4. Storing Numbers, Dates, and Objects
      5. Session Storage and Local Storage Events
      6. Clearing Web Storage Manually
      7. Passing Data from Web Storage to the Server
      8. An Example of Using Local Storage in a Survey Form
      9. Security Considerations for Web Storage
      10. Summary
    16. Chapter 8: Developing Offline Web Applications
      1. When to Use Offline Applications
      2. HTTP Caching and Offline Applications
      3. Building an Offline Application
      4. Creating a Cache Manifest
      5. Referring to the Cache Manifest in Web Forms and Views
      6. Configuring IIS to Recognize the Cache Manifest File
      7. Testing an Offline Application
      8. Going Online Using AJAX
      9. Updating an Offline Application
      10. Offline Application Events
      11. ASP.NET MVC Example: the Survey Application Revisited
      12. Summary
    17. Chapter 9: Dealing with Local Files Using the File API
      1. Understanding the File API
      2. Selecting Files to Be Used With the File API
      3. Working with Drag-and-Drop
      4. Implementing Drag-and-Drop: A Shopping Cart
      5. Dragging and Dropping Files
      6. Reading Files and Displaying File Information
      7. Uploading Files to the Server
      8. Using the File API in ASP.NET MVC
      9. Summary
    18. Chapter 10: Multithreading in Web Pages Using Web Workers
      1. Overview of Multithreading in Web Pages
      2. Types of Web Workers
      3. What Web Workers Can Access and What They Can’t
      4. Using Web Workers
      5. Importing External Script Files
      6. Handling Errors
      7. Terminating Web Workers
      8. Monitoring Web Workers During Development
      9. Using Shared Web Workers
      10. Communicating With the Server
      11. Using Web Workers That Require Server-side Data
      12. Summary
    19. Chapter 11: Using the Communication API and Web Sockets
      1. Understanding Cross-Domain Communication
      2. Using the postMessage API
      3. Making Requests Using XMLHttpRequest
      4. Notifying the Browser Using Server-Sent Events
      5. Two-Way Communication Using Web Sockets
      6. Summary
    20. Chapter 12: Finding Location with the Geolocation API
      1. Overview of the Latitude and Longitude Coordinate System
      2. Sources of Location Information
      3. The Geolocation API
      4. Using the Geolocation API to obtain User’s Location
      5. Using the Geolocation API with Mapping Applications
      6. Using the Geolocation API to Present Location-Specific Data
      7. Tracking Movement Using the Geolocation API
      8. Summary
    21. Chapter 13: Styling Web Forms and Views with CSS3
      1. CSS3 Selectors
      2. Browser-Specific Property Prefixes
      3. Using Web Fonts
      4. Rounded Corners, Shadows, Gradients, and Transparency
      5. Adding Effects Using Transitions and Transforms
      6. Using Media Queries to Target Different Devices
      7. Using Modernizr to Apply CSS3-Specific Features
      8. Summary
    22. Appendix A: HTML5 Learning Resources
      1. W3C and WHATWG Specifications
      2. Documentation from Browser Companies
      3. Other Web Sites of Interest
    23. Index

    Product information

    • Title: HTML5 Programming for ASP.NET Developers
    • Author(s):
    • Release date: November 2012
    • Publisher(s): Apress
    • ISBN: 9781430247197