Windows 8 MVVM Patterns Revealed: covers both C# and JavaScript

Book description

The Model-View-View-Model (MVVM) pattern is held in high regard by many developers as an excellent way of creating sophisticated modern applications. It's clear seperation of presentation and business logic produces a clean implementation that promotes speed, scalability and code reuse in applications with a complex UI. These strengths have found it favor with WPF and Silverlight developers. It is now increasingly being employed for Windows 8 apps, a purpose to which it is ideally suited as this book will show.

In this brief, information-rich, guide we will show you how MVVM works with both XAML (C#) and HTML5 (JavaScript) flavors of Windows 8. Beginning with a brief recap of MVVM concepts under .NET - to provide a common frame of reference - we will then delve into the details of how MVVM can best be implemented in Metro-style apps for Windows 8 and show a working application framework in each case.

What you'll learn

  • How the MVVM pattern can bring elegance, power, speed and reusability to your Windows 8 apps.

  • That MVVM implementations under Windows 8 differ from MVVM implementations under .NET.

  • Produce fully working Metro-style applications using XAML and HTML5

  • How you can use the popular KnockoutJS Framework to speed the development of your HTML5 Metro apps.

  • Essential tips, tricks and cautions that will allow you to bring your existing .NET skills to bear quickly in the Windows 8 world.

  • Who this book is for

    This is a fast-paced guide for developers comfortable with both .NET programming and the fundamentals of Windows 8 development.

    Table of contents

    1. Title
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Introduction
    9. Chapter 1: Setting Up Windows 8 Application Project
      1. The Development Environment
      2. The Windows Store Project Templates
      3. Creating a Windows Store XAML Project – FinanceHub
      4. Exploring FinanceHub Project
      5. Setting MVVM Architecture in FinanceHub Project
      6. Summary
    10. Chapter 2: Implementing the View
      1. Customizing Deployment Package and Runtime Configuration Properties
      2. Enabling Customization of Application Styles and Themes
      3. Developing User Interface
      4. Summary
    11. Chapter 3: Implementing the Model
      1. Define Serializable and Deserializable Stocks Data Model
      2. Define enum to support Add and Remove Stocks Actions
      3. Define a Class for Event Arguments of Add and Remove Stocks Actions
      4. Create a Helper Class to Store and Retrieve Stocks Watchlist in the Local Data Storage
      5. Add SimulatedRandomStocksDetail.csv File
      6. Summary
    12. Chapter 4: Implementing the ViewModel
      1. Building MVVM Framework for FinanceHub Application
      2. Implementing ViewModel Classes
      3. Summary
    13. Chapter 5: HTML5, JavaScript, and Windows 8 Applications
      1. HTML5 and JavaScript
      2. Windows 8 Applications Using HTML5 and JavaScript
      3. Best Practices in JavaScript Development
      4. The Knockout JavaScript Framework
      5. Summary
    14. Chapter 6: View, Model, and ViewModel Structures in HTML5 and JavaScript
      1. Setting up FinanceHub JavaScript Windows 8 Application Project
      2. Implementing the View
      3. Implementing the Model
      4. Implementing the ViewModel
      5. Implementing the State Persistence
      6. Summary
    15. Index

    Product information

    • Title: Windows 8 MVVM Patterns Revealed: covers both C# and JavaScript
    • Author(s):
    • Release date: December 2012
    • Publisher(s): Apress
    • ISBN: 9781430249085