Just like the desktop and web development ecosystem, the mobile application development world is typified with different frameworks for writing native and non-native apps. For the iOS operating systems, there is very limited choice as Apple restricts developers to writing iPhone applications in Objective-C, C, C++ or JavaScript as executed by the iPhone OS WebKit engine. Apps must be originally written in one of these languages and may only use Documented APIs in a manner prescribed by Apple. Only code written in Objective C, C, or C++ may compile and directly link against the Documented APIs. These requirements automatically exclude the Java programmer from the iOS market. Do I plan on learning C or Objective-C for the sole purpose of writing iOS apps? Sure, I will when the Satan repents and apologizes to Allah for all his misdeeds. J
According to an article written by Zonski for ZenJava, it is now possible to run JavaFX on iOS using RoboVM. That’s an excellent news innit? (in Wayne Rooney’s accent). Now check this out:
- You need to be running on a Mac – this won’t work on anything else.
- You need to have XCode installed: https://developer.apple.com/xcode/
- You need to have a recent version of the Java7 JDK (7u9 or later)
- You need to have Maven 3.0 installed: http://maven.apache.org/download.cgi
- You need to have JavaFX on your classpath, so use the JavaFX Maven plugin
- Currently there’s no automated way to generate an app bundle for the app store.
I’m bothered only about the first point. So, to develop apps for iOS, I first need to purchase the unnecessarily expensive MacBook? This is what the Hausa speaking people will refer to as “Magana banza kawai. . .!!!”
Android apps can be developed using Java. Good news eh? The Java programmers need not learn new coding syntax or conventions. It’s a seamless transition between the coding styles of desktop and web app that he/she is familiar with to the mobile space. There is an SDK plus an Eclipse IDE plugin that should help you get started. As you may be aware, your apps will only run on Android enabled devices.
The RIM OS development environment also makes the Java programmer feel at home. To write apps for Blackberry phones and tablets, you really don’t have to learn anything new. There is a Java Development Environment (JDE) that makes development and deployment seamless. Again, as you may already know, your apps will only run on RIM OS enabled devices.
Windows Phones? In my opinion, app development for Windows OS enabled devices is the most unpopular sphere of mobile app development ecosystem. Microsoft must have hoped the Windows mobile OS would be embraced by hardware manufacturers like HTC and Samsung as they did for Android which I guess broke a few hearts in Redmond. Nokia dominates Windows phone with over 80% of the market share, a statistic that worries Microsoft executives.
To make matters worse, the New York times reported that Nokia is working on building its own Android devices which paints a very bleak future for the Windows Mobile OS. Little wonder why the Windows mobile store is not as popular as Google Play and Blackberry World as Nokia Lumia is the only phone running the Windows OS that I have set my eyes on.
This in my opinion is one of the reasons why there are few Windows phone developers. Anyway, to develop apps for the Windows mobile OS, C# and Visual Studio is all that is needed, meaning the Java programmer is excluded.
A Case for Cross Platform Mobile Development Paradigm
I remember the late 90s and early 2000s where Java ruled the desktop world. Though Java applications were, in my opinion, not as good looking as the ones developed in Visual Basic and the likes, they still ruled. Why? Java thrived mostly, amongst other reasons, because of its platform independent nature where code is written on Windows, Mac or a Linux Box and the resulting application can be executed on any operating system where the JRE (Java Runtime Environment) is installed. Now, to develop apps for the four operating systems discussed above, it means the programmer needs to learn Objective-C, Java and C#. Is that really necessary?
Imagine you are watching a stage play titled “Blackberry” and it’s the play is in its last scene. After that scene, the play ends and there was an announcement that that play will be the last organized. Indirectly, it means the careers of all actors, cameramen, lights men, props men and other hands that worked on the play also ends like the closing curtain signifying the end of the play. To make matters worse, these “hands” do not know how to service any other kinds of stage performances except the ones put together by the company producing the Blackberry plays.
Now imagine Blackberry is dead. Their phones and tablets are not as popular as they used to be. For developers writing commercial apps only for the RIM OS, what will be the fate of their products and clients? Will the developers now expend more human and financial resources to write ports to other platforms?
Shouldn’t the Blackberry experience shape our approach to learning how we develop apps for the mobile space? Should schools of programming continue to teach app development for targeted mobile operating systems or adopt the cross platform paradigm in their curricula? Should we, as programmers continue to rely on official SDKs and libraries released by companies or community supported SDKs?
With the cross platform paradigm, applications can be deployed to any of the operating systems discussed above from a single Java codebase. There will be no need to learn C or Objective-C to deploy your apps to iOS enabled devices. No need to learn C# to deploy to Windows 8 enabled devices. Even if Blackberry folds up and their devices become unpopular, no extra effort is required as the same code written for one operating system can be compiled for others. More time, energy and resources is also saved.
For companies, this paradigm will help achieve a lean staff structure as there will be no need to hire developers for different mobile operating systems thereby saving extra resources. This is a good thing for small startups.
Personally, I use the Codenameone to develop my apps for all mobile operating systems. The coding structure is almost similar to Swing which made learning easy for me. Note that Codenameone apps are not HTML5 apps running in a WebKit, they are completely native in nature. They have the same behavior as other apps written with the official SDKs of the operating systems they run on. Codenameone also comes with a DnD visual designer leaving you with just the business logic to bother about. It also comes with a theme designer giving you the full power to control the look and feel of your apps. Native themes of target platforms can also be inherited. Here is a video of one of my apps with Codenameone. It’s the first and only mobile app for the African Youth Charter. It’s also available in Google Play and Blackberry World.
[youtube=http://www.youtube.com/watch?v=kZxnYL-UrpU&w=560&h=315]
It’s not all Java. There is a C# option as well even though deployment targets only Android and iOS but it’s definitely worth playing with.
Finally, just as I do not believe AJAX and HTML5 apps can replace desktop apps (discussion for another day), same way I do not believe Sencha apps and other frameworks that runs from a phone’s Webkit can replace native apps. It’s native all the way . . .!
I rest my case.
BlackBerry already dug their grave. I still wonder how they want to compete in the market.
Besides, Bro! You’ve been an inspiration for me indirectly. Your Javalove moniker on NL has been. I’m a student of Computer Engineering, 200L though but I’m already feeling a lot from you. I would like to meet you somedays.
Jazakumullahu Khairan