Pivotal Labs Talks: MacRuby and HotCocoa
MacRuby is an implementation of the Ruby language that runs on the Objective-C runtime under OS X. MacRuby is based on Ruby 1.9 but contains substantial modifications including the merging of object models (every Object is an NSObject), using the Objective-C 2.0 generational garbage collector, moving core types (String, Fixnum, Array, Hash) atop their Objective-C counterparts and replacement of standard libraries to more optimally integrate with OS X. MacRuby also includes a new library, HotCocoa. HotCocoa is a thin, idiomatic Ruby layer that sits above Cocoa and other frameworks.
Cocoa classes have extremely verbose method and constant names. A substantial amount of code is written to just instantiate and configure instances of these classes. Interface Builder is used by most developers because it hides the complexity of manually configuring controls, but at the expense have having to use a GUI builder and the obscuring those configuration options inside the IB user interface. One of HotCocoa's chief goals is to allow Interface Builder simplicity, but in Ruby code. Buttons, Sliders, Windows, WebViews—the whole works—HotCocoa simplifies this process by creating a mapping layer over the top of Objective-C classes. HotCocoa adds Ruby-friendly methods, constants and delegation techniques that look refreshingly simple, but do not prevent full use of the Cocoa APIs.
This talk with introduce MacRuby and HotCocoa and show demonstrations on how to use them to quickly build OS X desktop applications with Ruby.
Speakers: Rich Kilmer