Lambda the Ultimate

inactiveTopic Java hits obstacle with cell phones
started 9/3/2002; 12:21:29 PM - last post 9/12/2002; 8:18:53 AM
Ehud Lamm - Java hits obstacle with cell phones  blueArrow
9/3/2002; 12:21:29 PM (reads: 1981, responses: 17)
Java hits obstacle with cell phones
The Java programming language was built on the premise that a program written in it can run on any platform that has a Java Virtual Machine. This works to varying degrees on PCs and servers. But as more and more phones reach the market with Java virtual machines built in, it is becoming apparent that the cross-platform benefits of Java simply do not apply here in the same way, the developers said.

Amusing.


Posted to general by Ehud Lamm on 9/3/02; 12:22:11 PM

Viktor Szathmary - Re: Java hits obstacle with cell phones  blueArrow
9/3/2002; 4:13:13 PM (reads: 1876, responses: 1)
I think the amusing part is that the only specific complaint that the article mentions is the different screen resolutions - and that's hardly java's fault. And how you want to cope with that is really application specific, and regardless of the technology used, you have to deal with it.

On the other hand, not having to deal with 5 different cpu architectures, 10 different display APIs, etc is certainly not a bad thing... :)

Chris Rathman - Re: Java hits obstacle with cell phones  blueArrow
9/3/2002; 4:40:29 PM (reads: 1856, responses: 0)
It's kind of a catch-22 situation. If the hardware (and display) were ever to become standardized, then there'd be no real need for Java in game development. Witness the dirth of PC games written in Java for the Desktop.

Ehud Lamm - Re: Java hits obstacle with cell phones  blueArrow
9/4/2002; 6:50:19 AM (reads: 1832, responses: 0)
It's amusign beacuse it shows just how idiotic hype is. Anyone knows that no language can free you from thinking about things like I/O devices completely. So why is this coming as a surprise?

In my note on programming language, the second section is about high level languages. The section is followed by several questions. The first two are: (1) Is all code wirtten in a high level language portable? (2) Look at standard libraries and find at least two examples of operations the are likely to behave different in different environments. (Two typical examples are file management which differs between OS and screen output).

Another reason to be amused is that the "write once run everywhere" motto was used maiinly to talk about the JVM, which frees you from recompiling. The kind of portability discussed here (targeting several platfroms) can be achieved with other HLL just as well as with Java, it requires recompilation which is usually not a problem -- but more than that it requires thinking about the design (seperation of concerns), careful use of libraries etc.

Dan Shappir - Re: Java hits obstacle with cell phones  blueArrow
9/4/2002; 7:09:12 AM (reads: 1768, responses: 1)
recompilation may be a problem is some contexts, e.g. mobile agents. Also, some OS related services may not be available for a specific HLL in the context of a standard library. For example, both Java and Ada have threading built-in. C++ doesn't. This means that it's a problem to build portable threaded code in C++.

A JVM advantage that I see in this context is that it was designed with the intention of allowing "write once run everywhere". This means that a lot of desired system services are built-in in a standard way.

OTOH you are quit correct in making the point that the JVM does not solve all the porting headaches. Still, it can reduce them. You'd still have some porting work, only less. Can this benefit be achieved with other HLLs? Certainly.

Ehud Lamm - Re: Java hits obstacle with cell phones  blueArrow
9/4/2002; 10:24:10 AM (reads: 1764, responses: 0)
I was only talking about the issues raised in the original article. These are concerns that have almost nothing to do with the "compile once run anywhere" nature of VMs.

Paul Snively - Re: Java hits obstacle with cell phones  blueArrow
9/4/2002; 2:06:57 PM (reads: 1702, responses: 1)
What I mostly took away from it is that Java needs a built-in scalable vector graphics system.

Ehud Lamm - Re: Java hits obstacle with cell phones  blueArrow
9/5/2002; 2:32:25 AM (reads: 1699, responses: 0)
But surely you can build such a library for other languages as well. Java has no special advantage.

jon fernquest - Re: Java hits obstacle with cell phones  blueArrow
9/6/2002; 3:28:19 AM (reads: 1603, responses: 0)
In the context of Personal Java running under Pocket PC on the iPAQ all sorts of device or underlying-OS specific functionality was missing from the API's.

For example:

You couldn't map the hardware scroll button to software GUI actions.

API's for accessing native PIM databases for Contacts, Tasks, etc....were also missing.

It seems like some Nokia phones combine the Symbian operating system with a Java chip. It would be interesting to see what aspects of inter-operability are missing there as well.

rev - Re: Java hits obstacle with cell phones  blueArrow
9/6/2002; 10:49:38 AM (reads: 1587, responses: 0)
API's for accessing native PIM databases for Contacts, Tasks, etc....were also missing.

Does Personal Java have an FFI? (or whatever the equivalent is called in Java) Personally, I don't think Personal Java, a "flavor" of Java that is meant to run on PDAs and Phones, should have lots of integration with WinCE. If it were a special Java-for-WinCE that was marketed as such, yes. But otherwise, is there anything stopping an ambitious developer from writing some wrapper classes to access the native layer specific to PocketPC/WinCE and access the PIM db or the other things you mention?

jon fernquest - Re: Java hits obstacle with cell phones  blueArrow
9/9/2002; 3:33:56 AM (reads: 1529, responses: 0)
> ...is there anything stopping an ambitious developer
> from writing some wrapper classes to access the native
> layer specific to PocketPC/WinCE and access the PIM db
> or the other things you mention?

No, but core functionality should be in API's. It is a valid criticism if they aren't. Example: Charles Petzold (a Microsoft author) criticises .NET several times for leaving out critical functionality e.g.cursors (for customized textboxes). Anyway, API's evolve too, time constraints + criticism = incremental steps towards perfection.

PIM applications for most PDA and mobile phone users are the *most important applications* on the device, core functionality.

Furthermore, they are almost part of the hardware. PIM applications on mobile phones and iPAQ's Pocket PC (Win CE) are burned into ROM. Under Pocket PC they are re-installed with every hard reboot, but could be deleted, in mobile phones like Nokia's they are so difficult to delete or replace you might as well consider them part of the hardware.

I see Java on Nokia mobile phones described as a 6th downloadable game, so I guess that's what Java is turning into for Mobile phones, a portable gaming platform. I don't think much is being done with Personal Java on PDA's.

Chris Double - Re: Java hits obstacle with cell phones  blueArrow
9/9/2002; 3:37:44 PM (reads: 1499, responses: 0)
On the Nokia phones using Symbian you can access most of the phone functionality, including the contacts, SMS message store, etc. You can also write native extensions using JNI.

The downside with Personal Java on the phones is lack of memory. With only about 3MB of memory to play with the Java runtime takes up most of that. So generally you can only have one Java program running at a time. That's the main holdup for Java software on Symbian phones at this point.

I've been using Forth to develop on the Nokia 9210. I ported Ficl (http://ficl.sf.net) and it allows me to develop directly on the phone with minimal use of memory. Using Forth 'blocks' I get virtual memory which is something the Nokia phones don't have in the OS itself.

Most recently I've been using 'io' (http://radio.weblogs.com/0102385/2002/09/04.html#a179) - a prototype based language similar to Self and NewtonScript. It's quite nice to use on the phone but a bit more memory hungry than Forth. Definitely more 'user friendly' though.

My eventual goal is a Common Lisp or Goo (http://www.googoogaga.org).

Chris.

jon fernquest - Re: Java hits obstacle with cell phones  blueArrow
9/10/2002; 8:59:42 AM (reads: 1476, responses: 0)
I've been looking at the Nokia 7650. but it doesn't appear to have touchscreen capabilities like the iPAQ and it looks like it just has a standard phone keypad, no virtual keyboard like the iPAQ or a Blackberry-style keyboard. These deficiencies would probably limit input speed and usefulness.

I thought it had a java chip on board (as I did the Siemens SL45i), but I guess there aren't any PC's or mobile phones that have Java built into the hardware yet?

The following link is an example of Java and Symbian OS integration:

http://www.symbian.com/developer/downloads/agendawriter.html

Chris Double - Re: Java hits obstacle with cell phones  blueArrow
9/10/2002; 3:55:57 PM (reads: 1440, responses: 0)
You are correct that the 7650 does not have a full keyboard or a virtual one. It's all through the phone pad with predictive input. Not much good for programming. I'm porting my Forth based newsreader to the 7650 and it's a pain not being able to easily program it 'on board'.

The SonyEricsson P800 is another interesting Symbian phone coming out. That has a virtual keyboard, touchscreen and stylus.

Chris.

jon fernquest - Re: Java hits obstacle with cell phones  blueArrow
9/11/2002; 2:41:56 AM (reads: 1452, responses: 0)
Have you set up a mobile programming page?

I put the little Java IDE I use to program on my iPAQ while commuting on the subways of Seoul, Korea on a webpage (in response an iPAQ IDE question on the Sun Personal Java Forum).

I also ported Junit test to iPAQ. (didn't put this online yet) Junit is very important given the slow compile speed of the iPAQ. Thoroughly testing small pieces of code to be integrated later seemed to be a reasonable thing to accomplish with an iPAQ, but whole systems required long compile time waits and it's also a little hard to navigate around source files without a real desktop.

I also ported JScheme which leads me to another question: does your Nokia Communicator have a command line shell or did you have to cook one up from scratch using either the Symbian or Java AWT gui? I chose the later with a textbox for stdin and stdout.

Chicken Scheme which compiles down to very portable C also looks promising. There are also a lot of interesting programming languages and utilities ported to Windows CE at General Paranoyacx Software.

Are you aware of any pages or sites devoted to using PDA's or cell phones for mobile programming ?

Chris Double - Re: Java hits obstacle with cell phones  blueArrow
9/11/2002; 4:08:31 PM (reads: 1452, responses: 0)
I plan to set up a page soon. As soon as I've finished the tweaks to the Forth and io to make them easier to access the Symbian API. I occasionally post details about my progress to my weblogs at http://radio.weblogs.com/0102385.

The 9210 does have a command line but 'console' programs in this manner don't interact well with the system - they don't appear on the standard task list and it's difficult for them to access other system resources.

The standard Symbian application is really a DLL that hooks into the System application which runs everything. I've developed a simple Symbian application that allows a gui command shell for porting things.

Chicken Scheme does look good. I had a brief attempt at porting it a while back but because it makes heavy use of the C stack it's problematic on the 9210. Standard Symbian apps only have 8KB of stack and because the apps are really DLL's you can't change it. Writing a console application allows you to change it and Chicken would probably work under that but that has its own limitations as I mentioned above.

I don't know of any pages devoted to mobile programming. I wish there were. Once I've done the work on my apps I hope to set a small one up. I'll let you know when done.

Cheers, Chris.

jon fernquest - Re: Java hits obstacle with cell phones  blueArrow
9/12/2002; 8:18:53 AM (reads: 1413, responses: 0)
> Chicken Scheme does look good. I had a brief attempt at
> porting it a while back but because it makes heavy
> use of the C stack it's problematic on the 9210.

I had stack overflow problems using SLIB R5RS macros in Pocket Scheme.

I experimented in with Forth on the Palm and it seemed to allow you get a lot closer and make optimal use of the hardware.

I guess static and dynamic linking methods (the linker and loaders) for most PDA and cell phone operating systems and SDK's are limiting and pretty much wired into the SDK's and operating system.

Open sourced OS's running on cell phones and PDA's like Linux, Plan9 (for cell phones?) probably don't have this limitation?