Java vs native coding in Android Application development - java

I plan to create an SDK (involving huge data manipulations), which can used to create applications on Android.
I plan to develop the complete SDK, including the libraries in Java, for the reason that if I implement my libraries in the native language(C++) the data movement between the Java and the native layer will involve memory copies and will make my application look slow.
I plan to port the same SDK later to other platforms like Windows Mobile. I am a bit confused on the better approach to code in such cases, keeping in mind the portability and performance of the SDK.
Inputs will be greatly appreciated.

Windows Mobile supports native code (Visual C++, see Getting Started in Developing Applications for Windows Mobile) so using the Android NDK would be a good option. At least you wouldn't have to write the whole thing from scratch. You could have the common code base written in C/C++ and only write the Java wrappers for Android.
As you know, Windows Phone 7 (the successor to Windows Mobile) uses C# and whatever approach you take on Android, you'd need to rewrite the SDK from scratch anyway. Windows Phone 7.x might be supporting native code (C/C++) sometime in the future but not anytime soon.

Related

Create cross platform apps in ubuntu

I am using Ubuntu on my computer, and I do not want to switch to another operating system.
I'm looking for a software that would let me program cross platform apps (for smartphones) with one programming language.
I would prefer a .NET language. Yes, I have looked at Mono, but they only offer their software in Windows and Mac.
Is there a software that would let me build a cross platform app? (I don't like Java, but JavaScript is one that I can handle)
MONO is available for more than both Mac and Windows. It runs in Ubuntu and instructions can be obtained from here.
iOS apps can unfortunately not be built without xcode, but the coding can easily be reused between Ubuntu and Mac. One software to checkout is Xamarin which allows you to use c# to develop iPhone and Android apps. I've been coding in .Net for a while, and I have to say that when I had to do a unix class project, MONO and Xamarin saved my life
Note: I know that your question specifically said you don't like the idea of switching platforms like you would need to in MONO, but I've done a lot of research on this and I've determined it to be my best option, I'd think it'll work for you if you're willing to use a Mac or PC
I'm looking for a software that would let me program cross platform apps (for smartphones) with one programming language.
If you are looking for some tools for developing cross platform apps for smartphones, I suggest you PhoneGap
Is there a software that would let me build a cross platform app? (I don't like Java, but JavaScript is one that I can handle)
You are using ubuntu and want to use .Net, No this is not a convenient solution. If you want a platform independent language, I absolutely suggest you, JAVA ;)
Please notice that:
Java IS NOT JavaScript and they are not related to each other.
I had the same question. I did come across Appcelerator. It seems that they supported Linux previously and the single language you can write in is Javascript.
It's not opensource. You have to make an account to download and install it, but there's free versions for solo developers. I'd rather use Kivy to develop in Python though ;)
Good luck.

Wrapping the whole C++ application to java?

I currently work for a company which gave me an application implemented by a former student. They completely wrapped (even the main) an existing C++ application with SWIG.
The application was first designed to work on a desktop and now they want to make it work on an android phone.
My questions are:
Is that possible for the application to work knowing they didn't succeed to wrap all
the libraries?
Is there another way to do this?
Is it necessary to write the main in Java and call the C++ libraries?
Any idea will be welcome!
I have doubts about there is a automatic utility like SWIG will work to convert PC -> Android - Android OS have significantly different architecture.
Look at Android NDK - it is a development kit supporting the features called JNI in usual Java applications.
You can include C++ libraries in your Android applications with Android NDK. So it is the way to develop cross-platform applications.

Android Back End Technology - Language (Java, Python) & IDE (CoderBuddy, exo Cloud, Cloud 9)

I've done my research and narrowed this down. OK, so I am deciding on the language and and tool to use for backend (server side) of developing cloud based android applications.. I've decided on Google App Engine as my framework. As I am going to be developing on my android tablet I want a cloud based IDE. (I am going to use a native android IDE app for client side).
App Engine supports the Go Programming Language, Java and Python. As there doesn't appear to be a stable cloud IDE that supports Go, I am left with Java & Python. I've narrowed my vast list of IDEs down to:
Coderbuddy - (Designed for App Engine but Python only)
exo Cloud - (Java & Python supported)
Cloud 9 - (Java & Python supported)
I know neither language. I have to learn Java in any case for Android client side development. I understand that Python is faster to code in and so that's definately a factor but I absolutely don't want to sacrifice performance or scalability. I will be doing lots of SQL database stuff.
Finally if you think I am way off and should look in another direction please let me know. Thanks!
Edit: My background language is Delphi (Object Pascal)
My guess is that using Java you will have lots of frameworks to find solutions and I really don't think Python will offer you that.
About IDE, I don't think you should worry about it with Python, you can use SublimeText 2 or Eclipse(have to install python editor). Both work great and Python is easy to deploy.
With Java I use Eclipse but a friend is using NetBeans and it has some "shortcuts" to create things like services, for instance.
Also with Java, you'll be more familiarized because of Android so I think it is a plus, makes more sense.
You need to at least start so you can have a better idea of what is best for you.
And get ready, it will be a LOT different from Delphi ;)

Android class libraries

Android class libraries are written in C/C++ but java is the preferred language for developing applications.Why not C/C++ instead of java ?
If you prefer to develop via C/C++ you may use the NDK. The Android platform is run on the Dalvik Virtual Machine, what you code in java is actually compiled to Dalvik bytecode and run on the VM.
They spent a lot of time developing the facilities to make it fairly painless to make an Android application using a managed language. Some people would consider this an advantage.
There are many reasons to choose Java as the platform, but my guess as to the biggest reason why would be to not expose application developers to a slew of porting issues that arise from the sheer number of devices that Android powers. There would be far fewer apps available if every developer had to research every platform nuance for every phone and tablet out there.
Obviously, there are drawbacks, and that's why the Native Development Kit (NDK) exists. The NDK primarily addresses performance issues, but recent additions have included the ability to write an entire app completely in native code.
Java it's used in many application for mobile devices, it is a standard because it is more manageble, even the new languages that are appearing now it's based in java. It is a open language and you can learn it without going to class. Javame is used for mobile devices which incorporates some features of J2EE and adds new classes for the small devices.

.Net vs Java for mobile development. What's your take?

I am developing mobile apps for some time in .NET and I was always wondering if the grass is greener on the other side (Java).
Thus, I would like to ask your opinion about which one you prefer for your mobile apps and why is that so.
The main advantage of using Java is the broader installed base. If you use Java, you are going to reach orders of magnitude more phones than if you use .NET.
As far as I know, .NET works exclusively with Windows Mobile phones.
On the other hand, Mobile .NET is easier than Java (IMHO), and that's partly because of Visual Studio IDE which makes life so much simpler than any other development environment on the Java World. For example, doing Form Based applications in .NET mobile is really straightforward and simple.
So, the answer will basically depend on what you are trying to accomplish:
Trying to reach to the biggest number of mobile devices: go with Java
Trying to develop an application for Windows Mobile devices: go with .NET
Trying to develop an application that will run only on a controlled environment (A single business) where you get to decide the devices it will run on: decide which device you are going to use and then pick development environment.
Keep in mind that if you are talking about Java for Android or Blackberry development, you will face the same issue of not reaching to a huge installed base that you will with .NET. If you want the huge installed base, go with plain Java Mobile Edition.
I can only speak for windows mobile development stay with .net.
Sun don't even release a JVM for windows mobile devices I have developed for windows devices using java and using http://www2s.biglobe.ne.jp/~dat/java/project/jvm/index_en.html as my JVM which was very good the author even responded to a feature request I made.
It is true that if you're going to develop for WindowsMobile, J2ME is not a very good option. More than likely your device of choice will not come with a JVM and if it does, it'll be buggy and slow. Also, forget about trying to integrate with with OS at more than a basic level.
Just to add to what others have said, Sun has made phoneME available and if you want to go that route and deploy your MIDlet and VM together that is certainly a possibility. It's just a lot of work at this point.
For .NET guys - there is a Ubiq Mobile framework. Ubiq Mobile apps work on Android, iOS, Windows Phone and Java-based phones and tablets. This is rapid cross-platform development with .NET with cloud-based architecture. Getting started article: How to create simple UbiqMobile application with video.

Categories

Resources