• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Smartphones and the future of Java

 
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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".
 
Paul Anilprem
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Paul Anilprem
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic