wood burning stoves*
The moose likes Java Micro Edition and the fly likes Java versus C for pda programming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Java versus C for pda programming" Watch "Java versus C for pda programming" New topic
Author

Java versus C for pda programming

Allan Jacob
Greenhorn

Joined: Feb 21, 2002
Posts: 5
New to j2me, so forgive me if this is a basic question...
Isn't C the language primarily used in developing pda apps? Is it feasible, thinking primarily from a performance perspective, for Java to become mainstream in this area? From the Java aspect, what are the answers to the ability of C to be more directly in control of the hardware?
Thanks!
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Performancewise, J2ME is almost as good as C with the new generation of JVMs. Java is fast enough to program action games on today's cell phones. With more manufacturers adopting Java acceleration chips and execute Java byte code directly on the hardware, Java will outperform C.
In terms of native hardware access, C is better since most of those features are originally developed in C. But most common device features are also accssible via Java APIs (GPS, Bluetooth, SMS/MMS, SIM card etc. etc.). Those Java APIs are all standardized -- so you do not need to learn the APIs for Symbian and for Windows CE and for Palm separately. With Personal Profile, you can always use JNI to access native C APIs from Java applications.
But the most appealing feature of Java is that gives the operator/manufacturer control. The wireless comm industry is a very conservation industry. Operators will not allow a device with un-secured low-level programmable APIs on their network. BREW is a complex infrastructure solution to address those issues on C/C++ based platforms. Java make things a lot easier for carriers to manage.


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
I realize that you are talking about PDAs not cell phones. I think the only PDAs that will sell in the future are the ones that can access wireless networks (PDA phones).
Theodore Casser
Ranch Hand

Joined: Mar 14, 2001
Posts: 1902

Originally posted by Michael Yuan:
I realize that you are talking about PDAs not cell phones. I think the only PDAs that will sell in the future are the ones that can access wireless networks (PDA phones).

Those and ones that have 802.11b/g. I might not need a PDA-phone, but it is damned nice to be able to check my email from the garage or IM from the airport regardless.


Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
Daryl Wilding-McBride
Author
Ranch Hand

Joined: Jul 18, 2003
Posts: 60
Originally posted by Allan Jacob:
Isn't C the language primarily used in developing pda apps? Is it feasible, thinking primarily from a performance perspective, for Java to become mainstream in this area?

The peformance of some of the JVMs available on PDAs is very good. But I think the advantage of Java is that it's a nicer, less technical language than C. It think it's easier for developers to write a better quality application in Java, because they're not concerned with pointer arithmetic and memory leaks (although memory always remains a key focus area in mobile devices).
I know that many embedded systems developers prefer C, but there are also many Java developers who would like to apply their skills to PDAs, and from an organisational perspective it might be more efficient to concentrate on one language for applications.
As for whether Java will ever become a mainstream development language for PDAs, personally I doubt we will see in the short term more applications written in Java than C on PDAs. But it's nice to have an option. In the medium term, as new and interesting devices evolve, it will be interesting to see.


Daryl Wilding-McBride<br />Author of "Java Development on PDAs" (ISBN 0-201-71954-1)<br /><a href="http://www.javaonpdas.com" target="_blank" rel="nofollow">http://www.javaonpdas.com</a>
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
With more manufacturers adopting Java acceleration chips and execute Java byte code directly on the hardware, Java will outperform C.

If you don't mind, Michael, I'd like to hang on to this statement of yours for a while... Could you enlighten us about how exactly will Java "outperform" native applications? Will the benefits of runtime optimization exceed the overhead of running an additional layer (virtual machine) in between the hardware and the application?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java versus C for pda programming
 
Similar Threads
Game Developer needed!
which IDE ?
Language Support in Java
Swing on PDA
j2me or j2se for pocket pc?