File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes iOS and the fly likes iPhone Vs. Android Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Mobile » iOS
Bookmark "iPhone Vs. Android" Watch "iPhone Vs. Android" New topic
Author

iPhone Vs. Android

Nageswara Prasad Nakarikanti
Greenhorn

Joined: Apr 16, 2009
Posts: 10
Why tug of war?
Why can't we develop portable apps in this JAVA Era


Nageswara P Nakarikanti, Groovy Kid!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Because there's no Java on the iPhone? (And technically not on the iPhone, either.)

A lot of it has to do with Apple's licensing and app development restrictions.
Nageswara Prasad Nakarikanti
Greenhorn

Joined: Apr 16, 2009
Posts: 10
I think apple is thinking in it hardware way

I do not it is a good approach or a bad one
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Portable mobile Java applications!
yes good luck with that, just try to do some JME development.
Apple doesn't really differ from MSFT in this issue, to do Windows programs you need Windows OS and the .NET platform and to do iOS applications you need a Mac and C/C++/Obj-C.
Both lock you in.
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
Since each device has it's its own features, you will need an SDK to take advantages of the device's capabilities. For example, iPhones have accelerometers and compasses. Java alone does not support such a thing, and hence you have to use an SDK, This means that you cannot truly have a portable mobile app (unless of course you create an app using web technologies like HTML5 and JavaScript, and this means that you will not make use of the devices' capabilities).


Visit my blog: http://jnassef.blogspot.com/
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14118
    
  17

Nageswara Prasad Nakarikanti wrote:Why can't we develop portable apps in this JAVA Era

Because Apple does not want you to!

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Simpler explanation is that they already have years of development on Objective-c apis and code and UI widgets that have a better user experience than what you can create today with Java. The reason why the iPhone is successful is because the user experience is better. If they even allowed Java development on the device those apps wouldn't have the same experience, look and feel approach, that to me makes the iPhone stand above Java enabled devices.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I think that says a lot about Java developers too, though; even on the desktop it's tough to find good examples of great Java-based UIs, but there's no technical reason for that.
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
Mark Spritzler wrote:Simpler explanation is that they already have years of development on Objective-c apis and code and UI widgets that have a better user experience than what you can create today with Java. The reason why the iPhone is successful is because the user experience is better. If they even allowed Java development on the device those apps wouldn't have the same experience, look and feel approach, that to me makes the iPhone stand above Java enabled devices.

Mark


I have to disagree here. Android is using Java, and it has great UI and user experience
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Android apps aren't really Java, fragmentation is a better word I think.
Regarding the UI, sure ever one has his own opinion here but Android UI is really ugly and gloomy to my taste and don't let me start talking about the screen sensibility
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

John Todd wrote:Android apps aren't really Java




GenRocket - Experts at Building Test Data
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

I mean Android apps are written in Java -the language- but Dalvik VM isn't a JRE to be sure.
Maybe this subject is larger than me but Android is a fragmentation and Google should settle this issue with Oracle.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

John Todd wrote:I mean Android apps are written in Java -the language- but Dalvik VM isn't a JRE to be sure.
Maybe this subject is larger than me but Android is a fragmentation and Google should settle this issue with Oracle.


This thread isn't really about the dispute between Google and Oracle, so we should keep this thread on track.

With regards to Dalvik VM not being a JRE, it's subtle, but not significantly different. Whether you're running a Swing application or an Android application, both are java byte code executing on a JVM. Android apps are written in Java, compiled to byte code using a Java Development Kit, and executed on a Java Virtual Machine. Android apps are Java.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Please correct me if I'm wrong but AFAIK, Android apps don't get compiled to Java bytecode we know (not .class format).
The dex tool translates JVM bytecode into Dalvik bytecode.
But again, I don't do Android development, I might be hugely wrong here.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Sort of. Standard class files are generated (by the regular JDK tools, as Gregg mentioned) and then the Android tools convert them to something that can run on the Dalvik VM (which standard Java class files do not).

Personally, I find fault with both statements "Android is Java" and "Android is not Java", so for me it's not a useful discussion to have
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

John Todd wrote:Regarding the UI, sure ever one has his own opinion here but Android UI is really ugly and gloomy to my taste and don't let me start talking about the screen sensibility

This should change soon. Google's Android team has decided to cut down on the number of releases they make in a year and concentrate on user experience specifically (think there'll be only one once a year). Whether or not it is as good/polished or even better than iPhone is a different question and perhaps also a matter of taste IMO.


[List of FAQs] | [Android FAQ] | [Samuh Varta]
gourav kumar
Greenhorn

Joined: Jun 20, 2011
Posts: 10
Alaa Nassef wrote:Since each device has it's its own features, you will need an SDK to take advantages of the device's capabilities. For example, iPhones have accelerometers and compasses. Java alone does not support such a thing, and hence you have to use an SDK, This means that you cannot truly have a portable mobile app (unless of course you create an app using web technologies like HTML5 and JavaScript, and this means that you will not make use of the devices' capabilities).





I agree with you, each device has its own features.
 
jQuery in Action, 2nd edition
 
subject: iPhone Vs. Android