InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

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

Posted by Werner Schuster on Aug 05, 2008

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

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?

Wrap Your SQL Head Around Riak MapReduce

Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.

Polyglot Persistence for Java Developers - Moving Out of the Relational Comfort Zone

Chris Richardson shows how he ported a relational database to three NoSQL data stores: Redis, Cassandra and MongoDB.

The Golden Circle – Why How What

Jean Tabaka challenges the audience to reflect on what Agile practices they are employing, how they are using them, ending with the questions “Why have their organization chosen to go Agile?