0

I want to develop an app in Android and iOS.

So I guess sharing the backend logic written in C++ would save some development time.

However the app I'm trying to develop heavily relies on Network and Databases.

From what I found here it's best to write the Network part separately (i.e. using Java for Android and Obj-C/Swift for iOS).

Now the only thing left is parsing the data received from the network and carrying out necessary database transactions.

Plus, as we know there's an overhead when calling a native(C++) function from the app.

So my question is, "is writing that database part in C++, worth the overhead" ?

Edit : added link to a SO answer saying it's better to keep network logic platform specific

Edit2 : Also I recently found out about j2objc, which powers Google Inbox. As I'm just starting out, it is an alternative. What's you say ?

Community
  • 1
  • 1
Jaydeep Solanki
  • 2,895
  • 5
  • 36
  • 50
  • I don't know why you think that networking with C++ is worse than rewriting (and maintaining) this component twice for Java and Swift. There is platform-specific network management involved, e.g. using Sync Adaptor to reduce power consumption (see e.g. http://developer.android.com/training/efficient-downloads/efficient-network-access.html) - but the actual code that runs in Sync Adapter can be C++. – Alex Cohn Dec 29 '14 at 10:22
  • @AlexCohn as I found http://stackoverflow.com/a/5234868/1115059. It says it's better keep network logic platform specific – Jaydeep Solanki Dec 30 '14 at 00:46
  • Without going into details, it's very hard to decide. But the link you posted mentions very specific situations where Java/Cocoa gives you more power than C++. – Alex Cohn Dec 30 '14 at 10:48

0 Answers0