BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Apple and Ruby Roundup: iPhone Config Utility on Rails, SproutCore Tools in Ruby

| by Werner Schuster on Aug 05, 2008. Estimated reading time: 1 minute |
Apple has been using dynamic languages for a long time. The current MacOS X is based on NextStep, which made heavy use of Objective-C, a language now very much en vogue since the release of the iPhone SDK (3rd party developers need to use Objective-C for writing iPhone applications). Apple's WebObjects framework was also written in Objective-C before its port to Java.

A closer look at some of Apple's latest software releases shows another dynamic language: Ruby. The most obvious is MacRuby, the Ruby 1.9 port for MacOS X, which leverages Objective-C's mature runtime and GC and allows easy integration with the Objective-C based Cocoa.

Another example is the iPhone Configuration Web Utility - a tool for the Enterprise use of the iPhone, which allows to manage iPhones in a company. A closer look at the Configuration Utility's user guide shows that it's written using Ruby on Rails (from the user guide):

installpath/vendor/rails/railties/lib/commands/servers/mongrel.rb  

The tool uses Mongrel on MacOS X and Webrick on Windows.

SproutCore is the toolkit Apple uses for the client side of it's MobileMe applications. While the body of Sproutcore is Javascript that is run in the browser, it's toolset is built with Ruby. The first clue comes from the download/installation instructions for Sproutcore:

sudo gem install sproutcore 

SproutCore is installed as a Ruby Gem for a reason: it comes with a toolset to get developers started with developing applications. Developer with Rails or other Ruby frameworks will recognize the concepts. A new SproutCore project is created with

sproutcore app_name 

The generated project contains a directory layout set up with necessary libraries and a skeleton application ready to run. SproutCore also uses Generators, written in Ruby, to create models and other aspects of the SproutCore application. Generation of HTML artifacts is done using Merb. To run a SproutCore app during development, either Mongrel or Thin are used to serve the content.

Finally, not an Apple project, but useful for Ruby developers working with Objective-C: Dr Nic shows how to test Objective-C applications (also for the iPhone) using Ruby.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT