Thursday, April 24, 2003

Eclipse

Buzz Andersen:

All gripes aside, however, Eclipse on OS X is the same great development environment that I’ve come to love on Windows, and that alone is cause for celebration. I would kill to have Eclipse’s sophisticated code completion features in Project Builder (since I’ve been using Eclipse at work, my once frequent visits to the Java API docs have all but ceased).

I don’t think that would be enough to get me to write code in Project Builder, but if Apple implemented more of Eclipse’s feature I might consider switching. Although the situation is much better than on OS 9, it still seems like the Mac is behind in developer tools. Using a minority language like Objective-C doesn’t help, of course.

9 Comments RSS · Twitter

That you couldn't actually implement the AppKit with anywhere near the elegance of the current one in Java or C++ is lost in statement like that. There are modern languages that might be used to build something as elegant, but none that would combine elegance with the raw speed of a C based backend....

Objective-C does have its warts, but far fewer than Java or C++. And Objective-C has the advantage of being extremely mature-- when it was chosen to implement the AppKit over 15 years ago, it was a new language. But no more.

Certainly, PBX is fairly lacking as a Java IDE. But as a Mac specific GUI construction tool, I would like to see one dev environment using any other combination of language/platform that comes anywhere near the power and developer productivity possible with ObjC, PBX, and Interface Builder.

Oh, wait, there is one: PBX + Interface Builder + Python via PyObjC. All the benefits of Cocoa+IB combined with Python. With the current version of PyObjC (you need to get it from the CVS repository until 0.9 ships), it eliminates the retain/release/autorelease wart of ObjC.

The Mac is definitely way behind in Java development tools. PBX definitely does not make a great Java IDE!

I suppose I should add some context. I think Cocoa is a great framework. Objective-C has its warts, but I like it. Cocoa and Interface Builder are a very productive combination. I’m not complaining about them. Nor do I want PBX to be a better Java IDE. I’d rather write Cocoa code in Objective-C or Python (haven’t used PyObjC yet, but it looks way cool) than Java.

My point is that there is a lot to learn from the tools that accompany Java and other languages (like Smalltalk). If Objective-C had the marketshare that Java does, it would probably have a code-completing IDE with integrated support for refactoring, testing, and documentation. People would write stuff like AspectJ, JUnit, and Log4J for it first. The compiler would be faster. There would be a good debugger. The official documentation tool would be better than HeaderDoc. Apple’s framework is great, but the tools drag it down a notch.

Oh, and since I guess it isn't obvious to the casual reader of this blog, I do use Project Builder, but I write the code in BBEdit.

I'm with Michael--the productivity gains I realize from using Eclipse are quite compelling, but I feel like Project Builder is pretty bare bones by comparison. One of my biggest annoyances: the pop-up list of methods at the top doesn't alphabetize, but rather presents methods in order of their appearance in the code. It's not a matter of me not liking Cocoa--far from it. I just wish Project Builder, as a dev environment, had half of the thoughtful (and extremely helpful) features that Eclipse has!

I do agree completely with Bill about Cocoa vs. Java, however. I write Java code for a living, but write Cocoa apps for fun, and there is absolutely no contest--Cocoa and Objective-C win every time for sheer elegance. What's funny is how many of the habits I have picked up from Obj-C and Cocoa have carried over into my Java programming--right down to the way I name my methods, use singleton "configuration" objects (a la defaults), prefer factory methods over constructors, and accidentally type "nil" all of the time :-).

Michael:

I do agree that the java development environments are ton better than PBX, but just to nitpick there does exist Obj-C versions of JUnit and Log4J.

Buzz:

The pop-up list can be alphabetized, just press Option key before you select the list of methods and they will be shown in alphabetical order. BBEdit and Codewarrior and any other Mac editor(s) I have used, use the same convention.

Pradeep: Wicked! Thanks much for the tip :-)!

Buzz: Yes, I think using Cocoa improves one's design skills.

Pradeep: I know about ObjcUnit, OCUnit, O2Unit, and Log4Cocoa. As far as I know, they're newer than the Java equivalents and not as well supported. That's not to take anything away from the people who ported them to Cocoa; it's just that the Java community to support them is so much larger. Another example is Javadoc and AutoDoc. AutoDoc is a great piece of code, but no one seems to be working on it right now and it doesn't have anywhere near the number of doclets.

I see a lot of people here writing about the elegance of Objective-C + Cocoa. I wish I could see it. I've experimented with Obj-C/Cocoa, but to my feeble mind, there isn't much that's more elegant than Java. I guess I just have to spend more time with Obj-C/Cocoa to see what everyone's talking about.

May I offer one comment about the presence of popular, powerful libraries in Java such as Log4J and JUnit -- regardless of how elegant Obj-C/Cocoa are, Java is acknowledged to be one of the most elegant languages to use for general Windows and Linux programming (especially when you consider that the bytecode works on either platform). And as everyone knows, there's a tremendous amount of work being done with Java in enterprise app development. It seems like by far, the majority of the people on the JBoss, Jakarta, etc mailing lists are Windows or Linux users. But every day I see another person mentioning that they're now using OS X, so hopefully this will change with time.

Scott Ellsworth

It comes down to where the work is, I believe. You do not see as many people talking about using a Mac because those doing so do not need to call attention to themselves - they no longer need special treatment in the Java space.

I have been doing Java for five years now, and using Eclipse to do it for a year. Log4j got in my code several years back, and JUnit just got in this last year. I have used a TiBook as my primary development platform for two and a half years, though I used Macs for my personal work starting in 1990.

Publicly, I do not make a big point of using a Mac for my consulting work, since the people paying the bills want the project done, not a rundown on how you did it. Even though I used a TiBook to develop a bunch of experiment capture and gene annotation software, you find few direct mentions of that on the associated mailing lists. That is a good thing - it means that Apple has a competitive Java platform.

I am currently between contracts, and am trying to get back into the Cocoa groove. It goes well - the tools are pretty good if not up to Eclipse, and the AppKit is really much better designed than Swing. (I got someone producing real code displaying non-trivial stuff in a few hours, rather than the weeks it seems to take to get to that space in Swing.)

I do miss the cool refactoring features of Eclipse. If you have not seen what they can do, you owe it to yourself to give it a try.

That said, I really do not think it is the libraries that lack, but instead, the tools. Were Apple to find a way to make Eclipse talk Cocoa-Java or Cocoa-ObjC, they would have a mighty tool.

Scott

Leave a Comment