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."

43 of 197 comments (clear)

  1. eh by Anonymous Coward · · Score: 2, Insightful

    I'd personally call them migraines.

  2. 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 Anonymous Coward · · Score: 2, Insightful

      And nothing irks me more than users of any system expecting everything to work exactly to same with all the bells and whistles attached. F-ME for being a web developer that's had to deal with the nightmare that was (and sometimes still IS) IE 6 and the fucking "it doesn't work on my iPhone."

      Sometimes, for production time purposes, and the rampant demands (re: bitching) of users, we have to take fucked up shortcuts to make things get done.

    3. 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.

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

      Too many youngsters who've never encountered "portability" concepts before? Are we going to get yet another push for a one-world-os just so people don't have to think so much?

    5. Re:If you're gonna do it, do it right by Anonymous Coward · · Score: 2, Insightful

      Please spare us your software entirely in future then.

    6. 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
    7. Re:If you're gonna do it, do it right by kaladorn · · Score: 2

      Yes, there are some key differences.

      On the other hand, when peole talk about not being able to write portable code, that's generally only true with some particular portions.

      For the most part, the sorts of interactions available on touchscreen devices are similar. If your code accomodates that in a sensible fashion, the details of the particular language or smartphone API particulars should only constitute a limited portion of your app which is truly distinct from OS to OS.

      If this isn't the case, you are making some architectural mistakes.

      I'd also like to say apps that don't follow platform UI guidelines should be scorned. It's okay if the platforms eventually lean towards one another (much like OpenGL and DirectX did) but whatever standards a device supports should be implemented. Doing something different just because you can or its easier for the coder is a pretty crappy way to write software.

      --
      -- Mal: "Well they tell you: never hit a man with a closed fist. But it is, on occasion, hilarious."
    8. Re:If you're gonna do it, do it right by mgblst · · Score: 2

      No, it will not kill them, but it may mean it takes an unacceptable amount of time to do, and cost way to much.

    9. 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.

    10. 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
    11. Re:If you're gonna do it, do it right by BVis · · Score: 2

      No, it encapsulates what's wrong with project management in this industry. Failure to manage customer expectations and setting insane production deadlines isn't the developer's fault, it's the fault of the management layer that *should* be between the client and the developer.

      Of course, in an ideal world, there would be someone there. There frequently isn't, or there's someone so ineffective there that it's *worse* than nobody being there. In those cases, the developer should be looking for a better job.

      --
      Never underestimate the power of stupid people in large groups.
  3. 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.

  4. 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.

  5. 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. :)

  6. The Horror: Competition by yeltski · · Score: 2

    This is most horrible! Interfaces are competing for usability and user experience and you target one platform at a time and pay attention to detail and nuance at that!

  7. 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!
  8. So? by slapout · · Score: 4, Informative

    Success requires effort. Nothing new here.

    --
    Coder's Stone: The programming language quick ref for iPad
  9. 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?

  10. Re:Not that bad by t00le · · Score: 2

    Apple can reject your app for any reason they seem fit, whether right or wrong. We have written a handful of apps that are on the market with RunRev, three were approved without issue and two were rejected.

    --
    When the only tool you have is a hammer, every problem looks like a nail
  11. 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.
  12. Re:Not that bad by icebraining · · Score: 3, Informative

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

  13. 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.

  14. 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.

  15. 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
    2. Re:Thank You by Penguinisto · · Score: 2

      You can get away with it if you build a custom UI with a solid cross-platform language/API geared for UI work (Qt stands out as an example on desktops - not sure how good it is in the mobile realm), or you can get away with good results if you write your own UI from scratch.

      OTOH, trying to write for one platform's little UI esoterics (even if you're trying to avoid them), then trying to graft all that onto another platform? Yeah, that'd end up leaving a gap 10 miles wide in most cases.

      Like you said - it's possible, but the vast majority of developers - both amateur and pro alike - don't frickin' bother beyond 'good enough', and the results usually leave plenty of room for improvement, which a single-platform native developer can take advantage of.

      --
      Quo usque tandem abutere, Nimbus, patientia nostra?
    3. Re:Thank You by GauteL · · Score: 2

      It is impossible to prove that something is impossible, but I'd you're right, it should be easy for you to find examples of cross platform mobile apps that are as good as natively developed ones.

  16. 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.

    2. Re:Mobile? by FlyingGuy · · Score: 2

      ahhh yes do I reply or do I mod... Damit!

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

      You may pray but your prayers wont be answered. Well they might, but I seriously doubt it. The problem with whole web thing is that it is stateless. It is really as simple as that. There are tons of kludges to try an imitate a statefull connection but they are all hap hazard and only barely effective. The other problem are actual data aware components. Sadly even html5 does not address this. There should be a control type that accepts a mask like almost every U/I control built into every OS be it, windows common controls or its equivalent on a mac. There should be grid controls that handle data sources directly.

      Sadly none of what is really needed is there. There should be a mode to simply ignore CSS and have things all X,Y addressable and don't act like you are trying to re-paginate a word processing document every time the window is re-sized. The most successful company thus far at leveraging every bit of the capabilities of a browser is sales force and I am here to tell ya there stuff looks pretty rough around the edges.

      What needs to happen is that the DOM needs to be fundamentally redesigned to a true object api that instantiates controls and what not. A great example is the OWL api.

      --
      Hey KID! Yeah you, get the fuck off my lawn!
    3. Re:Mobile? by aztektum · · Score: 2

      Until wireless carriers stop nickle and diming for data, apps are going to be the way of the foreseeable future.

      Install all you want on wifi, it keeps data tx/rx needs smaller while on the go.

      --
      :: aztek ::
      No sig for you!!
  17. Xamarin Monotouch and Monodroid. by Anonymous Coward · · Score: 2, Interesting

    This seems to work pretty well across platforms. Fast native compilation to binary same as C++ (NO JIT) via LLVM on both Android and iOS. Full access to the native API's. A pretty nice generational partially copying gc. XNA and OpenGL across all platforms. Full source debugging and profiling on all devices and simulators.

    Only problem is that full binary compilation breaks some standard libs that depend on using the JIT, some occasional bugs, and I'd personally prefer to see the device API wrapping fully open sourced along with the rest of the base platform. Overall not bad though.

    1. Re:Xamarin Monotouch and Monodroid. by Anonymous Coward · · Score: 2, Informative

      (posting AC since I moderated a couple earlier posts)

      Indeed, using MonoTouch and MonoDroid sound attractive. Even if it isn't perfect or you don't get full API coverage, at least (most of) your core app functionality could have a single codebase for most platforms (from mobile to desktop and web), and then just code the UI/platform specifics.

      MS would be wise in helping the Mono project grow, increase the level of API support on more platforms (ie, at least to the level of the Compact Framework), so they can outgrow Windows, and embrace and extend most mobile platforms nearly overnight. They would still benefit from controlling the main framework on Windows, but would provide a viable interoperability path with other platforms (for better user experience).

  18. 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.

  19. Oh please by trevdak · · Score: 2

    I work at a mobile technology company. While our focus is more on WAP and shortcode stuff, we do a number of applications for iPhone, android, windows mobile, and blackberry. You know why it's not a headache? Because everyone involved knows to treat each version for each OS as a whole new piece of software. You rewrite the UI from scratch according to what works best with the phone, recycle the web services, and charge the customer for each app on each platform.

    No, you want a nightmare? Imagine you had to write one app that compiled and worked on an Android, iPhone, windows phone, and blackberry. Then you're dealing with the headaches of a web developer.

  20. 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

    1. Re:My experience differs from yours. by xombo · · Score: 2

      PhoneGap still imposes the security model that other applications support. For instance, you can inform users that it collects GPS data and Address book or forgo support for that plug-in entirely. They support this both with manually building it via the Android tool chain as well as through PhoneGap Build service. Reason being is that the API for PhoneGap is just communicating with native code underneath to access things like GPS and address book, requiring the permissions model all other Android apps use.

  21. Re:lol, cry more, noob by gatkinso · · Score: 2, Insightful

    Who said it was hard?

    What it is, is a royal pain in the ass. So where is your unified API that wraps all of the Android, Kindle, iOS, and Windows devices allowing a body to write once and deploy everywhere, having said app look and act like a native app?

    Oh, that's right. I should have figured: up your ass. Right there beside your head.

    --
    I am very small, utmostly microscopic.
  22. I don't care about BEAUTY by SuperKendall · · Score: 2

    Not everything is about beauty

    I don't care a whit about beauty. What I care about is USABILITY. That app (like so many other enterprise apps have worked with) was built by a bunch of people who didn't have to use the damn thing day to day. I didn't say anything about the widgets or color or anything. I just said it was not a very usable application and that could be improved.

    I, like so many other enterprise developers, had to work with what people were trying to design but also listen to the complaints of the people on the front line really using the software. It's amazing how little THOSE two groups end up really talking, even when in theory there is someone in part of the development process representing their interests... but it's almost always a manager who again doesn't REALLY know where problems are or what would make things better.

    You make me remember a Mac supremacist and how I embarrased him when he bragged about his new macbook G4 back then

    You remind me of every wanker I ever worked with who didn't care about people who used the software we wrote. God I detested those people. Utter wastes of a chair.

    BTW, If you brag about so heavily about your work

    It's not bragging asshole. It's telling you what real life experience I have had with the issues at hand. I am passionate about this because in any context (mobile or not) the software industry COULD be doing a way better job designing software built to meet users needs but instead all to often is merely the bitch of business groups who have total say over how something comes out, and your video frankly brought out PTSD style flashbacks of some of the horrors that came out of that process.

    You can defend it all you like but every single person on earth who has developed software for the enterprise more than a year knows I am correct.

    You may have the last reply; I see no need to someone hell bent on pushing people into using unusable software even when better could be had.

    As for examples that prove my case, simply look at any large data visualization or data entry app like Salesforce Viewer on the iPad... SInce all of my work is pretty much client work (I am an iOS consultant) I cannot point to it directly, either because it's not public or it's not polite to build and tell.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley