which to choose, rubymotion, swift or Object C?

发布时间: 2014-10-08 10:29:00

refer to:

In RubyWeekly I saw a link to a discussion on Reddit that was getting some good attention, and it was titled "Is RubyMotion suitable for Client Work?", and I imediately thought "Are people really still wondering if RubyMotion is production ready with apps like FrontBack and A Dark Room out there?".

Opening up the thread through I was really happy to see this is someone considering a career in freelance iOS development, and is actually asking about how it might impact their income, a really good question, so I figured it was worth a really thought out answer. I took some time to think about my answer before I replied, and this is out it ended up.

Their Question

I have some Ruby background, and find working in text editors and from the command line far more enjoyable than IDEs.

As such, I was strongly leaning toward Rubymotion to get into mobile development (and perhaps a bit of desktop OS X).

But, I was recently cautioned that using a toolchain like Rubymotion would make it difficult for me to solicit client work.

The argument went that most client work for independent freelancers like myself is going to be jobs outsourced by development companies or by the IT departments of the client companies themselves.

In both cases, the use of "native" tools and processes is likely to be imposed, and the client will require source code at the end of the project, which they will not want to receive in Ruby.

I was wondering if anyone else has experience in this area? Is Rubymotion suitable for freelance/contract work, or are the opportunities too few and far between to make for a viable career path?

My Answer

It seems you really want some advice from someone that has experienced a lot of sides of the field, so here's my thoughts, but let me prefix this with I did Objective-C before RubyMotion, I run the MotionInMotion RubyMotion screencast so I'm a little biased, but I've also got a Swift book on its way so I'm really not that biased. I've done consulting/contracting and freelance with both Objective-C and RubyMotion, and I'm working on apps with Swift at the moment (as well as with RubyMotion).

Look at this decision purely from a fiscal and business sense. RubyMotion is a niche, but a niche with quickly growing popularity in the (funded) start up world. These people have the money to pay you and are often great to work with. There is plenty of work out there for a RubyMotion developer as long as they do what any freelancer has to do, network. Being in a niche will help you out here, because there is less noise to yell over.

If you don't want to go niche though, focus on Objective-C and Swift, it will enable you to do work for larger IT companies as a consultant occasionally. It's good money, but honestly from experience it's not nearly as great as working with start ups using RubyMotion.

My suggestion for you would be to learn RubyMotion if you already know Ruby, it will lessen the difficulty of learning Cocoa (OS X) and Cocoa Touch (iOS), and will also let you start playing with Android when you want to as well soon once it's out of beta, if you're not strong with Java.

Still practice Objective-C and Swift though, especially in the early days you will be wanting to take any and all work that comes your way so that you can build your portfolio. The languages and the small style differences in how you use them are easy, it's the frameworks and the mindset that is much more difficult, you won't be an expert in that quickly, so start with RubyMotion and then learn some Objective-C and Swift and try recreating things from your RubyMotion projects in those.

There is two reasons I say learn Objective-C, first is so you can understand all the code out there, second is that there will be projects that aren't new and are just needing updates. These will likely still be written in Objective-C.

As a RubyMotion developer you can still use all the same tools that Swift and Objective-C developers use, including Xcode's Interface Builder and any of the open source Objective-C code out there like CocoaPods. This doesn't work in reverse though, a Swift or Objective-C developer coming to a RubyMotion project will have to get used to all the gems we use. There is much more value in an experienced RubyMotion dev for a RubyMotion project than there is an Objective-C or Swift dev, but there is almost the same value with any of the three working on an Objective-C or Swift app.

With all that in mind, in my opinion learning RubyMotion seems like a fiscally sensible decision.