Apress Pro HTML5 with Visual Studio 2012 (2012).pdf

(11589 KB) Pobierz
993006527.011.png 993006527.012.png 993006527.013.png 993006527.014.png
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
993006527.001.png 993006527.002.png 993006527.003.png 993006527.004.png 993006527.005.png 993006527.006.png 993006527.007.png 993006527.008.png
Contents at a Glance
About the Author ........................................................................................................ xvii
About the Technical Reviewer ..................................................................................... xix
Acknowledgments ....................................................................................................... xxi
Introduction ............................................................................................................... xxiii
Part 1: What is HTML5?
........................................................................... 1
Chapter 1: Before You Begin
........................................................................................ 3
Part 2: Using the New HTML5 Features
................................................. 17
Chapter 2: ASP.NET Web Forms
................................................................................. 19
Chapter 3: MVC Web Applications
............................................................................. 41
Chapter 4: Cascading Style Sheets
............................................................................ 75
Chapter 5: Scripting Enhancements
........................................................................ 107
Chapter 6: Mobile Web Applications
........................................................................ 125
Part 3: Developing with HTML5
........................................................... 145
Chapter 7: Supporting Older Browsers
.................................................................... 147
Chapter 8: Audio and Video
..................................................................................... 169
Chapter 9: Scalable Vector Graphics
....................................................................... 193
Chapter 10: Canvas
................................................................................................. 223
v
993006527.009.png
Contents at a GlanCe
Part 4: Digging Deeper
......................................................................... 253
Chapter 11: Indexed DB
........................................................................................... 255
Chapter 12: Geolocation and Mapping
.................................................................... 281
Chapter 13: WebSockets
.......................................................................................... 299
Chapter 14: Drag and Drop
...................................................................................... 343
Appendix A: Chapter 4 - Sample Content ................................................................... 371
Appendix B: Chapter 4 – Completed Style .................................................................. 377
Appendix C: Chapter 14 – Final Code.......................................................................... 383
Index........................................................................................................................... 391
vi
Introduction
HTML5 is such an exciting opportunity for software developers. For a long time, the web has been the favorite
platform for providing software applications to both external and internal users because of its reach and ease of
deployment and maintenance. he primary limitation has been the client-side support, which can severely limit
the user experience. With the lack of cross-browser standardization, using any of the advanced features often
meant broken pages on older browsers or diicult polyills.
HTML5 is a game-changer. Not only does it bring browser vendors together with a common set of
speciications, but the features included in HTML5 enable web applications to provide a user experience that
rivals even client applications. With mobile devices rapidly jumping on the HTML5 bandwagon, the number of
HTML5 devices is expected to exceed 1 billion in the next year. I have seen the rise of many technologies and
standards that promised to change the future of software development, but the momentum and support for
HTML5 seems unprecedented.
Having said that, we are not quite there yet. Many of the speciications are still in draft and browsers, even
current releases of them, do not all support the features that have been agreed upon. However, there are already
enough features that are generally supported by browser vendors to make the switch to HTML5 very attractive.
And the future is even more promising.
Who This Book Is For
HTML5 consists of changes in the markup, CSS improvements, and JavaScript enhancements and can be used
with any implementation platform. However, this book presents these new features with the professional Visual
Studio developer in mind. My goal is to answer the question “What would most ASP.NET developers need to
know to incorporate the beneits of HTML5?” he sample applications are written using Visual Studio 2012 and
many of the examples are speciic to the ASP.NET platform, including web forms and MVC 4.
How This Book Is Structured
I’ve split the book into four parts, each going a bit deeper into the more advanced features.
Part 1 provides a quick introduction into web application technologies. his explains the operating
environment that web developers ind themselves in and where the HTML5 umbrella its in.
Part 2 covers the basics of HTML5, including form development with both traditional web forms as well
as the MVC model. Chapter 4 provides a really good overview of CSS with a focus on the new features available
in CSS3. his part also demonstrates some of the scripting enhancements in Visual Studio 2012 and includes a
discussion of how to support mobile devices with HTML5.
Part 3 takes this further and demonstrates some of the really cool features, including the new audio and
video elements. I then demonstrate the graphics support available using both SVG and Canvas. his part also
includes a discussion of how to use polyills to deal with older browsers.
Part 4 explains some of the more advanced features such as Indexed DB, which provides for a persistent,
client-side data store. his section includes a demonstration of geolocation and mapping using Bing Maps. It also
explains how web sockets and drag-and-drop can be used for advanced applications.
xxiii
993006527.010.png
Zgłoś jeśli naruszono regulamin