The Source for Java Technology Collaboration
User: Password:



Scott Ellsworth

Scott Ellsworth's Blog

MacOS X is my Java development environment

Posted by scottellsworth on October 28, 2003 at 10:49 AM | Comments (11)

I just read Cay Horstmann's complaints about MacOS X as a Java development environment, and was struck by just how differently we perceive the coding universe.

I am reluctant to disagree with Dr. Horstmann, given the amount I have learned from his columns and books over the years, but I really think he is off base. He feels that MacOS X is far inferior to Linux as a coding environment, while I have had the opposite experience.

My world revolves around biotech consulting and custom applications. I work both on the server side and the client, and while Java is not my only tool, it is in an important one for what I do. I tend to need Perl, ssh, Java, and the usual productivity tools. It is not enough for me to have a nice development environment, I also need support tools as well, and the MacOS X environment gives me the tools I want in an interface that is acceptable.

Cay gives six ways in which the Mac is inferior. Of these, the first two are quite real - Apple does have some problems with VM start time, and they do have differences in the graphics subsystem. The specific problem Cay mentioned with his UML editor Violet have been fixed in Panther, but the overall problem of having a different vendor on Apple than on Windows and Linux is real. Deficiencies are fixed over time, but as long as Sun is the sole vendor for Java on Linux, Windows, and Solaris, they form the baseline of how the system should perform. Even when Sun violates the contract of its APIs, there will be people who will find any other behavior wrong, and when the alternative behavior is clearly inferior, the people complaining about Apple's implementation have a strong case.

The other four seem to stem from not differentiating between the developer communities and the corporate office. Like most corporate office wonks, Apple trade show reps seem to have told him that the Apple way is the only way. This is annoying, incorrect, and regrettably par for the course from all too many vendors. I recall trying, and failing, to get support from RedHat and Dell for a hardware configuration problem one of my clients had. It was not pretty, and that was with a paid support contract. In my experience, Apple has responded better to support requests, but I still find vendor support pretty lousy across the industry. The Linux world is not winning any prizes here, at least in my experience.

The Mac developer and user community, on the other hand, tends to have solved the problems that face them, some with Apple software and hardware, and some without. They tend to have third party mice, a mixture of open source, closed source, and Apple software, and an overall problem solving attitude. In this regard, they are very like the Linux developer communities. I do see rather less software modification, and more configuration, but they are getting their work done.

As far as hardware goes, I have been happy with my decision to use a TiBook/667 for my sole computing environment. It has been a trooper, only failing when I dropped it on a floor from a height. My wife's TiBook/400 has had two problems that justified sending it back to Apple for repairs, which is not as good a record, but first revs of new hardware often have their little surprises. In the main, the people I know with TiBooks have had pretty good luck with the hardware. Again, a real concern, but I have not had nearly as many problems as Cay seems to have had. Different usage patterns, perhaps, or different luck of the draw.

I do worry about Apple's commitment to Java. Their new XCode dev environment does not handle Java very well, though it does work. I am hoping that they are going to push Java development in future releases, but I am concerned. A major test will be 1.5 time to market, as that depends on a lot of factors.

Thanks be to Eclipse, which does work well. I also find it encouraging that they are now using JBoss as the underlayer to WebObjects, which might mean that Apple is finally willing to play nice with others.

Scott


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Still too flaky.
    I recently tried an app I wrote on a G5 with Panther and there are two problems that have made me sceptical of Apple's commitment to Java.

    Firstly, it seems possible to get the VM to hang. While this is possible on all Java implementations, on the Apple the problem is that the VM is shared; so a problem in one app is also every other Java application's problem. Of course, the VM can be bounced but it does make one queasy especially if you have an audience.

    Secondly, the Swing performance is terrible. The G5 rendering of JTables is at least 10 times slower than an old P3. A simple test is to create a table with 50 columns and 500 rows and try and scroll - sit back and watch those pixels paint.

    What scares me most is that these are not the usual edge cases that slip through the QA dragnet; the kind that can be easily worked around when you understand the error. These problems are terminal.

    Regards,
    Brendon McLean.

    Posted by: brendonm on October 29, 2003 at 09:41 AM

  • Still too flaky.
    Howdy, Brendon.

    Thanks much for responding.

    I have not run into any VM hangs, but I have, perhaps, been lucky. Certainly, a machine-wide hang would be a killer for an app. Out of curiosity, does it peg the cpu when it does this? Also, do you have a thread dump?

    As far as extremely slow JTables, I know a number of slow repaint bugs were caught and killed between 1.4.1 update 1 and Panther. One of mine came from aggressive setfont calls - a free op on windows, and a very expensive one on Jaguar. It is better now. I see what you mean, though, about poor performance for a 50x500 table. The following code is glacial.

    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.util.*;

    public class Test {
    TableModel dataModel1 = new AbstractTableModel() {
    public int getColumnCount() { return 50; }
    public int getRowCount() { return 500;}
    public Object getValueAt(int row, int col) { return new Integer(row*col); }
    };
    TableModel dataModel2 = new AbstractTableModel() {
    ArrayList data=new ArrayList();
    {
    for (int col=0; col<getColumnCount(); col++){
    ArrayList oneCol=new ArrayList();
    data.add(oneCol);
    for (int row=0; row<getRowCount(); row++){
    oneCol.add(new Integer(row*col));
    }
    }
    }
    public int getColumnCount() { return 50; }
    public int getRowCount() { return 500;}
    public Object getValueAt(int row, int col) {
    ArrayList oneCol = (ArrayList)data.get(col);
    return oneCol.get(row);
    }
    };
    public Test() {
    JTable table1 = new JTable(dataModel1);
    JScrollPane scrollpane1 = new JScrollPane(table1);
    JFrame frame1 = new JFrame("model 1");
    table1.setPreferredScrollableViewportSize(new Dimension(500, 70));
    frame1.getContentPane().add(scrollpane1, BorderLayout.CENTER);
    frame1.pack();
    frame1.setVisible(true);

    JTable table2 = new JTable(dataModel2);
    JScrollPane scrollpane2 = new JScrollPane(table2);
    JFrame frame2 = new JFrame("model 2");
    table2.setPreferredScrollableViewportSize(new Dimension(500, 70));
    frame2.getContentPane().add(scrollpane2, BorderLayout.CENTER);
    frame2.pack();
    frame2.setVisible(true);
    }

    public static void main(String[] args) {
    new Test();
    }
    }

    I suggest filing a bug on this and the freeze you mentioned, as there is a chance that this is a regression that can be fixed fairly easily. (I intend to file one on the table drawing bug, but the more votes they get, the more likely they are to fix it.)

    I know it sometimes seems that Apple is not listening, but they do actually respond. Whether they have enough people working on Java is a very valid question, and one that I do not know the answer to.

    Posted by: scottellsworth on October 29, 2003 at 11:03 AM

  • Indenting?
    Hey is that code syntactically correct? I tried piping that into Eclipse and its barfing all over the place.

    Is it possible to use indenting? or spaces? as I am not familar with the AbstractTableModel syntax.

    Thanks

    Posted by: kingjr3 on October 29, 2003 at 12:15 PM

  • Indenting?
    I have put it on my fuz@mac.com iDisk in the public/jtable folder. The indenting survived there.

    Scott

    Posted by: scottellsworth on October 29, 2003 at 01:32 PM

  • me too
    i use OSX as my development environment too, on a large cross platform project, while my friend next door works on Windows. Although there are problems with the Apple java, my experience is that there are at least as many problems with the Windows one - they're just different problems.
    I suspect that Windows developers have internalised the problems with the Windows Java, so they don't notice them anymore. We've certainly had to work around a hell of a lot of Windows problems - for instance Drag and Drop is flaky enough that some of our internal tools are unusable on Windows, but fine on the Mac.

    Apple's swing is slower for many things, but then I find it's faster for others. Certainly Netbeans is a lot more usable on my 900mhz Mac than it appears to be on a 2Ghz Windows machine. The JTable problem you're having does sound pathological, and I'd tend to agree that it should probably be filed as a bug rather than being indicative of general performance. And Apple's Look and Feel certainly looks a hell of a lot beter than Metal.

    Yes. XCode isn't good at Java development. But you can use netbeans, or eclipse, just as on Windows or Linux. Hopefully XCode will get better over time, though I doubt it will ever be as good as the dedicated java tools. But our project involves compiling a very large native code library, and an equally large chunk of java, pulling in several open source libraries and packaging it all together. XCode can build it all from scratch and package it into a double clickable app with a single click. I don't know of any other tool as good.

    Which brings me to another point - Java really is a viable language for the development of desktop apps on OSX. Lot's of people actually do it, and people *actually use Java apps on their desktop*. OSX treats Java as a first class citizen - by and large there's no reason for an end user to know they're running a java app (and if you're willing to forego cross platform compatibility and use Cocoa instead of Swing). Java apps on Windows always seem a compromise - and the destop experience is generally dreadful (which is why people avoid Java for desktop development).

    Posted by: jportway on October 29, 2003 at 04:08 PM

  • Still too flaky.
    Thanks. I'll file the bug today.

    Posted by: brendonm on October 31, 2003 at 12:50 AM

  • Another Mac convert
    I have a 17" Powerbook and a dual G5. I am happy happy happy with the Java support!

    Yes, there are a few quirks, for the most part my stuff is working like a champ without any changes.

    Posted by: turbogeek on November 03, 2003 at 04:15 PM

  • Mine Too!
    I run JBuilder and CVS on both my Mac laptop and my Wintel box and use CVS to move code between them quickly and easily.

    I carry a 3 button scroll mouse with my mac which works great. The Appel hardware guys may not be willing to entertain the notion of mreo then one button but the OSX guys have made OSX do everything you'ld expect if you have one.

    I'm not sure I "get' the start-up time issue. The Mac VM in unique among Java VMs currently in that it shares static data between versions of the VM. Thus IME once you have a first VM up launching subsequent ones is like greased lightening. Sicne my IDE is ALREADY runnign in a VM I've fulfilled that requriement by definition.

    In short I think Apple's got a lot of support for their claim that they are the "best Java desktop environment around."

    Posted by: jeffpk on November 07, 2003 at 02:23 PM

  • me too
    I am using a 17" PowerBook with OS X 10.3.2 and I develop bioinformatic applications using Java and IntelliJ. I am glad that Apple is trying to make Java a first-class citizen on OS X. In fact, this is one of the main reasons I am using OS X after so many years of linux and windows. I can have Java and easily the best looking interface of any OS out there while maintaining the use of my UNIX utilities and the shell. I only hope that Apple will continue to push Java on OS X. So far, all my Java apps have run just fine without any major performance problems.

    Posted by: sleepy on December 25, 2003 at 06:54 PM

  • wow power leveling
    wow powerleveling
    wow power leveling
    wow gold
    wow items
    feelingame.com
    wow tips
    Most Valuable WOW Power Leveling Service
    wow power leveling faq
    cheap wow power leveling
    wow power leveling
    wow powerleveling
    wow power lvl

    Posted by: wowleveling3 on December 13, 2007 at 05:44 PM

  • 网络营销软件
    网络营销软件
    网络营销软件
    群发软件
    群发软件
    ---
    群发软件
    网络营销软件
    论坛群发软件
    网站排名软件
    群发软件
    推广小助手破解版
    论坛群发软件
    网站排名软件
    群发软件
    网络营销软件
    网站推广软件
    信息群发软件
    论坛群发软件
    信息群发软件
    博客群发软件
    qq群发软件
    邮件群发软件
    博客群建软件
    企业名录搜索软件
    信息群发软件
    邮件群发软件
    论坛群发软件
    博客群发软件
    网站推广软件
    网络营销软件
    全能营销破解版

    Posted by: uuok999 on December 20, 2007 at 12:07 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds