wood burning stoves 2.0*
The moose likes Meaningless Drivel and the fly likes Smartphones and the future of Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "Smartphones and the future of Java" Watch "Smartphones and the future of Java" New topic
Author

Smartphones and the future of Java

Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3200
    
    2
Pat Farrell wrote:
Paul Anilprem wrote:Java, on the other hand, seems to have lost its place in the mobile world for sure. JavaScript and HTML 5 have taken over its throne.


They have taken over the client-side stuff that Java applets tried to be in. I have not seen any evidence that they have displaced any of the standard Java/Tomcat/JSP/servlet code for high volume websites. There are a few folks talking bout JavaScript on the server. I not heard of any HTML-5 use on the server.

While "client-server" was all the rage in the early 1990s, these days we are doing more of it, and more successfully than it was ever dreamed 20+ years ago.

Yes, you are right and we are indeed talking about mobile. Not servers. The topic of the thread also suggests the same.


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4634
    
    5

Paul Anilprem wrote:Yes, you are right and we are indeed talking about mobile. Not servers. The topic of the thread also suggests the same.


Sorry, I got distracted. You are right, we are talking mobile.

But I don't follow your argument on mobile in general, when Android has a huge lead in market share (units sold, $ value of units sold, models on the market, etc.) and Android is all about Java. Sure it runs on Dalvic, but you write Java. I'm not seeing the move to HTML5 from Objective-C, some very notable cases, such as the Facebook client, have moved back to Objective-C from HTML5.
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3200
    
    2
Pat Farrell wrote:
Paul Anilprem wrote:Yes, you are right and we are indeed talking about mobile. Not servers. The topic of the thread also suggests the same.


Sorry, I got distracted. You are right, we are talking mobile.

But I don't follow your argument on mobile in general, when Android has a huge lead in market share (units sold, $ value of units sold, models on the market, etc.) and Android is all about Java. Sure it runs on Dalvic, but you write Java. I'm not seeing the move to HTML5 from Objective-C, some very notable cases, such as the Facebook client, have moved back to Objective-C from HTML5.


I am not arguing for or against anything in particular here. When I started this topic, I did not have any idea about how UI based applications can be developed for mobile devices. For desktops, Java Swing was and is a very good option as it provides a very viable WORA solution. But with mobile devices taking primacy now, that option is no more applicable.

My guess was that there must be something similar for mobiles that can provide WORA. Most business apps only need the functionality that is common across all devices. It would be just too expensive to develop the same app for myriad of devices. And I have found my answer. Java is not it. Java is gone from mobile. JavaScript and HTML 5 provide WORA for mobile devices including all the native things that you may want. This seems to be a very popular option. I just learned about it now but has been in existence since 2008.

Finally, I don't agree with your claim that Android runs Java. It just doesn't. You can't take a jar and run it on android. Irrespective of the feature set. You can't even take a simple hello world class file and run it on Android. You may translate it to whatever but that is not the point.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Paul Anilprem wrote:Finally, I don't agree with your claim that Android runs Java. It just doesn't. You can't take a jar and run it on android. Irrespective of the feature set. You can't even take a simple hello world class file and run it on Android.

Of course Android runs Java. Just because the program must use the Android API to run, doesn't mean it's not Java.

That's like saying Tomcat doesn't run Java because the code needs to use the Servlets API and you can't "just run any old Hello world program".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3200
    
    2
Bear Bibeault wrote:
Paul Anilprem wrote:Finally, I don't agree with your claim that Android runs Java. It just doesn't. You can't take a jar and run it on android. Irrespective of the feature set. You can't even take a simple hello world class file and run it on Android.

Of course Android runs Java. Just because the program must use the Android API to run, doesn't mean it's not Java.

That's like saying Tomcat doesn't run Java because the code needs to use the Servlets API and you can't "just run any old Hello world program".

I know I might be blamed for arguing for argument sake, but your comparison is absolutely illogical. It is not a question of API at all.

What you have is a development environment that lets you write code for Andriod's DVM using a language that exactly same as java. What you also have is a set of ready made library that has the same structure as provided with JDK.

But the fact remains that what runs on Android is not java byte code. Yes, whatever runs on Android is produced using compilation of Java code. You may produce the same binary using C code as well. This process is no different from compiling C code or C++ code into a Linux or Windows binary. This is language independence and not platform independence. You are not running the same binary on different platforms.

So if you don't have a JVM on Android, you can't really claim that it runs java. I see a similarity to VJ++ here. But VJ++ was still a lot more Java than Android is.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Paul Anilprem wrote:So if you don't have a JVM on Android, you can't really claim that it runs java.

Probably splitting hairs, but one can write Java and execute it on Android. But I think we can all pretty much agree to say that it doesn't run Java bytecode without conversion.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3934
    
  17

Paul Anilprem wrote:This process is no different from compiling C code or C++ code into a Linux or Windows binary. This is language independence and not platform independence. You are not running the same binary on different platforms.


The PhoneGap/GWT/m-gwt stack you pointed to in the video in not platform independent either, in those terms. You have to compile your application for each device - not just each device but for each browser on each device.


Steve
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3200
    
    2
Steve Luke wrote:
Paul Anilprem wrote:This process is no different from compiling C code or C++ code into a Linux or Windows binary. This is language independence and not platform independence. You are not running the same binary on different platforms.


The PhoneGap/GWT/m-gwt stack you pointed to in the video in not platform independent either, in those terms. You have to compile your application for each device - not just each device but for each browser on each device.

That's not completely true. Think of PhoneGap as the JVM that provides a standard set of functionality/library for all devices. JavaScript and HTML 5 are completely platform independent.
The compilation step that you are referring to is for two reasons - converting Java code to JavaScript and to optimize the javascript for a given device, which are not a necessary requirement to use PhoneGap. You can actually write JavaScript code independently (without using gwt and mgwt) and run it on any device.

It is also different from C/C++ - Unix/Windows paradigm because in that case you can't use the same code for writing UI applications on multiple platforms because the libraries are different. Here, you can.

In any case, this is pretty much what I was getting at - how to use exactly same code base to build apps that run on all mobile devices.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Smartphones and the future of Java
 
Similar Threads
Enterprise J2ME: Does "Mobile" actually mean mobile?
Does Android only work in Google devices?
another great article by Michael Yuan
J2ME, What's the significance?
Flex/Java Mobile Apps