Mobile Development with C#

Book description

It’s true: you can build native apps for iOS, Android, and Windows Phone with C# and the .NET Framework—with help from MonoTouch and Mono for Android. This hands-on guide shows you how to reuse one codebase across all three platforms by combining the business logic layer of your C# app with separate, fully native UIs. It’s an ideal marriage of platform-specific development and the "write once, run everywhere" philosophy.

By building a series of simple applications, you’ll experience the advantages of using .NET in mobile development and learn how to write complete apps that access the unique features of today’s three most important mobile platforms.

  • Learn the building blocks for building applications on iOS, Android, and Windows Phone
  • Discover how the Mono tools interact with iOS and Android
  • Use several techniques and patterns for maximizing non-UI code reuse
  • Determine how much functionality can go into the shared business logic layer
  • Connect to external resources with .NET’s rich networking stack
  • Read and write data using each platform’s filesystem and local database
  • Create apps to explore the platforms’ location and mapping capabilities

Publisher resources

View/Submit Errata

Table of contents

  1. Mobile Development with C#
  2. SPECIAL OFFER: Upgrade this ebook with O’Reilly
  3. Preface
    1. Who Is This Book For?
    2. Contents of This Book
    3. Conventions Used in This Book
    4. This Book’s Example Files
    5. Using Code Examples
    6. Safari® Books Online
    7. How to Contact Us
    8. Acknowledgments
  4. 1. Surveying the Landscape
    1. The Players
      1. iOS
      2. Android
      3. Windows Phone
    2. Write Once, Run Anywhere
    3. An Alternative Approach
    4. Summary
  5. 2. Hello, Platforms!
    1. iOS
      1. What Is MonoTouch?
      2. Create the Application
        1. Defining the Interface
        2. Writing the Application Code
    2. Android
      1. Mono for Android
      2. Create the Application
        1. Resources
        2. Defining the Interface
        3. Writing the Application Code
    3. Windows Phone
      1. Create the Application
        1. Defining the Interface
        2. Writing the Application Code
    4. Summary
  6. 3. Code Sharing Techniques
    1. Project Setup
    2. File Linking
    3. Abstraction
    4. Observer Pattern
    5. Partial Classes
    6. Conditional Compilation
    7. Summary
  7. 4. Accessing the Network
    1. Reaching into the Cloud
      1. Shared Layer
      2. iOS
      3. Android
      4. Windows Phone
    2. Notifying the User Interface
      1. Shared Layer
      2. iOS
      3. Android
      4. Windows Phone
    3. Summary
  8. 5. Storing Data
    1. Project Setup
      1. Shared Layer
      2. iOS
      3. Android
      4. Windows Phone
    2. Accessing the Filesystem
      1. Direct File Access
        1. iOS
        2. Android
      2. Isolated Storage
        1. iOS
        2. Android
        3. Windows Phone
    3. Using a Local Database
      1. iOS and Android
      2. Windows Phone
      3. Open Source Alternatives
    4. Summary
  9. 6. Location, Location, Location
    1. Mapping
      1. iOS
      2. Android
      3. Windows Phone
    2. Mocking Location
      1. iOS
      2. Android
      3. Windows Phone
    3. Using Location Data
        1. Accuracy
        2. Frequency
        3. Availability
      1. iOS
      2. Android
      3. Windows Phone
    4. Summary
  10. A. Creating Android Virtual Devices
  11. B. Further Reading
    1. iOS
      1. Books
      2. Web
    2. Android
      1. Books
      2. Web
    3. Windows Phone
      1. Books
      2. Web
  12. About the Author
  13. SPECIAL OFFER: Upgrade this ebook with O’Reilly

Product information

  • Title: Mobile Development with C#
  • Author(s): Greg Shackles
  • Release date: May 2012
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781449338305