Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am in the very beginning of developing an app / desktop program. I want it to be cross-platform and possibly also as a tablet version (preferably Android Icecream sandwich). Note that I need to run it offline.

I thought about the following approaches:

  • ADOBE Air, since I do not need much performance. Plus I did some web programming in the past which might be of some use. Afaik it would run on OS X and Windows and should run on mobile OSes, too.

  • Qt. Found some nice Qt based desktop recently and read it also works on android. Plus I like the SDK.

  • HTML5 / JS. Again my web background should help me here. I wont need no sever side scripts, thus it should work without installing anything but a browser. How easy could this be converted into an Android app?

There might be a plethora of other (better) ways to do it, but I haven't thought of them yet. Can you help out? How would you create such an application. Would it be better to do some pure desktop client and then create tablet versions?

Would you rather start to create a website and worry later on how to turn into an app?

share|improve this question

closed as too broad by gnat, GlenH7, MichaelT, Kilian Foth, Bart van Ingen Schenau Sep 22 at 11:41

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I've been working with HTML5 and Java on some proof-of-concept type ideas. I've found working with Eclipse and other open source tools a bit painful after working with Microsoft .NET products for so long. I'm considering buying and using Sencha Architect but I've got to get that one approved. –  jfrankcarr Jun 9 '12 at 16:34

3 Answers 3

  > HTML5 / JS ... How easy could this be converted into an Android app?

You can develp with html5/js and wrap this app into a native mobile app using phonegap

share|improve this answer
1  
I'm not sure that phonegap is the final answer but writing apps in HTML5/JS with a native device interface layer is going to be the future of cross platform development. –  tzerb Jun 9 '12 at 16:37
    
What would you recommend as way to store data locally then? SQLlite? –  hans0l0 Jun 10 '12 at 10:58

Desktop and touch centric mobile/tablets have different UI paradigms. If you want a usable application across platforms, you'll need to write UI that looks good on each platform.

Problems you'll encounter with desktop apps would be things like keyboard shortcuts, colour schemes, ui/widget conventions. You could use multiplatform libraries, but there'll always be some quirks here and there. You definitely don't want your app to look or feel foreign. You'll need to look at how to do installation across the many desktops. If you're using things that require admin privileges within your app, things can get more complicated.

Once you get into mobile the UI paradigms and best practices are different. So you might end up being stretched thin. Focus on one platform. Get it working well with a mind on portability. Separate the UI from logic. Once it's good and working on one platform, then spread out to other platform.

share|improve this answer
    
indeed useit.com/alertbox/repurposing.html –  jk. Jun 11 '12 at 8:52
    
Wow @jk. , thanks for the link. It was a good read –  gorengpisang Jun 11 '12 at 9:35

In my experience, even frameworks that are "compatible" with both the desktop and mobiles typically suffer from the click/touch impedance mismatch. Briefly described, this means that your UI will either be easier to use with a mouse or with a touch screen, but not both. I have never seen a generally-useful framework that can automatically make a UI that is great on both click and touch interfaces.

My recommendation would be to use a programming language that works on all desired platforms; code any business logic (the "model" and "controller" parts of the MVC pattern) so that it will work identically on all the platforms; and then create two separate "Views" (GUIs) that are optimized for the experience of the targeted device.

You can do this with Qt; you can also do this with desktop Java or with HTML5/JS.

Taking the Qt route, I'd say write a normal QtGui interface for the desktop, but for Android you'll probably want to look into Qt Quick for a more touch-enabled experience. Not sure how stable / production-ready this is though.

Taking the Java route, you can use large swaths of the J2SE API for your business logic, but not all. I'd say develop your business logic targeting the more-limited Dalvik VM so any issues immediately obviate themselves (use Eclipse ADT and make it target the Android API). Write the UI using Android's native GUI library. Then lift out the business logic classes, drop them in a new desktop J2SE project, and write a SWT or Swing GUI for the desktop.

Taking the HTML5 route, you MIGHT be able to write one app that works well for desktop browsers and mobile browsers alike, but it largely depends on how dynamic you want your app to be, and what resolution you target. If you want to forget about phones (which have a much lower resolution than tablets or desktops), this may be your best bet. My experience using an Android phone on most HTML5 websites is that it requires tons of zooming and scrolling because they're desired for a larger screen. I really dislike that, so I end up looking for the "m." subdomain, which is pretty much the standard way that companies present their mobile site for small screen users. It's not a bad idea to go that route if you care at all about smartphone users.

Here is a Youtube video of someone with a Mac using Eclipse to create a HTML5/CSS app for Android. http://www.youtube.com/watch?v=uVqp1zcMfbE

share|improve this answer
    
It's important to note that Google is recommending against using m. style sub-domains. See googlewebmastercentral.blogspot.com/2012/06/… –  jfrankcarr Jun 9 '12 at 16:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.