Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3419

Re: Java and cross platfo

From "Peter Duniho" <peter.duniho@THRWHITE.remove-dii-this>
Subject Re: Java and cross platfo
Message-ID <op.t90vzyc78jd0ej@petes-computer.local> (permalink)
Newsgroups comp.lang.java.gui
References <b60b2115-f368-4780-a8ef-ed5f7ac08499@k37g2000hsf.googlegroups.com>
Date 2011-04-27 15:44 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.programmer
On Tue, 22 Apr 2008 04:23:32 -0700, matthewoconnor1982@googlemail.com  
<matthewoconnor1982@googlemail.com> wrote:

> [...]
> Also, as an aside- compared to native programming languages, how
> suitable is Java in the opinion on the group for cross platform
> desktop software/solutions?

I agree with Lew that it would have been better to cross-post correctly to  
start with.  In your explanation to him, you claim "I have also tried to  
qualify this above topic into another discussion - mainly that of java as  
suitability for cross platform software products", but the above quote is  
really the only evidence I see of that.  The bulk of your question is  
presumably the same as it was in the GUI newsgroup, and you still seem to  
be primarily asking for help with the GUI design.

Now, that said...on the question of cross-platform...

It seems to me that the fact is, Java is about the best cross-platform  
solution you're going to find.  Or, if not the best, at least the most  
widely used and supported.

I started learning Java a few months ago, because I got fed up with  
Cocoa.  I have found the Apple development forums to be too religious for  
my tastes ("Apple can do no wrong"), difficult to use (they are  
email-only, with lame search capabilities and an annoying habit of the  
users to change the email subject exactly when they've found a solution,  
ensuring that the solution cannot be found next to the question when  
searching), the Apple docs themselves are frustratingly vague and also  
difficult to navigate, and on top of that, Objective-C lacks many of the  
code-correctness and safety features I've come to know and love in C# and  
Java (and C++, for that matter).

On the topic of language annoyances, two (of many) that come immediately  
to mind include: in Objective-C, it is actually possible to have an  
incorrectly constructed object (imagine if in C++, Java, C#, etc. you  
could create a derived class A, but only call the constructor for its base  
class B), and the syntax is surprisingly annoying (because of the nested  
bracket syntax, you cannot as easily chain method invocations...you either  
need to know in advance exactly how many methods you're going to invoke,  
so you can put the right number of brackets at the beginning, or you need  
to go back after you're done and fix it up).

These are just a couple of my least favorite things.  :)

My first Cocoa project was a port of a .NET application that took less  
than a week to write originally.  The port to Cocoa took me the better  
part of a summer.  In the end, the code between the two is actually quite  
similar.  But some aspects of it were definitely more complicated in  
Cocoa, and I wasted a _lot_ of time just trying to figure out how to do  
things.

Sorry...this wasn't really mean to be a rant about Cocoa.  However, that  
does lead me to my rant about Java on the Mac.  On other platforms, you've  
got Sun's implementation, either created by Sun specifically for the  
platform, or at least a port of the Sun implementation.  However, Apple  
being Apple, they have to write their own implementation.

As a result, you have a few issues: their implementation doesn't always  
match the Sun implementation (I found some subtle differences in the audio  
playback API, for example); their implementation is _well_ behind Sun's  
implementation (Java 1.7 is "right around the corner", while the currently  
released implementation on OS X is still Java 1.5); and worst of all,  
Apple seems happy to tie the Java implementation to the OS version (in  
other words, even if and when they get Java 1.6 done, it won't run on OS X  
versions prior to 10.5).

Out of the three "modern" high-level framework/language combinations I've  
been using lately, my order of preference is: .NET/C#, Java, and  
Cocoa/Objective-C.  In that list, Java is the only one that has a good  
cross-platform story, and it's nearly as good as a platform as the .NET/C#  
combination (frankly, I suspect the main reason I like .NET and especially  
C# better is that .NET/C# had the advantage of looking at Java's  
example).  Cocoa/Obj-C comes in a VERY distant third.  As in, I really  
love working with .NET/C# and Java both, but I dread the thought of having  
to fire up Xcode and do some Cocoa programming.

It's unfortunate that Java isn't better-supported on the Mac.  However,  
the poor Java support is still better than the existing Cocoa/Objective-C  
support, and it gives you a real cross-platform solution.  Obviously Java  
isn't going to get you all of the OS-specific features, but it's a very  
capable framework.  Unless you need direct access to OS-specific things,  
it should do just fine (certainly Apple's Java implementation does fine  
with Mac "look-and-feel"), and my understanding is that there are even  
ways to include platform-specific stuff (I keep seeing "JNI" mentioned?).

Some people really seem to love Cocoa.  But I've yet to meet someone who  
wasn't already a Mac-ophile who loves Cocoa.  There's a certain kind of  
person predisposed to viewing anything Apple does with rose-colored  
glasses.  For those people, Cocoa's great.  Certainly from a functionality  
point of view, it doesn't seem to be lacking.  But for the rest of us, its  
ties to Objective-C and lack of good developer resources can be a  
significant barrier.

Just my two cents.

Pete

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Java and cross platfo "Peter Duniho" <peter.duniho@THRWHITE.remove-dii-this> - 2011-04-27 15:44 +0000
  Re: Java and cross platfo "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:44 +0000

csiph-web