Nov
04
posted under web projects
I’ve been working lately with a new framework called Slingshot by Joyent. It may have gotten some initial hype when it was released a few months back, but since has died down quite a bit.
Basically Slingshot allows Ruby on Rails applications to run offline as a normal desktop application, plain and simple. Joyent have built wrappers for Windows and Mac OS’s in which wrap a Rails application and port it into an offline runnable form. Sounds amazing, I know, however, there are several drawbacks, none crippling, but drawbacks none the less. It’s a bit rough to forsee all these pitfalls and bugs just by reading their wiki, So, i’ve felt compelled to document my experiences with the framework and how I’ve so far, managed to get past some hurdles. Also note, my testings up to this point have solely been on Mac OSX Tiger.
Just by reading their introductory write-up you can see the potential and with a quick browse of the wiki you can get a full idea how everything works (compared to the more complicated and incomplete Adobe AIR).
Here are a few issues i’ve faced in building my first Slingshot application:
- Size: The size of Slingshot is insane. The base framework is roughly 130mb, which basically is unable for a production app.Why is it so big you may ask? Well, I did some digging into the source and Slingshot actually contains a full version of the Ruby language. So, my quick solution was deleting all the .svn files, deleting all the RDocs, tests and examples for each gem that was installed. After that, We’re down to about 27m, much better, still a bit high, but, we’ll deal with that more in depth later.
- Open Code: Another drawback of Slingshot is the fact your Rails application code is completely open to viewing being that it resides in a sub-directory that is accessible by simply right-clicking the app and viewing the contents. Now, I haven’t come across any viable mac encryption methods (not sure if Windows has a solution for this either) and giving users full exposure to your source code is not an option (unless of course you’re taking the open-source route). Im my case, I’ve built an API for my main application (a web application), wrote a ruby library for the API, and am now using that API for my Slingshot app, which I have no problem with users being able to view.
So far those we’re my main concerns, now for some positives:
Performace: After opening Slingshot with a newly created rails app, the performance is superb. CPU is at 0.00 and memory is just over 13mb. We’ll see how this continues after adding some more ajax libraries and graphics.
Interface: The great thing about Slingshot is it has the look and feel of any mac application and with Interface Builder you can tweak and edit the menu bar, etc… for even more customization. Changing the application name and icons are very simple, so branding is very simple.
I’ll keep you updated as my application progresses, but so far it looks extremely promising
if your in an abiding position.
Let me know if you’ve done any experimenting with Slingshot yourself, i’d love to compare notes!
<