Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "Peter Duniho" Subject: Re: Java and cross platfo Message-ID: X-Comment-To: comp.lang.java.programmer Newsgroups: comp.lang.java.gui In-Reply-To: References: Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 103 Date: Wed, 27 Apr 2011 15:44:45 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303919085 96.60.20.240 (Wed, 27 Apr 2011 10:44:45 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:44:45 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:3419 To: comp.lang.java.programmer On Tue, 22 Apr 2008 04:23:32 -0700, 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