You are previewing Windows® Phone 7 Developer Guide.
O'Reilly logo
Windows® Phone 7 Developer Guide

Book Description

This guide to developing Windows Phone 7 applications walks through a series of fictional, but realistic scenarios involved in building a phone application that uses a mobile front end talking to a cloud backend.

Table of Contents

  1. Windows® Phone 7 Developer Guide: Building connected mobile applications with Microsoft Silverlight®
  2. Foreword
  3. Foreword
  4. Preface
    1. Who This Book Is For
    2. Why This Book Is Pertinent Now
    3. How This Book Is Structured
    4. The Example Application
    5. What You Need to Use the Code
    6. Who’s Who
    7. Where to Go for More Information
  5. Acknowledgments
  6. 1. Introducing Windows Phone 7
    1. A Standardized Platform
    2. Data-driven Applications
    3. Developing for the Windows Phone 7 Platform
      1. Resources for Developers
        1. Resources for Silverlight Developers
        2. Resources for XNA-Based Application Developers
        3. Resources for Web and Service Developers
    4. Terminology
    5. More Information
      1. Blogs, Code Samples, Training Kits, and Windows Marketplace
  7. 2. Designing Applications for Windows Phone 7
    1. Basic Design Considerations
      1. Type of Application
      2. Design and Implementation
      3. Resource Management
      4. Remote Services
    2. Mobile Phone Client Applications
      1. Suitable Application Types for Mobile Phones
      2. Silverlight and Windows Phone 7
    3. Design Considerations for Windows Phone 7 Applications
      1. User Interface Design and Style Guidelines
      2. Application Deactivation and Tombstoning
      3. User Input Considerations
      4. Storage Considerations
      5. Connectivity Considerations
      6. Security Considerations
      7. Data Formats and Accessing Remote Services
        1. Data Format and Synchronization Considerations
        2. Microsoft Data and Synchronization Technologies for Windows Phone 7
      8. Resource Management and Performance
        1. Minimize Device Resource Usage
        2. Apply Good Practice Programming Techniques
        3. Optimize Memory Usage
        4. Maximize GPU Usage
      9. Availability of Components and Frameworks
    4. Questions
  8. 3. The Tailspin Scenario
    1. The Tailspin Company
      1. Tailspin’s Strategy
      2. Tailspin’s Goals and Concerns
    2. The Surveys Application Architecture
      1. The Actors
        1. Tailspin - the ISV
        2. Fabrikam and Adatum - the Subscribers
        3. The Surveyors - Windows Phone 7 Users
      2. The Business Model
      3. The Application Components
  9. 4. Building the Mobile Client
    1. Overview of the Mobile Client Application
      1. Goals and Requirements
        1. Usability Goals
        2. Non-Functional Goals
        3. Development Process Goals
      2. The Components of the Mobile Client Application
      3. The Structure of the Tailspin Surveys client Application
        1. Dependency Injection
        2. The Contents of the TailSpin.PhoneClient Project
    2. The Design of the User Interface
      1. Navigation
      2. User Interface Description
      3. User Interface Elements
        1. The Pivot Control
        2. The Panorama Control
        3. Styling and Control Templates
        4. Context Menus
    3. Using the Model-View-ViewModel Pattern
      1. The Premise
        1. Overview of MVVM
        2. Benefits of MVVM
      2. Connecting the View and the View Model
        1. Inside the Implementation
      3. Testing the Application
        1. Inside the Implementation
      4. Displaying Data
        1. Inside the Implementation
          1. Data Binding on the Settings Screen
          2. Data Binding and the Pivot Control
          3. Data Binding and the Panorama Control
          4. Handling Focus Events
      5. Commands
        1. Inside the Implementation
      6. Handling Navigation Requests
        1. Inside the Implementation
      7. User Interface Notifications
        1. Informational/Warning Notifications
        2. Error Notifications
        3. Inside the Implementation
      8. Accessing Services
    4. Questions
    5. More Information
  10. 5. Using Services on the Phone
    1. The Model Classes
    2. Using Isolated Storage on the Phone
      1. Overview of the Solution
        1. Security
        2. Storage Format
      2. Inside the Implementation
        1. Application Settings
        2. Survey Data
    3. Handling Activation and Deactivation
      1. Overview of the Solution
      2. Inside the Implementation
        1. Reactivation and the Panorama Control
    4. Handling Asynchronous Interactions
      1. Using Reactive Extensions
      2. Inside the Implementation
    5. Synchronizing Data between the Phone and the Cloud
      1. Overview of the Solution
        1. Limitations of the Current Approach
      2. Inside the Implementation
        1. The getNewSurveys Task
        2. The saveSurveyAnswersTask
    6. Using Location Services on the Phone
      1. Overview of the Solution
      2. Inside the Implementation
    7. Acquiring Image and Audio Data on the Phone
      1. Overview of the Solution
        1. Capturing Image Data
        2. Recording Audio Data
      2. Inside the Implementation
        1. Using a Chooser to Capture Image Data
        2. Using XNA Interop to Record Audio
    8. Logging Errors and Diagnostic Information on the Phone
    9. Conclusion
    10. Questions
    11. More Information
  11. 6. Connecting with Services
    1. Installing the Mobile Client Application
      1. Overview of the Solution
      2. Inside the Implementation
    2. Authenticating with the Surveys Service
      1. Goals and Requirements
      2. Overview of the Solution
        1. A Future Claims-Based Approach
      3. Inside the Implementation
    3. Notifying the Mobile Client of New Surveys
      1. Overview of the Solution
      2. Inside the Implementation
        1. Registering for Notifications
        2. Sending Notifications
        3. Notification Payloads
    4. Accessing Data in the Cloud
      1. Goals and Requirements
      2. Overview of the Solution
        1. Exposing the Data in the Cloud
        2. Data Formats
        3. Consuming the Data
        4. Using SSL
      3. Inside the Implementation
        1. Creating a WCF REST Service in the Cloud
        2. Consuming the Data in the Windows Phone 7 Client Application
    5. Filtering Data
      1. Overview of the Solution
        1. Registering User Preferences
        2. Identifying Which Devices to Notify
        3. Selecting Surveys to Synchronize
      2. Inside the Implementation
        1. Storing Filter Data
        2. Building a List of Devices to Receive Notifications
        3. Building a List of Surveys to Synchronize with the Mobile Client
    6. Summary
    7. Questions
    8. More Information
  12. 7. Interacting with Windows Marketplace
    1. The Application Development and Publishing Life Cycle
    2. Application Certification Requirements
      1. Application Code Restrictions
      2. Run-time Behavior, Performance, and Metrics
      3. User Opt-in and Privacy
      4. Application Media and Visual Content
    3. Packaging the Application
      1. The Windows Marketplace Repackaging Process
    4. Summary of the Submission and Validation Process
    5. Displaying Advertisements in an Application
    6. Accessing Windows Marketplace within an Application
    7. Questions
  13. I. Appendices
    1. A. Tools, Frameworks, and Processes
      1. Setting Up a Development Environment for Windows Phone 7
        1. Expression Blend for Windows Phone
        2. Additional Silverlight Controls for Windows Phone 7
      2. Using a Hardware Device during Development
        1. Connecting a Physical Device
        2. Registering and Unlocking the Device
        3. Deploying Applications to the Device
          1. Using the Windows Phone Connect Tool
      3. Developing Windows Phone 7 Applications
        1. Developing Trial Applications for Windows Phone 7
          1. Testing Trial Versions in an Emulator or Device
        2. Developing Web Applications for Windows Phone 7
      4. Debugging Windows Phone 7 Applications
      5. Unit Testing Windows Phone 7 Applications
        1. Automated Unit Testing
      6. Additional Tools and Frameworks
    2. B. Silverlight and XNA in Windows Phone 7
      1. Basic Differences between Silverlight and XNA
        1. Execution Model
        2. Performance
        3. Sounds
        4. Screen Display
        5. Summary of the Basic Differences
      2. The XNA Game Execution Model
      3. Using Interop from Silverlight to XNA
        1. Creating and Using an XNA Dispatcher Service
      4. Excluded Classes and Assemblies
    3. C. Leveraging Device Capabilities
      1. Scenarios for Device Capabilities
      2. Accelerometer
      3. Camera
      4. Contacts and Messaging
      5. Device Information
      6. Location and Mapping
        1. Asynchronous Location Service Operation
        2. Synchronous Location Service Operation
        3. Using Location Information and Displaying a Map
          1. The Bing Maps Silverlight Control
      7. Media
        1. Selecting a Photo on the Device
      8. Search
      9. Sound Recording
      10. Sound Playback
      11. Touch and Gestures
        1. Gesture Detection using Silverlight Manipulation Events
        2. Gesture Detection Using the GestureListener Control
        3. Gesture Detection Using XNA
      12. Vibration Alerts
      13. Web Browser
      14. Windows Marketplace
      15. Reactive Extensions
    4. D. Prism Library for Windows Phone 7
      1. About Prism for Windows Phone 7
      2. Contents of Prism for Windows Phone 7 Library
        1. Microsoft.Practices.Prism Namespace
        2. Microsoft.Practices.Prism.Commands Namespace
        3. Microsoft.Practices.Prism.Events Namespace
        4. Microsoft.Practices.Prism.ViewModel Namespace
        5. Microsoft.Practices.Prism.Interactivity Namespace
        6. Microsoft.Practices.Prism.Interactivity.InteractionRequest Namespace
    5. E. Microsoft Sync Framework and Windows Phone 7
      1. About the Microsoft Sync Framework
        1. Components of the Sync Framework
        2. Sync Framework Providers
      2. Using the Sync Framework
      3. Synchronization for Windows Azure and Windows Phone 7
  14. F. Answers to Questions
    1. Chapter 2: Designing Windows Phone 7 Applications
    2. Chapter 4: Building the Mobile Client
    3. Chapter 5: Using Services on the Phone
    4. Chapter 6: Connecting with Services
    5. Chapter 7: Interacting with Windows Marketplace
  15. G. More Resources for Developers
    1. Microsoft Press® books
      1. Visual Studio
      2. Web Development
      3. .Net Framework
      4. Data Access/Data Base
      5. Other Topics
  16. Index
  17. About the Authors
  18. Copyright