You are previewing Pro XAML with C#: Application Development Strategies.
O'Reilly logo
Pro XAML with C#: Application Development Strategies

Book Description

Pro XAML with C#: Application Development Strategies is your guide to real-world development practices on Microsoft’s XAML-based platforms, with examples in WPF, Windows 8.1, and Windows Phone 8.1. Learn how to properly plan and architect an application on one or more of these platforms for a robust, scalable solution.

In Part I, authors Buddy James and Lori Lalonde introduce you to XAML and reveal proven techniques for developing successful line-of-business applications. You’ll also find out about some of the conflicting needs and interests that you might encounter as an enterprise XAML developer.

Part II begins to lay the groundwork to help you properly architect your application, providing you with a deeper understanding of domain-driven design and the Model-View-ViewModel design pattern. You will also learn about proper exception handling and logging techniques, and how to cover your code with unit tests to reduce bugs and validate your design.

Part III explores implementation and deployment details for each of Microsoft’s XAML UIs, along with advice on deploying and maintaining your application across different devices using version control repositories and continuous integration.

Pro XAML with C# Application Development Strategies is for intermediate to experienced developers looking to improve their professional practice. Readers should have experience working with C# and at least one XAML-based technology (WPF, Silverlight, Windows Store, or Windows Phone).

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents at a Glance
  5. Contents
  6. About the Authors
  7. About the Techincal reviewer
  8. Acknowledgments
  9. Introduction
  10. Part I: Getting Started
    1. Chapter 1: What Is XAML?
      1. A Brief History of Windows User Interface Design
      2. Extensible Application Markup Language
        1. Separation of User Interface Concerns
        2. Declarative vs. Imperative Programming
        3. To Code-Behind or Not to Code-Behind?
        4. The MVVM Design Pattern
      3. Summary
    2. Chapter 2: Software Craftsmanship
      1. Software as an Art and a Science
      2. SOLID Object-Oriented Design
      3. To Unit Test or Not to Unit Test?
        1. Test-Driven Development
      4. Meet the Team
        1. The Development Manager
        2. The Business Analyst
        3. The Junior Developer
        4. The Guru
        5. The DBA
      5. The First Team Design Meeting
      6. Scrum Agile Methodologies
      7. How to “Talk the Talk” When It Comes to Gathering Requirements
        1. User Stories and How to Create Them
      8. Summary
  11. Part II: Laying the Groundwork
    1. Chapter 3: Domain-Driven Design
      1. Introducing Domain-Driven Design
        1. What Is Domain-Driven Design?
        2. Before Domain-Driven Design
        3. Business User? Who’s That?
      2. The Domain Model in Domain-Driven Design
        1. The Source Code Is the Design Documentation
        2. Domain Entities
        3. Domain Aggregate Roots
        4. Domain Value Objects
        5. Domain Services
        6. Domain Events
        7. CQRS: Command Query Responsibility Segregation
      3. Summary
    2. Chapter 4: Design Patterns
      1. Architecture Types
      2. Layered Architecture
        1. User Interface Layer
        2. Presentation Layer
        3. Service Layer
        4. Domain Layer
        5. Infrastructure Layer
      3. Design Patterns Used Throughout the Book
        1. The Repository Pattern
        2. The Adapter Pattern
        3. The MVVM Design Pattern
        4. ICommand: The Cure for the Common Event Handler
      4. Summary
    3. Chapter 5: Unit Testing
      1. Debugging Strategies
        1. Defensive Programming
        2. System Testing
        3. Regression Testing
        4. User Acceptance Testing
      2. Unit Tests to the Rescue
      3. Unit Testing Basics
      4. Characteristics of a Great Unit Test
        1. Automated Unit Test Execution
        2. Unit Test Execution Speed
        3. K.I.S.S. Your Unit Tests
        4. All Team Members Should Be Able to Execute Unit Tests
        5. Great Unit Tests Survive the Test of Time
        6. Unit Test Fixtures
      5. Unit Testing Frameworks
        1. NUnit
        2. Microsoft Unit Testing Project Template
      6. Summary
    4. Chapter 6: Advanced Unit Testing and Test-Driven Development
      1. Test Fixtures Are Classes Too
      2. Use Inheritance to Avoid Duplicate Code
      3. Unit Testing Classes That Have Dependencies
        1. Dealing with Dependencies
        2. Repository Pattern
        3. Stubs
        4. Mock Objects
      4. Using the Moq Framework
        1. Using the Mock Class to Set Up Your Dependencies
      5. Design by Testing: Test-Driven Development
      6. Summary
    5. Chapter 7: Exception Handling and Logging
      1. Enterprise Library Exception Handling Application Block
        1. Installing the Exception Handling Application Block
        2. Installing the Enterprise Configuration Console
        3. Configuring Policies, Exception Types, and Handlers
        4. Modifying the Code
        5. Configuring the Logging Exception Handler
      2. Logging Options for Windows Device Apps
        1. Visual Studio Application Insights
      3. Summary
  12. Part III: Completing the User Interface Layer
    1. Chapter 8: The WPF User Interface
      1. The Basics
        1. Application Class
        2. Windows, Pages, and User Controls
        3. The Code-Behind File
        4. First Look
        5. XAML Designer
        6. Container Controls
        7. Layouts
      2. Resources and Styles
        1. Resources
        2. Styles
      3. Data Binding
        1. XAML Markup
        2. ViewModel and INotifyPropertyChanged
        3. DataContext
        4. Dependency Properties
      4. Summary
    2. Chapter 9: The Windows Phone User Interface
      1. The Basics
        1. Windows Phone 8.1 SDK
        2. Multiresolution Support
        3. Scaling
      2. Themes, Resources, and Styles
        1. Background and Accent Colors
        2. Theme Resources
        3. Predefined Styles
      3. Application Architecture
        1. Page Orientation
        2. Navigation
        3. Caching Pages
      4. Templates
        1. DataTemplate
        2. ItemTemplate
      5. Displaying Collections
        1. ListView
        2. GridView
      6. Presentation Controls
        1. Hub
        2. Pivot
      7. Application Bar
      8. Summary
    3. Chapter 10: The Windows User Interface
      1. The Basics
        1. Windows Software Development Kit
        2. Developer License
        3. Basic Design Principles
        4. Gestures
      2. Managing Layouts
        1. Visual States
        2. Storyboards and Animations
        3. OnSizeChanged
      3. Searching Data
      4. Flyouts
        1. The Basics
        2. Usage and Syntax
        3. Programmatic Display
        4. Flyout Styles
      5. Contracts
        1. Share Contract
        2. Settings Contract
      6. Summary
    4. Chapter 11: Deploying and Maintaining Your Application
      1. Version Control
        1. The Basics
        2. Choosing a Version Control System
      2. Continuous Integration
        1. “Johnny Broke the Build!”
        2. Configure a CI Build
        3. Queue a Build
      3. Deploying WPF Applications Using ClickOnce
      4. Publishing Apps to the Windows StoreWindows Dev Center
        1. Windows Dev Center
      5. Summary
  13. Index