6

I am aware of the PhoneGap toolkit for creating mobile applications for virtually all mobile platforms with a significant market share. However, the code in PhoneGap that is shared between the different platforms is written in JavaScript. While I like JS, I think it's hardly appropriate for computationally intensive tasks. The situation with Titanium is pretty much the same.

So, is there any way that I can create a cross-platform mobile app that has the computationally intensive code shared between the platforms?

Some context: Obviously, I don't want to implement the time consuming algorithm in many different languages, since this violates DRY, increases the chance for bugs slipping in at least one version and require boilerplate code to work.

I've looked at Xamarin's MonoTouch and Mono for Android tools, but while they cover iOS and Android, they're not nearly as versatile for deployment as PhoneGap. On the other hand, (IMO) the statically typed nature of C# is more suited for intense computation than JS.

Are there any other SDK/tools appropriate for the task that I don't know about or a point about the mentioned above that I've missed?

Also, uploading data to a web service for processing is not an option, because of the traffic required.

closed as off-topic by user22815, jwenting, Thomas Owens Mar 21 '17 at 14:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to find or recommend tools, libraries, programming languages, resources (including books, blogs, tutorials, and examples), or projects to undertake are off-topic here as they attract opinionated answers that won't have lasting value to others. You may be able to get help in The Whiteboard, our chat room." – Community, jwenting, Thomas Owens
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Maybe callbacks could solve JS computation problem, at least that is what Node.js does. Also, there is RiverTrail, IBM JS multithreading, and Firefox OS is new from B2G. WebGL uses graphics memory to calculate 75 thousand triangles a second. Not sure if they help but maybe worth looking at. All advanced JS though. – Jack Stone Jul 7 '12 at 2:55
  • 1
    @ClintNash My main issue with JS is that the numeric type is float, which makes it really hard to reason about any code. – K.Steff Jul 7 '12 at 10:51
3

Phonegap and other similar solutions proposes a really abstracted wrapper to the real platform, so they make you loose a lot of perfomance, your best option is to write your application in C and/or C++.

Starting from Windows Phone 8 the Windows Phone OS will start to give full support for the C and C++, Android already has that kind of support thanks to the NDK and is also possible to use this languages under iOS. RIM is also offering a native SDK with support for C and C++ for Blackberry.

C# is statically typed and this is true, but it runs under a virtual machine, so this also make you loose some resources, also a good codebase written in C and/or C++ can make your app/library portable on desktop with a minimum effort.

  • +1, I did not know Windows Phone 8 will have support for native code... Does RIM offer an SDK for their tablet only, or for all devices? – K.Steff Jul 7 '12 at 11:46
  • yep, just tablet support for the RIM native SDK developer.blackberry.com/native/download – user827992 Jul 7 '12 at 11:51

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