Friday, March 23rd, 2007

Slingshot: Desktop Apps via Rails

Category: Announcements, Offline, Rails

Magnetk and Joyent have created Slingshot, a tool that enables you to do offline Rails applications.

It is already being touted as competition for Apollo.

The model is interesting, and should be compared to solutions such as those using Dojo’s Offline Toolkit.

With Dojo, you use a normal web browser, and offline starts working. With Apollo and Slingshot you are developing apps in the web way (with web technologies such as Rails and Flash/Flex) but you get to deploy them as web applications (whether it be via one click running or downloads).

Slingshot looks like it wraps up a Rails app and packages it in such a way that the user is opening up a Site Specific Browser that accesses your world:

Offline mode is cool, so is integration with traditional desktop apps, but it is all somewhat worthless without an easy way to synchronize data with your live server. Slingshot data sync is designed to be extremely powerful while still being lightweight and flexible. We provide controllers and code to handle data serialization & transport in both directions. As the developer, you merely need to aggregate all the ActiveRecord objects that particular user needs to have access to offline. Slingshot does the rest. Same goes for upsync, and we have similar methods built in for files and other data types. The only extra work for the developer is deciding who gets what.

Design Goals

  • Let developers write hybrid desktop/web applications with Rails. Rails is elegant, well designed and allows for rapid development and deployment. It’s also much easier for a novice to learn than Cocoa or C# and it enforces some good decomp and design.
  • Allow Rails developers to create more robust applications that have a comparable user experience to traditional desktop applications. Drag in and drag out of data/files/etc, for starters. In the future, filesystem access to remote data [like SftpDrive…]
  • Allow Rails apps to run offline with simple and transparent data synchronization
  • Lightweight and customizable – we want you to make the decisions about exactly how your app runs, not us.

How this it’s done:

We started by developing application shells for both Windows and OS X that provide a consistent and stable binary environment in which to run Rails apps. One nice thing about the Rails community is that most developers are already developing their application in “offline” development mode, usually on a Mac. Similar to the Locomotive framework on OS X or the Instant Rails application on Windows, we make it easy to bring your custom environment into a stable well defined shell that you can customize in any way necessary. Gems, binaries, auxiliary worker processes – whatever. You have full control.

On top of this, we have a customized browser that runs without any of the traditional dressing [address bars, buttons, etc] of a web browser. This allows much more intimate access to the application and to the host operating system. By controlling the browser and extending it, we can build a bridge into the OS. A developer can easily tie together existing data import<->export controllers within their existing application directly to normal OS data transport mechanisms like the drag and drop interface, the clipboard, and eventually the filesystem. This is all done without modifying any of the compiled code, and is OS independent. Also, your app is still available from any browser in the world, just like it was before.

This is fantastic news for the web, Rails developers, and our users. How great is it to see this innovation happening again.


Posted by Dion Almaer at 2:18 pm

3.4 rating from 46 votes


Comments feed TrackBack URI

Cool. This sound really amazing. And just after apollo launch =)

Comment by Roberto R. — March 23, 2007

Competition bites, but somehow i think apollo willl come out on top.

Comment by Adam Reimer — March 24, 2007

If it’s linked to their hosting, this will not work. People won’t be able to test it before deciding to pay for.

Comment by Benoit — March 24, 2007

Yup I was thinking the same, according to their site, it will be free for anyone using their hosting service, for the rest, price are still not revealed..

“we can safely say that Slingshot will be available for free to developers that host their Rails application on Joyent Accelerators. Other uses of Slingshot will be allowed, but we haven’t finalized the pricing for those uses.”

Comment by SilverTab — March 24, 2007

So, um, ok…like, I’m going to package up all my ruby code, unencrypted, and deploy it to 1000s of desktops all over the world. How is this a good idea again? Or has Joyent come up with a way to encrypt Ruby code?

Comment by John Wells — March 27, 2007

This is just what the doctor ordered. Web applications are great but limited; desktop apps are great (in different ways) and limited (in different ways- mainly deployment and collaboration).

And while I appreciate Flex, and Flash, Adobe generally pisses me off (don’t get me started on how many times my legit copy of Acrobat has to check its activation code in a weak, and what percent of the time it fails).

John, this is a good idea for people who don’t have closed-source code who want to have access to the advantages of offline applications. Clearly, it is not a good solution for someone who develops with a scripting language who want to keep their source closed. Might I suggest Apollo (which I am guessing uses compiled code)?

Comment by BCC — April 11, 2007

Leave a comment

You must be logged in to post a comment.