This book was written for professional .NET developers primarily focused on C# and ASP.NET. While its useful for other professionals, the focus has been on developing server-side code in C# and ASP.NET MVC, with as little overhead as possible.
Our target reader is a professional who has been placed in the role of developer on a project that is already on an HTML5 and ASP.NET MVC platform or is being transitioned to this platform. Emphasis is placed on as many stable parts of the HTML5 specification as possible, so that while the developer learns effective use of JavaScript, he or she is also able to learn to use these very powerful APIs.
Please note that while the JavaScript and HTML5 techniques you learn in these pages are useful for Windows 8 development, this book does not claim to be a Windows 8 development reference.
This book is divided into two parts. The first part, consisting of chapters 1 and 2, will give you a general understanding of what HTML5 is and how it can interact with server components using JavaScript and ASP.NET MVC. Chapter 2 focuses on markup and how semantics play a role in HTML5 web application development.
The second part of the book (chapters 3 to 10) covers the various HTML5 JavaScript APIs that are stable and generally supported across browser platforms. Each implementation is tested against browser versions that were available at the time of writing and against previous versions as much as possible. The APIs covered in each chapter are as follows:
There are three appendixes; they give an overview of JavaScript, explain how to use ASP.NET MVC, and guide you on how to install IIS Express.
Each chapter in the second part of the book (chapters 3 to 10) is organized into three parts. The first is a brief introduction, designed to get you thinking about real-world applications for that chapters focus. This part may also include background information to help you understand the topic more clearly, as is the case with geolocation. The introduction also includes a browser support table that shows which browser versions are compatible with each HTML5 API.
The second part of the chapter is the actual build. As we build the project, well show the code and describe where it should be placed in the application source. As each part of an API is used, its introduced and defined. A Core API icon placed in the margin shows the section where each API is discussed.
The third and final part of each chapter is the source code listing. Each JavaScript library, HTML page, stylesheet, or C# class file that is used will be fully listed, unless that code was previously listed in an earlier part of the chapter. For example, if the complete markup for an HTML page is listed early in the chapter, it wont be listed later. However, if a JavaScript file is created bit-by-bit as the project progresses, the entire listing will be included in this section.
Working versions of each sample application can be found at www.ellipsetours.com/demos/index.html. The code can also be downloaded from the publishers website at www.manning.com/HTML5for.NETDevelopers.
The JavaScript portions of this book are completely compatible with any modern desktop or mobile browser. The builds for each chapter require Visual Studio 2010 Service Pack 1 or later. All applications have been tested using Visual Studio 2012 Release Candidate.
Local administrator privileges are required to install Git Bash and node.js, as well as to run these applications.
Each chapter starts off with a browser support table that shows which browser versions are compatible with each HTML5 API.
All source code in listings or in text is in a fixed-width font like this to separate it from ordinary text. Code annotations accompany many of the listings, highlighting important concepts.
Source code for all working examples in this book is available for download at the publishers website at www.manning.com/HTML5for.NETDevelopers. Working versions of each sample application can be found at www.ellipsetours.com/demos/index.html.
The purchase of HTML5 for .NET Developers includes free access to a private web forum run by Manning Publications, where you can make comments about the book, ask technical questions, and receive help from the author and from other users. To access the forum and subscribe to it, point your web browser to www.manning.com/HTML5for.NETDevelopers. This page provides information about how to get on the forum once youre registered, what kind of help is available, and the rules of conduct on the forum.
Mannings commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the authors can take place. Its not a commitment to any specific amount of participation on the part of the authors whose contribution to the books forum remains voluntary (and unpaid). We suggest you try asking the authors some challenging questions, lest their interest stray!
The Author Online forum and the archives of previous discussions will be accessible from the publishers website as long as the book is in print.