Creating Multi-Process Mac Applications
Creating Multi-Process Mac Applications
$5.99
Minimum price
$12.99
Suggested price
Creating Multi-Process Mac Applications

This book is 20% complete

Last updated on 2015-04-14

About the Book

LIMITED BETA PRICING: only $5.99!

Learn how to make your app more resilient, failure-proof, and modular.

This book will teach you how to create Mac applications which utilize background processes for heavy lifting and use the main application for the user interface only.

Set up your project with a daemon–client separation in mind and share data effortlessly. You will learn about the various ways of Inter-Process Communication on the Mac and how to use the modern Cocoa XPC in particular.

Build enterprise-level applications: they are easy to scale and ready for features. They become resilient to changes by splitting concerns between processes. This will help you think of your application as a suite of simpler services which can grow independently and thus more easily.

After Exploring Mac App Development Strategies introduced basics of software architecture to the communicty, this book will utilize the guiding principles to create a complex real-world application.

Table of Contents

  • Part 1: Understanding the problem
    • Inter-Process Communication on the Mac
    • How popular app developers solve the problem
  • Part 2: Solving the problem
    • Preparing the Architecture
      • A bit of Domain-driven Design Vocabulary Recap
      • Bounded Contexts
      • Aggregates
      • Rephrasing the problem: integrating Bounded Contexts
      • Sharing Data and Eventual Consistency
    • Organizing the database
      • Benefits and Drawbacks of Sharing a Core Data Store
      • Benefits and Drawbacks of Using Different Storage Mechanisms
    • Implementing the Processes
      • Bootstrapping a Multi-Process Xcode Project
      • Test-Driving the XPC API
      • Testing XPC Calls: Define Adapters
  • Part 3: Discussion
  • Appendix
    • Including interesting links, books, etc.

About the Author

Christian Tietze
Christian Tietze

Christian loves writing software. Mac and iOS development is a lot of fun – even more so when you are able to keep your code clean and maintainable. He writes short e-books about software architecture and clean coding paradigms to raise the bar for all Cocoa app developers.

Table of Contents

  • Introduction
      • A Note on this Preview Version
      • How to Read the Book
  • Understanding the Problem: Why You Would Want to Separate Your App Into Processes
    • Motivation
      • My Story: the Word Counter for Mac
      • Separating Concerns
      • Shared Data VS Inter-Process Communication
      • Inter-Process Communication on the Mac
      • XPC
    • The Example Application: Relocation Manager
      • Planning the app
      • User interaction stories
      • Informal Model of the Domain
  • Solving the Problem of Inter-Process Communication
    • Preparing the Architecture
      • A bit of Domain-driven Design Vocabulary Recap
      • Bounded Contexts
      • Aggregates
      • Sharing Data and Eventual Consistency
      • Design for concurrency
    • Organizing the Database
      • Data Storage Options
      • Benefits and Drawbacks of Sharing a Core Data Store
      • Benefits and Drawbacks of Using Different Storage Mechanisms
    • Implementing Parallel Processes
      • Bootstrapping a Multi-Process Xcode Project
      • Implement a Communication API
      • XPC API Concepts
      • Testing XPC Calls: Define Adapters
      • Dealing with crashes
  • Programming the Multi-Process App
    • Handling User Interaction in the main app
      • TDD view controllers
      • Leverage Cocoa Bindings
    • Handling User Interaction in the status bar app
      • TDD to cover alternate scenarios
    • Providing the Background Service
      • Creating a Testable Target for the Domain
      • Implement the Domain Model
      • Implement the XPC interfaces
  • Discussion
  • Appendix
    • Interesting Stuff
      • Resources on the Web
      • Books I Recommend
    • Principles of Development
      • Model–View–View Model (MVVM) Primer
      • East-Oriented Code
      • Domain Model
    • Troubleshooting
      • Code Signing

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub