MacRuby in Action
Brendan G. Lim with Jerry Cheung and Jeremy McAnally
  • April 2012
  • ISBN 9781935182498
  • 272 pages
  • printed in black & white

An excellent bridge from the world of Ruby to the world of OS X.

Philip Hallstrom, PJKH

MacRuby in Action is a tutorial for Ruby developers who want to code for Mac OS X without learning Objective-C. You'll learn the ins and outs of the MacRuby language, including straightforward examples of creating OS X applications using Cocoa components.

About the Technology

For Rubyists, it's a real drag switching to a static language like Objective-C for Mac development. Fortunately, you don't have to. MacRuby is a Ruby 1.9 implementation that sits right on the Mac OS X core. It gives you access to the Cocoa framework and easy interoperability with the Mac platform.

About the book

MacRuby in Action teaches Ruby developers how to code OS X applications in Ruby. You'll explore key Cocoa design patterns, along with a few twists that MacRuby makes possible. You'll also pick up high-value techniques including system scripting, automated testing practices, and getting your apps ready for the Mac App Store.

Table of Contents detailed table of contents



about this book

about the authors

about the cover illustration

Part 1 Starting with MacRuby

1. Introducing MacRuby

1.1. Introducing MacRuby

1.2. Cocoa: What you need to know

1.3. Objective-C and Ruby: what you need to know

1.4. Diving into MacRuby

1.5. Hello World, part 2

1.6. Summary

2. Using Macirb and the Apple development tools

2.1. Using external libraries with MacRuby

2.2. Exploring Macirb

2.3. Building a Pomodoro application in Xcode

2.4. Summary

3. Going beyond the basics with Xcode Interface Builder

3.1. About Interface Builder

3.2. Creating connections

3.3. Creating the Todo List application

3.4. Summary

Part 2 Take it for a spin

4. Using the delegate pattern

4.1. What are delegates?

4.2. Delegation as an extension technique

4.3. Using delegation in a custom MacRuby web browser

4.4. Summary

5. Notifications and implementing the observer pattern

5.1. Notifying multiple objects

5.2. Setting up notifications

5.3. Queuing notifications

5.4. Responding to notifications

5.5. Building an iTunes-notification observer

5.6. Summary

6. Using key-value coding and key-value observing

6.1. Simplifying code with key-value coding

6.2. Using KVO to implement observers

6.3. Building out the Product Inventory application

6.4. Summary

7. Implementing persistence with Core Data

7.1. Introducing Core Data

7.2. Understanding the persistent store and managed objects

7.3. Working with managed objects

7.4. Retrieving objects from Core Data

7.5. Creating a Core Data version of the Todo List application

7.6. Summary

8. Core Animation basics

8.1. Introduction to Core Animation

8.2. Core Animation layers

8.3. Animating with Core Animation

8.4. Summary

Part 3 MacRuby extras

9. HotCocoa

9.1. Introducing HotCocoa

9.2. Built-in mappings

9.3. Building a speech application using HotCocoa

9.4. Summary

10. MacRuby testing

10.1. Testing MacRuby applications with MiniTest

10.2. Installing and configuring MiniTest

10.3. Application vs. logic testing

10.4. Where to start testing

10.5. Summary

11. MacRuby and the Mac App Store

11.1. Introducing the Mac App Store

11.2. Knowing the App Store rules

11.3. Submitting a MacRuby application

11.4. Summary

© 2014 Manning Publications Co.

What's inside

  • Intro to Mac OS X development
  • Full coverage of the Cocoa framework
  • Submitting to the Mac App Store

About the reader

Written for Rubyists. No experience with Cocoa, Objective-C, or Mac OS X required.

About the author

Brendan G. Lim is a professional Ruby and Objective-C developer specializing in Rails and mobile development. Jerry Cheung is a Rails engineer working with emerging technologies like MacRuby and Node.js. Jeremy McAnally is a web and mobile developer and coauthor of Ruby in Practice.

placing your order...

Don't refresh or navigate away from the page.
print book $29.99 $44.99 pBook + eBook + liveBook
Additional shipping charges may apply
MacRuby in Action (print book) added to cart
continue shopping
go to cart

eBook $24.99 $35.99 3 formats + liveBook
MacRuby in Action (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.

FREE domestic shipping on three or more pBooks