Monday, January 11, 2016

Thoughts on mobile app prototyping

I`ll discuss two questions

  1. Why it is so hard to create good cross-platform mobile app.
  2. Why it is hard to take the leap from prototype to real app, without re-coding.

Why it is so hard to create good cross-platform mobile app.


All the solutions for cross-platform apps try to use pre-exiting technology for cross-platform development. The most popular is Html5.  The next one is Xamarin (C#).
Sadly this solution is sub-par, as app development uses 3 "modules", and sadly, most don`t cover them.

  • The Programming language itself(Object-C , iOS)
  • The controllers and layout library (buttons, input-text, time-picker, page-transitions, menu-drawers)
  • System libraries like browsing-contacts, changing-contact-ringtome, play-music, take-a-picture

It will be clearer, we we go over the current solution:
Html5 + Cordova/phone-gap


  • Programming language is Java-script. Code will run on an internal-browser( WebView) [good]
  • Controllers and layout use Html/Css based , as desktop controllers/layout don`t work well out-of-the-box there are libraries which re-implement them like Ionic, Jquerymobile, but both don`t cover all the components, for example: date-time-picker is missing (mobi-scroll can cover this for a price), map location is bad . page transitions are slow. [bad- clearly sub-par components ]
  • Cordova create native-code wrappers around some of the system-libraries, and you can write new ones, but it actually means that for non-trivial things, you will have to write quite the code yourself.
C#/Xamarin
  • Programming language is C#. On Android is is run in an interperter, on iOS compiled to native code.
  • The controllers and layout are Xamarin`s . They are not exactly like native, and sometimes look bad (time-pciker android version as an example). transitions look good, as performance is better.
  • Again, native-code wrappers, with limited system-library usage. The wrappers here are better, and usually expose more details than the js version, but still not all are exposed.
Corona labs (used for mobile games
  • Programming lanaguge is C++ (natively supported) or internal scripts
  • There is no real need to controlelrs/layout, so they are not really supported. Games UI is different.
  • Limited Native code wrappers


Is there another way?
Currently no, but let`s discuss an "invented" one.  Assuming there is a close-correlation between the controllers and the layout of iOS and Android, can't we define it in one language ('xml') and compile it to the other languages?
Can't we write code in one langauge (simplified java/js like, with only if,loops and no special stuff) and generate java/object-code from it?
System libraries are pain, is there a way around them?





No comments: