Programming Cocoa with Ruby brings together two enthusiastic development communities. Ruby programmers will tell you how productive they are with just the right amount of code. Cocoa developers know the importance of a clean, intuitive interface.

Now, through Programming Cocoa with Ruby, the joy of Cocoa meets the joy of Ruby.

Out of Print

This book is currently out of print.

About this Book

  • 300 pages
  • Published:
  • Release: P1.0 (2009-08-04)
  • ISBN: 978-1-93435-619-7

This is a book for the Ruby programmer who’s never written a Mac app before. Through this hands-on tutorial, you’ll learn all about the Cocoa framework for programming on Mac OS X. Join the author’s journey as this experienced Ruby programmer delves into the Cocoa framework right from the beginning, answering the same questions and solving the same problems that you’ll face.

Together you’ll build a single application that threads throughout the book, and it’s not a toy. You’ll cover topics that may not be the flashiest parts of Cocoa, but they’re ones you’ll need to know to create robust, feature-rich applications for yourself. And you’ll learn more than just Cocoa and RubyCocoa, you’ll get first-hand effective agile development practices. You’ll see test-first development of user-interface code, little domain-specific languages that take advantage of Ruby features, and other Rubyish tricks.

At the end of the book, you’ll be ready to write a real Mac OS X application that can be distributed to real users.

Contents and Extracts

  • Full Table of Contents excerpt
  • Introduction
  • How Do We Get This Thing Started excerpt
  • A First Realistic App
    • Working with Interface Builder and XCode
    • One Good App Observes Another excerpt
  • Reshaping Fenestra
    • A Better GUI
    • Decoupled Controllers excerpt
    • Notifications Connect Decoupled Objects
    • More Expressive Code
  • Project Mechanics
    • Bundling Gems and Libraries with Your App
    • Project Organization, Builds, and Your Favorite Editor
  • Declarative Data Handling
    • Persistent User Preferences
    • Creating A Preference Panel in a New Nib
    • Implementing a Preference Panel with Cocoa Bindings
    • Setting Up Bindings with Code
  • Fun with Tables
    • Prologue: Folders and Tests
    • Selections and Editing
    • Buttons in Tables
    • A Formatter with Two Wrinkles
    • Picking Files with Open Panels
    • Drag and Drop
    • Epilogue: A Wonderful World of Tests
  • Wrapping Up
    • Fit and Finish
    • Adding Help
    • Document-Based Applications
    • MacRuby
  • Reference
    • The Objective-C Bridge and Bridge Metadata
    • The Underpinnings of Cocoa Bindings

About the Author

Brian Marick learned Ruby in 2001 because Dave Thomas and Andy Hunt, original authors of Programming Ruby, wouldn’t let him off a shuttle bus until he said he would. He’s been programming in it ever since, and he’s made a special effort to teach it to software testers. His previous book is Everyday Scripting with Ruby, which began as a tutorial for those very testers.

He’s not a Ruby programmer by trade. He makes most of his money as a consultant in the Agile methodologies. (After getting off the shuttle bus, he was one of the authors of the “Manifesto for Agile Software Development”.)