InfoQ

News

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

Posted by Werner Schuster on Aug 05, 2008 09:40 PM

Community
Ruby
Topics
Ruby on Rails ,
Dynamic Languages ,
Javascript
Tags
Rails ,
Apple ,
iPhone ,
Ruby on Rails ,
Merb
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.

No comments

Watch Thread Reply

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.