Slashdot Mirror


The Headaches of Cross-Platform Mobile Development

snydeq writes "Increased emphasis on distinctive smartphone UIs means even more headaches for cross-platform mobile developers, writes Fatal Exception's Neil McAllister, especially as users continue to favor native over Web-based apps on mobile devices. 'Google and Microsoft are both placing renewed emphasis on their platforms' user experience. That means not just increased competition among smartphone and tablet platforms, but also new challenges for mobile application developers. ... The more the leading smartphone platform UIs differ from one another, the more effort is required to write apps that function comparably across all of them. Dialog boxes, screen transitions, and gestures that are appropriate for one platform might be all wrong for another. Coding the same app for three or four different sets of user interface guidelines adds yet another layer of cost and complexity to cross-platform app development."

24 of 197 comments (clear)

  1. If you're gonna do it, do it right by s73v3r · · Score: 5, Insightful

    If you're gonna do cross platform app development, at least make the effort to follow the platform's UI guidelines. As an Android user, nothing irks me more than having an app with the iOS icons and navigation buttons simply copied over. I'm sure the same is true for users of other platforms.

    1. Re:If you're gonna do it, do it right by s73v3r · · Score: 4, Informative

      No, I want people writing apps for my platform to be following the platform's guidelines. It's not going to kill them, and it makes the experience better for everyone.

    2. Re:If you're gonna do it, do it right by thegarbz · · Score: 4, Informative

      In theory maybe, but in practice the phone's UI is an open canvas for developers.

      There's no way of writing code that is portable between iOS and Android. If for no other reason than the different programming languages, there's also capabilities and methods used on one system which are not appropriate for the other. I.e. iOS typically places a back arrow on the top left of the screen, Android devices typically have a dedicated back button on their phones.

      The problem is we expect apps to perform consistently on our platform. This requires the design guidelines for the platform are followed.

      Realistically given how you need to recode your app in a different language there's no reason a developer shouldn't simply adjust their app in the process to meet the design guidelines.

    3. Re:If you're gonna do it, do it right by Anne+Thwacks · · Score: 3, Informative
      No! its you that that is not doing it right!. If I have an xPhone, the apps that run on it should comply with the xPhone UI. I don't give a toss If the same app works on a yPhone, or what it looks like when it does.

      Hopefully, the UI is implemented in the OS in both cases anyway, and all I have to do is call an API to get/put information to the user.

      --
      Sent from my ASR33 using ASCII
    4. Re:If you're gonna do it, do it right by beelsebob · · Score: 3, Insightful

      No, that's exactly how bad cross platform apps work. Good ones code the back end once, and have a different UI module for each platform interfacing onto it.

    5. Re:If you're gonna do it, do it right by TheRaven64 · · Score: 4, Insightful

      There's no way of writing code that is portable between iOS and Android

      There are several ways. If you want something using exactly the same codebase, companies like Adobe will sell you development platforms that wrap the native APIs and give you something that doesn't quite look or feel native on either. A better approach is to use GNUstep-base to provide an implementation of the Foundation framework on Android and then rewrite your UI for each platform but share the model code.

      We've been through this before with desktop apps. If you want a good cross-platform application, make sure that your code uses a very clean MVC separation and rewrite the UI part for each platform. Otherwise you end up with something that, at best, only behaves well on one platform, and at worst feels wrong on all of them.

      --
      I am TheRaven on Soylent News
  2. One app to make, multiple to purchase by phikapjames · · Score: 5, Insightful

    The one thing that irks me a bit about this whole situation is them complaining that they just can't write the code once and have it work across the different platforms, yet I'm still required to buy the same software separately on each platform. In my mind, you justify the cost to make it work for that platform by selling it on the specific platform. My opinion would probably be different though if I was able to buy the app once and not have to pay on each separate platform.

  3. Advice by ackthpt · · Score: 4, Interesting

    Keep it simple, Stupid

    I'm developing an app which can be run cross-platform and/or mobile. Turned out to be a giant nightmare when looking at user experience on a tablet or smartphone. So .. I bailed on anything whizzy and went back to finding the basic html and javascript to get things done -- look and work consistently on multiple platforms and also be visible in sunlight (something a lot of apps fail miserably at.)

    --

    A feeling of having made the same mistake before: Deja Foobar
    1. Re:Advice by thegarbz · · Score: 4, Interesting

      So you're coding in the most inefficient way for each device to run your app then?

      I feel for you. Your problem has been experienced by many who don't wish to rewrite that Objective-C app in Java, don't want to maintain two packages on different platforms without common bugs, and don't want to re-design your app so that on iOS it has a back button in the top left while on Android it obeys the hardware back key.

      However before you continue I suggest you look at the ratings of apps on each market that are written in the way you're suggesting. Inconsistent with the native UI of the platform makes the app look .... cheap. An app that runs in HTML / JS is inherently incredibly slow compared to a native app which further upsets the user experience.

      If you want to write a 5star app you'll likely need to abandon any hope of cross platform compatibility and simply code from the ground up for each platform.

    2. Re:Advice by xombo · · Score: 4, Informative

      HTML5 supports offline caching of files as well as the SQLlite datastore, so you can provide a fully offline experience for users and even sync back with the server when a connection is available.

  4. HTML5 & Weever Apps by Anonymous Coward · · Score: 3, Interesting

    In the meantime, cross-platform, easy-to-develop HTML5 app frameworks are showing astonishing growth. In the least week alone we've seen three new Javascript + HTML5 frameworks released. And while it take consumers some time for consumers to get wise to the AOL-like 'we are the only (mobile) web' branding that Apple has established - the marketing advantages of one app that works across all touch phone and tablets and is actually affordable is pretty undeniable today - especially as web-app technology continues to mature.

    At Weever Apps (disclaimer, I'm the lead designer) that's the goal: disrupt the expensive, case by case, walled garden model and produce useful apps that actually meet the end-goals of most organizations. We started as a couple of not-for-profit oriented programmers that just couldn't stand how bad the current mobile/web/app situation was out there - our clients couldn't afford a proper mobile experience for their constituents, and that pissed us all off...

    Today, we've grown. We've hooked into amazing, established open-source web technologies like Wordpress, Joomla! and Drupal, created an open API and new RSS spec (RSS3 for semantic/web relationships, find it on github) and basically proven that web innovation can outpace mega-companies - we know this, because we're doing it and winning over former native-app clients. And are *web* apps are still affordable, useful and *accessible* to the at least 3/4 of companies that haven't 'gone mobile' today because of a combination of cost, utility and just sheer confusion with all the per-platform options out there.

    Check out "Why I make web apps" by our lead programmer Rob Porter:
    http://webweaving.tumblr.com/post/15651092883/why-do-i-make-web-apps

    Or just get a free app at http://weeverapps.com if you're interested. We're new and still adding lots of features - but I can confidently say that we're proving that there are better ways than the status quo to add value to the web and mobile - and we're not the only ones doing it. :)

  5. Re:lol, cry more, noob by TheCouchPotatoFamine · · Score: 4, Interesting

    well.. not strictly true. IIRC iOS and android are both converging on (or already have) a view-based hierarchy... the way god intended. Personally i hate the signal-and-slots or win32 methods versus the DOM/events methodology - even if HTML's take on it is a little sprained... however, when i look at iOS, i see the DOM/event pattern, just without the xml (for the programmer, anyway, it's right there in the NIB..)

    --
    CS majors know the time/space tradeoff, but they never get taught the 3rd, crucial, tradeoff of the set: comprehension!
  6. So? by slapout · · Score: 4, Informative

    Success requires effort. Nothing new here.

    --
    Coder's Stone: The programming language quick ref for iPad
  7. Re:The past repeating itself? by viperidaenz · · Score: 3, Insightful

    I wonder what it will take to "unite" them

    Nothing. They dont want to be united. The "app" ecosystem is a competitive advantage for the OS. If all the apps are available for all the platforms, its no longer an advantage. Where do you think the "There's an app for that" slogan came from?

  8. yeah, and...? by DynamoJoe · · Score: 3, Insightful

    So platform diversity is great until you have to code for it? I'm not seeing a problem.

    --
    bah.
  9. Re:Not that bad by icebraining · · Score: 3, Informative

    They changed that policy in late 2010. http://daringfireball.net/2010/09/app_store_guidelines

  10. Follow proper MVC development and save time by hsmith · · Score: 5, Insightful

    I built a rather extensive commercial App on iOS. By abstracting the data/business layers well, when going to android it was as simple as writing a lexer to convert almost all the code. What took me 1000 hours of development took 8 hours to port over.

    The only thing that was really required was writing the UI, which was targeted for Android.

  11. And you know what else irks me? by R3d+M3rcury · · Score: 3

    All these people speaking different languages. I mean, like, the French have a different word for everything! It means I have to have hire somebody who speaks some stupid language if I want to sell my software to them. Why can't we just have one language--English, obviously, since that's what I know? It would make my life a whole lot easier and I wouldn't have to spend money translating my software and adjusting dialog boxes for those damn foreigners!

    And don't even get me started on Unicode!

    In case you're missing it, the above is sarcasm. But it leads into an interesting point. How many times have you heard someone complain about having to deal with someone on the other end of a support line for whom English is not their native language? About having to dive through some weird accent in order to understand what they're saying? It makes customers not want to call their support line, right?

    Similar thing here. I want an application that speaks the language that the OS developers have defined and that I have learned by using countless other apps. While, ultimately, it's about what your app does, if I have to choose between an app that has a native interface and one that does not, I will choose the native interface. Just like if I have choice between speaking to Ken in Minnesota or Pruthvij in Delhi, I'd probably choose Ken (at least until I discover that Ken doesn't know his ass from his elbow).

    Want a write-once run anywhere app? Make it a web app. I use plenty of those on my iPhone.

  12. Thank You by SuperKendall · · Score: 4, Insightful

    As an iOS developer, I heartily thank you for continuing to use cross platform development solutions that leave such a wide gap for someone to come along and write a better native app.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Thank You by t00le · · Score: 3, Informative

      A huge portion of our applications now are enterprise class crm solutions, so easy portability to multiple platforms is something we offer as a courtesy. There is always an officer or VP that must be that special snowflake that requires Apple support, even though the other ten thousand people use Linux or Windows.

      We have Amazon EC2 services and simply need front ends for access, manipulation, reporting, etc. We have little to no need to have really amazing, shiny and pretty interfaces. Between ICS and iOS 5.x we have almost identical user interfaces with nice transitions and pleasant looking graphics. The thing that matters is speed of access to S3 buckets and read/write access to EC2 clustered databases. The nice thing is we can compile to Linux, Windows, almost all mobile platforms and have almost identical user interfaces. Instead of spending copious amounts of time on one platform, we create portable interfaces that are nice, fast and compile on just about anything, even the magical over hyped/marketed products. :)

      Cheers

      --
      When the only tool you have is a hammer, every problem looks like a nail
  13. Mobile? by slasho81 · · Score: 4, Insightful

    This should have been: The Headaches of Cross-Platform Development. It's not just a mobile thing. Today, if you're developing any kind of client-facing software then it's not just Android vs. iOS vs. WinPhone vs. BlackBerry. It's also PC vs. Mac vs. Linux. with IE vs. Chrome vs. Firefox vs. Opera. And of course, all of these on different devices with difference capabilities, most notably different screen sizes and input methods, and deployment options. So much wasted time and effort.

    We were on the right path with webapps for a while, but then suddenly native apps became all the rage. The worst "feature" by far of native apps is they have to be installed - the deployment issue is practically gone with webapps, but contained apps let you charge people for installation, so we went back to that.

    I pray HTML5 manages to become a capable and dominant platform for the sake of both users and developers.

    1. Re:Mobile? by ceoyoyo · · Score: 5, Insightful

      Webapps are like cross platform apps, but on top of that they're crammed into a medium that was never meant for them, so instead of being just non-ideal they truly suck.

      The only people who like web apps are the ones who don't have to use them (managers) and people who liked the idea of being able to get their e-mail anywhere, before everyone started carrying smartphones with... a native e-mail app.

  14. Re:Not that bad by tlhIngan · · Score: 3, Informative

    Can't Apple reject your app if it has been written in or translated from anything but Objective-C?

    It's not a rejection criterion anymore. Apps can be coded in any language (including Flash), with the exception that no external code may be downloaded. C++ was always accepted, but JavaScript, Flash, C# are all acceptable.

    The general method is to stick all your core logic in a C++ module and then interface to that the UI code. Then cross platform porting involves rewriting the small UI core. Obj-C can call C++ objects trivially (native function call). For Android, it's done through JNI, but supported via the NDK. For Windows Phone, it's a bit more difficult since the core may need rewriting in C#.

    iOS encourages MVC development, and doing it properly means it can be trivially ported.

  15. My experience differs from yours. by tlambert · · Score: 4, Informative

    It's been my experience that you have a lot more control if it's a phonegap wrapped native app, than a browser app.

    My experience differs from yours.

    In my experience, phonegap provides JavaScript extension based access to information local to the phone without any controls on its use by a third party, by subclassing UIView and then going to a web page. This includes but is not limited to location information, any history files you have, your contacts, and anything else available to a sandboxed application.

    If the software isn't intentionally malicious in the first place, the app developers tend to suck off all your information into their database with no malice, but with about as much thought to security as you would expect from someone who was unable to limit themselves to uploading only the information relevant to the running of the application. That is to say, very little.

    Given the lax security already apparent, the sites that show up in the UIView are typically changed by malicious third parties in order to trigger redirection to a site that does then pull the information off for malicious reasons. Whether that's because the originating site's phonegap App web page was attacked through one of any number of security holes which the app developer already proved themselves incompetent to protect against through their use of phonegap in the first place, or it's done via DNS cache poisoning, links in forums in the applications, or a dozen other ways isn't important. What's important is that everything that phonegap exposes to JavaScript is now exposed to the malicious third party.

    I understand the reasoning behind phonegap. It unfortunately doesn't apply in an unsafe world.

    I hope that people who would perhaps want to use phonegap understand the security implications, and the fact that if you're caught using it, you get kicked off the Apple App store for exposing those APIs to third parties whose URLs happen to get displayed in the UIView on your web site, for whatever reason.

    -- Terry