Development

Developing Cross-Platform Mobile Apps & Comparing Platforms

By May 12, 2015 No Comments

One of the joys and pains of being a software developer is choosing the right tools for the job.  Technology moves so fast, and everyday there are new frameworks and libraries being shared with the world to help you do your job better.  You would think this would always be a good thing, but choices can be hard. The best you can do is make the best choices with the information you have, and that information is always changing.   We are going to take a look at some of the leading frameworks that might be able to help you create your mobile applications a little more efficiently.

Before we look at some of the frameworks, we have to set the stage for why there are options.  When the latest mobile movement emerged during the release of the first iPhone there were limited choices on how you could produce your applications. Your only real option was Objective C; that was what Apple was pushing and all their SDK documentation and examples revolved around that..

Then Google got involved in the game, and everything their team produced and documented for doing development was with Java.  Of course some people were still dabbling with their Palm and Blackberry at this time, which would have their own set of tools and learning curve.

As time progressed, developers started getting a little tired of having to learn a new language and a new way of doing everything on each mobile platform. Frameworks started emerging claiming to be able to develop once and distribute to multiple platforms, allowing developers to focus on getting good at one thing and leveraging that knowledge across mobile devices.  The promise was that it was going to allow developers to focus on learning one thing well and not necessarily requiring them to be experts at Java, Objective C , JavaScript and other web technologies to get their startup or business apps rolling.

What’s the ultimate goal for cross-platform technology?

  • Focusing on learning one language well and leveraging that across different platforms.
  • Coding once and distributing to all the leading mobile devices.
  • Using your favorite programming language versus the language the mobile vendor prefers.
  • Not having to hire team members that have niche expertise and can’t be used across platforms.
  • Developing quality code faster.
  • Getting products to market faster.
  • Supporting current and future devices quickly.
  • Being happier.

Has this cross-platform development dream been realized?

Not exactly. There are still plenty of choices available and options that will get you some of the above but no Utopia yet.  Let’s take a look at some of the leaders in cross-platform, mobile frameworks and briefly review some of their benefits.  It’s always going to depend on what you are creating and choosing the right platform for your needs. But this list should help you get started with some research to help you choose.

Appcelerator – Titanium

http://www.appcelerator.com/
Appcelerator has been in the cross-platform space since 2006.  They originally had an application that was targeted towards making it easy to write desktop apps for both Windows and Apple.  They then changed their focus to work on building a tool that made it easier to program cross-platform mobile applications.

Titanium is their open source IDE/compiler. It allows you to write your mobile application using JavaScript syntax and tap into the necessary core libraries to create native mobile experiences.  With Titanium we have found that it’s not really a one-and-done workflow. There are still differences that needed to be accounted for when developing cross-platform applications.  For example, an iPhone really only has a home button. All app interactions must be programmed within the application. However, with Android there is a physical back button and other buttons on the keyboard that might interact with your application.  Specific situations still need to be accounted for when developing for both of these platforms.

Appcelerator also claims that their framework is supporting Windows and Blackberry, but from what I’ve read, it’s been mixed results and certainly isn’t a one click process to get your application running on those platforms.  Appcelerator has paid subscription options, but they still have a free, open-source version that has majority of what you need to succeed.  The biggest downside to Titanium is that you can’t access everything in the core frameworks.  Titanium tries to model and make methods available to you for the most popular device features, but unlike other options, everything is not available out of the box.  The good news is that you can always create a custom Titanium module that calls a core feature you need and include that in your project.

Xamarin

http://xamarin.com/
“Xamarin” has only been around for a couple years, however the team and technology behind it has been in the cross-platform industry for many years.  Before developers were concerned about cross-platform mobile apps they were concerned about cross-platform desktop applications.  Members of the Xamarin team were behind the very popular Mono project and later the MonoTouch project, which was acquired, spun off, and things happened… then poof: Xamarin.

If you are a Microsoft .Net developer, then you’ll know that Mono was the rogue project that worked tirelessly to keep the C# language running and available on Linux.  They know a thing or two about working with cross-platform technologies, and they are huge C# fans. Therefore, the programming language preferred for Xamarin is C#.  If you are a .NET developer this will probably be your favorite.  Xamarin has been excelling at building really cool cloud-testing tools as well. This makes it easier for developers to test their applications across a variety of different devices.

With Xamarin it’s not a build once experience; you can build core, shared libraries but do have to specifically tailor your project to a platform.  This creates a little more work, but is still nothing compared to developing an app specifically for each platform (Objective C / Java).  To utilize Xamarin for business, you are looking at around $2,000 per year for iOS/Android per developer.

RubyMotion

http://www.rubymotion.com/
To program with Titanium you use JavaScript and Xamarin you use C#, but with RubyMotion you use Ruby.  Developers often have a language that they enjoy working with more than others.  Each of these cross-platform frameworks are not only trying to solve the pain of building apps that work everywhere, but also to make developing mobile apps accessible to different developers.  For example, there are Ruby developers who have never programmed in Objective C, Java or C#. Or they found that they just don’t enjoy programming in those languages as much as they do programming in Ruby.  When that happens, someone gets off their butt and solves it.

RubyMotion came out of a passion for wanting to deliver Mac apps using Ruby. It’s as simple as that. Since that time, it’s grown in popularity and has gone from just supporting the Apple ecosystem to also supporting Android.  RubyMotion is also pretty cool because you can tap into any of the native APIs. Essentially, everything is available to you as a developer.  With a framework like Titanium the core native APIs are abstracted away; as a developer you don’t have to know what specific things are called in the iOS world or Android world. With RubyMotion it still feels like you have to have a complete understanding of both iOS and Android native APIs.  Pro – you can get at anything you need. Con – you still have to become more intimate with each of the device platforms.  Like I said, no Utopia,  but you do have to remember that all mobile devices are not the same. It’s still a huge win to be able to know one rogramming language inside and out and focus your efforts on learning specifics between platforms.  RubyMotion is very reasonable at $350/yr.

Unity – Game Engine

http://unity3d.com/ This is going to be the cross-platform option included in here that will be a surprise to many mobile developers. You may have never heard of it, or have thought of it exclusively as a gaming platform.  Unity is a really cool game engine that allows you to develop and deliver games on over 20 different platforms. We’re talking more than just Android and Apple here, think: Linux, Web, PC, Windows Phone, XBox, PlayStation, etc.

With Unity you have a lot of flexibility since it is a game engine with incredible graphics capabilities.  However, this is entering into a whole new realm of application development and often requires a far different set of skills and knowledge to succeed building applications with this strategy.  This would be an odd choice for building the majority of mobile apps that exist. But, it’s something to keep as an option, especially if you are making games!  With Unity you can sling C# or JavaScript.  As a professional you can get rolling with Unity for about $1,000 a year.

Cordova, PhoneGap and Ionic

https://cordova.apache.org/
http://phonegap.com/
http://ionicframework.com/

The last options I’ve included are Cordova, PhoneGap and Ionic Framework.  These are grouped together because they seek to solve the problem in a similar way, and both PhoneGap and Ionic are dependent on Cordova.

At the core this route is more like building a website that will run on a mobile device.  All of the front-end is actually delivered as HTML and JavaScript, but the experience is packaged and surrounded with the Cordova magic.  What this gives developers the ability to do is use their past web experience and create apps like they would create websites and then use specialized markup to access specific device features.  This would include gaining access to the camera, triggering a vibration and getting input back from the accelerometer.

You can accomplish a lot, very easily by going this direction with your mobile development.  It’s easy because you can leverage your teams experience with web development and put that to work for you with mobile applications.  However, I feel this route is the most limiting to the developer and the future of the mobile product.  You can really get boxed in by the types of features you can ultimately deliver since you are so abstracted from the core device APIs.

This route is going to be good if you have a very sound understanding of the application you are creating and all of it’s current and expected future features.  If you can with 100% confidence determine everything you need is do-able with this route, then go for it.   I, however, often have a fear that 6, 12, 24 months down the road I’ll get a feature request from a client that will seem like a common mobile feature or no big deal and get completely stone-walled by this approach to mobile development.  For that reason I’m pretty hesitant to do anything terribly complex with these technologies.  However, they are awesome for mimicking a set of website features on mobile or enabling a website to work offline via a mobile “app.”

The Winner Is?

Hah! There is never a winner when it comes to programming languages and frameworks.  The winner is the option you think will be best for you and your product now and into the future. It very well might be that the best option is to write Objective C or Swift for iOS and Java for Android, just because you’re awesome at those. Then you can learn C# if needed for Windows later.  The choice is yours, and that’s the beauty of it. You can weigh your options, you can choose and if you’re not satisfied with your options, you can always make your own framework! 🙂

Web Application Startup Guide

A 30-page ebook that covers positioning, marketing, pricing, and building your startup product, plus more.