For a while now, Magnetk has been engaged in developing Slingshot with Joyent. Slingshot is a platform which allows Rails developers to easily create hybrid web/desktop apps with ease and flexibility. There are some great office 2.0 applications out there, but you must admit there is but there is only so much you can do with just AJAX in terms of flexibility and performance. I love Google speadsheets, but they are slow and kind of clunky. Its cool, but its very 1991.
Were starting to run up against some painful limitations inherent in todays web 2.0 experience. Most notable is the lack of any functionality and data accessibility while no internet connection is present. Also, there is no integration with other applications running on the end userss desktop. Others out there are also in the process of trying to solve some of these problems – but we think we have a particularly powerful take on it. Briefly, Ill answer the most obvious question people have:
How is Slingshot different than Apollo or Firefox 3?
Apollo is a great framework and certainly powerful. It will meet with great success. The Wikipedia entry describes Apollo as:
A cross-OS runtime that allows developers to employ their existing web development skills (Flash, Flex, HTML, Ajax) to build and deploy desktop Rich Internet Applications.
Slingshot has the same goals – with the key difference being we allow developers to employ existing applications with no re-write necessary. Additionally, as a bit of personal criticism that you might disagree with: Flash and related technologies dont come easily to most programmers. ActionScript is super cool, but Ive always found the Flash platform non-intuitive and confusing. Perhaps Im dumb; but I know Im not alone.
Firefox 3 adds the option of local datastores for applications to access in an offline mode, and it is certainly a step in the right direction. The major downside is that it requires developers to specifically tailor their application to this framework and design for it. With Slingshot, we wanted to make it really simple for existing applications to be dropped into our framework basically unmodifed and have them just work.
Slingshot is bit the same but a lot different than Firefox 3 and Apollo. Here are our major design goals:
- Let developers write hybrid desktop/web applications with Rails. Rails is elegant, well designed and allows for rapid development and deployment. Its 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 its 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.
A good example of why this is important can be seen by looking at Joyents Strongspace. Right now if you want to upload multiple files you browse for each individual file, one by one, hit upload and wait on a page until it finishes [unless of course, youre using SftpDrive]. With Slingshot, you grab a bunch of files, and drop them onto Strongspace, and they are uploaded in the background. That was easy. Drag out – its the same thing, but in reverse. Drag a file from Strongspace directly into Photoshop. Awesome.
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.
Were quite proud of Slingshot and are very happy to be working with the fine guys at Joyent. The goals of Slingshot are quite similar to the goals of SftpDrive. Both applications target facilitating a highly connected user experience with transparent and ubiquitous data access. SftpDrive is designed to provide a more networked experience for all traditional applications speaking the one API they all speak – the file system API. Slingshot takes centrally hosted applications that are accessible from anywhere in the world and make them available with or without an internet connection along with integrating them with powerful traditional applications.