O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pro Windows 8 Development with HTML5 and JavaScript

Book Description

Apps are at the heart of Windows 8, bringing rich and engaging experiences to both tablet and desktop users. Windows 8 uses the Windows Runtime (WinRT), a complete reimagining of Windows development that supports multiple programming languages and is built on HTML5, CSS and JavaScript. These applications are the future of Windows development and JavaScript is perfect language to take advantage of this exciting and flexible environment.

Seasoned author Adam Freeman explains how to get the most from WinRT and Windows 8 by focusing on the features you need for your project. He starts with the nuts-and-bolts and shows you everything through to advanced features, going in-depth to give you the knowledge you need.

Each topic is covered clearly and concisely and is packed with the details you need to learn to be truly effective. The most important features are given a no-nonsense in-depth treatment and chapters contain examples that demonstrate both the power and the subtlety of Windows 8, Windows Runtime and Javascript.

What you'll learn

  • Understand what Windows 8 apps and WinRT are capable of and why they are special

  • Use advanced features to create immersive and engaging Windows 8 applications

  • Creating applications that work seamlessly on tablets and desktops

  • Use cutting-edge features like WebSockets and Cloud Computing

  • Prepare and deploy your applications

  • Unit test, debug and performance-tune applications

  • Who this book is for

    This book is suitable for anyone wanting to get to grips with Windows 8 development using the cross-platform standards of HTML5 and JavaScript. Basic coding knowledge is assumed but no Microsoft-specific assumptions are made.

    Table of Contents

    1. Titlepage
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewers
    7. Acknowledgments
    8. Part 1: Getting Started
      1. Chapter 1: Putting Windows 8 in Context
        1. Putting App Development in Context
        2. What Is in This Book?
        3. Who Is This Book For?
        4. What Do I Need to Know Before I Read This Book?
        5. What Don’t I Need to Know?
        6. What Tools and Technologies Do I Need?
        7. What Is the Structure of This Book?
        8. Are There Lots of Examples in This Book?
        9. Image Attribution
      2. Chapter 2: Getting Started
        1. Getting Set Up
        2. Getting Started
        3. Exploring the Project
        4. The Visual Studio Tools
        5. Summary
      3. Chapter 3: Your First Windows 8 App
        1. Understanding the App Structure
        2. Revisiting the Example App Project
        3. Creating the Navigation Infrastructure
        4. Adding the Musical Note Font
        5. Defining the App-Wide CSS
        6. Adding the Selector Page
        7. Summary
      4. Chapter 4: Completing the App
        1. Revisiting the Example App
        2. Defining the Notes Data
        3. Adding the Flash Card Page
        4. Using WinJS Data Binding
        5. Configuring Buttons and Navigation
        6. Setting the State
        7. Showing the Flash Cards
        8. Handling the Answer and Navigation Button Events
        9. Updating the App Manifest
        10. Testing the Completed App
        11. Summary
    9. Part 2: Core Development
      1. Chapter 5: The Single-Page Model
        1. Creating the Single-Page Project
        2. Importing Content Declaratively
        3. Importing Content Programmatically
        4. Using the WinJS Pages Feature
        5. Using the Navigation API
        6. Summary
      2. Chapter 6: Creating an Adaptive Layout
        1. Creating the Example Project
        2. Understanding the Metro Views
        3. Adapting to Views Using CSS
        4. Adapting to Views Using JavaScript
        5. Adapting to View Changes in Imported Content
        6. Breaking Out of the Snapped View
        7. Adapting to Device Orientation
        8. Adapting to Pixel Density
        9. Summary
      3. Chapter 7: Commands & Navigation
        1. Creating the Example Project
        2. Creating Application Commands
        3. Creating Navigation Commands
        4. Summary
      4. Chapter 8: View Models & Data Binding
        1. Revisiting the Example App
        2. Decoupling App Components
        3. Separating Data from the Layout
        4. Using Data Binding
        5. Using Declarative Bindings
        6. Creating Observable Arrays
        7. Using Templates
        8. Using Value Converters
        9. Summary
      5. Chapter 9: Using Promises
        1. Creating the Example Project
        2. Dealing with the Basic Asynchronous Programming Flow
        3. Coordinating Promises
        4. Creating Custom Promises
        5. Creating Synthetic Promises
        6. Summary
    10. Part 3: UI Development
      1. Chapter 10: Creating the UI Controls Example Framework
        1. Understanding the Final App
        2. Creating the Basic Project Structure
        3. Creating the Test Content Page
        4. Creating the Template System
        5. Generating a Select Element
        6. Using a Proxy Object
        7. Generating the Other Element Types
        8. Cleaning Up
        9. Summary
      2. Chapter 11: Using the ToggleSwitch, Rating and Tooltip Controls
        1. Using the ToggleSwitch Control
        2. Using the Rating Control
        3. Using the Tooltip Control
        4. Summary
      3. Chapter 12: Using the Time/Date Pickers & Flyouts
        1. Using the TimePicker Control
        2. Using the DatePicker Control
        3. Revisiting the Flyout Control
        4. Summary
      4. Chapter 13: Using Menus & Dialogs
        1. Using the Menu Control
        2. Using the MessageDialog Control
        3. Summary
      5. Chapter 14: Using the FlipView Control
        1. Using the FlipView Control
        2. Creating the FlipView Control Example
        3. Creating and Using a Data Source
        4. Fixing the First Image Problem
        5. Configuring the FlipView Control
        6. Managing the FlipView Programmatically
        7. Responding to the FlipView Events
        8. Styling the FlipView Control
        9. Using Custom Animations
        10. Summary
      6. Chapter 15: Using the ListView Control
        1. When to use the ListView Control
        2. Adding the ListView Example
        3. Working with the ListView Control
        4. Handling the ListView Events
        5. Styling the ListView Control
        6. Managing the ListView Control Programmatically
        7. Working with the Data Source
        8. Summary
      7. Chapter 16: Using Semantic Zoom
        1. When to use the SemanticZoom Control
        2. Adding the SemanticZoom Example
        3. Understanding the SemanticZoom Control
        4. Configuring the SemanticZoom Control
        5. Handling the SemanticZoom Control Event
        6. Styling the SemanticZoom Control
        7. An Alternative to the SemanticZoom Control
        8. Summary
      8. Chapter 17: Using Pointers & Gestures
        1. Creating the Example Project
        2. Determining the Input Capabilities of the Device
        3. Handling Pointer Events
        4. Handling Gestures
        5. Handling Manipulations
        6. Using Content Zoom
        7. Summary
      9. Chapter 18: Using Animations & Utilities
        1. Working with Animations
        2. Using the WinJS Utilities
        3. Summary
    11. Part 4: Platform integration
      1. Chapter 19: Understanding the App Lifecycle
        1. Understanding the App Lifecycle
        2. Working with WinJS.Application
        3. Triggering Lifecycle Changes
        4. Getting the Activation Type and Previous App State
        5. Capturing the Resuming Event
        6. Responding to Lifecycle Changes
        7. Summary
      2. Chapter 20: Working with Settings & App Data
        1. Preparing the Example App
        2. Presenting Settings to the User
        3. Making Settings Persistent
        4. Using App Data Files
        5. Loading Files from the App Package
        6. Summary
      3. Chapter 21: The Search Contract
        1. Creating the Example App
        2. Implementing the Search Contract
        3. Working with the Search Pane
        4. Summary
      4. Chapter 22: Working with Files
        1. Creating the Example App
        2. Performing Basic File Operations
        3. Sorting and Filtering Files
        4. Working with Virtual Folders
        5. Monitoring a Folder for New Files
        6. Summary
      5. Chapter 23: Integrating File Services
        1. Creating the Example Application
        2. Displaying an Image File
        3. Using the File and Folder Pickers
        4. Caching Location Access
        5. Using File Data Sources
        6. Summary
      6. Chapter 24: The File Activation & Picker Contracts
        1. Creating the Example App
        2. Creating the Helper App
        3. Implementing the File Activation Contract
        4. Implementing the App-to-App Picking Contracts
        5. Summary
      7. Chapter 25: The Sharing Contract
        1. Creating the Example App
        2. Create a Share Source
        3. Creating the Share Target
        4. Creating a Quick Link
        5. Summary
      8. Chapter 26: The AutoPlay, Protocol Activation and Print Contracts
        1. Revisiting the Example App
        2. Implementing the AutoPlay Contract
        3. Implementing the Protocol Activation Contract
        4. Implementing the Printing Contract
        5. Summary
      9. Chapter 27: Working with App Tiles
        1. Creating the Example for this Chapter
        2. Creating a Live Tile
        3. Using Badges
        4. Advanced Tile Features
        5. Summary
      10. Chapter 28: Using Toast and the System Launcher
        1. Using Toast Notifications
        2. Using the App Launcher
        3. Summary
      11. Chapter 29: Working with Sensors
        1. Creating the Example App
        2. Working with Geolocation
        3. Using the Light Sensor
        4. Using the Inclinometer
        5. Using the Accelerometer
        6. Using the Compass
        7. Summary
    12. Part 5: Selling apps
      1. Chapter 30: Creating an App to Publish
        1. Deciding On Your App
        2. Deciding On Your Business Model
        3. Getting Ready
        4. Creating the Visual Studio Project
        5. Testing the Example App
        6. Summary
      2. Chapter 31: Windows Store Integration
        1. General Advice on App Licensing
        2. Dealing with a Basic Store Scenario
        3. Enforcing the License Policy
        4. Summary
      3. Chapter 32: Selling Upgrades
        1. Defining the Products in the Scenario File
        2. Using the License Information
        3. Selling Upgrades
        4. Creating an In-App Store-Front
        5. Summary
      4. Chapter 33: Publishing to the Windows Store
        1. Preparing the App Listing
        2. Associating the App with the Store
        3. Removing the Store Simulation Code
        4. Building the App Package
        5. Completing the App Listing
        6. Submitting Your App
        7. Summary
    13. Index