I now completely understand why Apple has dropped support for the Cocoa-Java bindings (that were quite nifty)--they've moved on to Ruby. I stumbled across the Ruby developer samples in the dev kit the other night and was amazed at the depth of integration with the language.
First, the UI can be defined using nibs (Cocoa-Java never had that). Next, Ruby is more closely linked to Objective-C than Java ever was. I didn't get too deep into it, but the application I looked at started life in a .m file and quickly transferred all control to Ruby. I don't know how easily Ruby could cede back into Objective-C (I assume Ruby has some kind of native API), but it all looks possible.
Ruby, it seems, is the new Java. The writing is clear and unmistakable--Apple is dumping Java. I am a little miffed because Java is my first language. Don't worry--I'll get over it. But I would like to understand better what made this happen. Keep in mind that I am and outsider looking in, but here are a few ideas:
1. The relationship with Sun and Apple has soured.
Sun used to have at least two Java engineers working on the Apple campus. That went away years ago though (when Sun first started having problems). However, Sun and Apple were pretty clearly working together and must have had a somewhat healthy relationship. I'm not sure how much the difficulty of licensing Java3D soured this relationship, but gosh, it must have had some effects. Currently, as a developer, I feel as if I'm sitting in the middle of an adversarial relationship (Java 6, where are you?). Either Apple is unwilling or unable to get help from Sun.
2. Apple realized that developers were moving on.
Java isn't the fresh new face it once was. Developers are slowly realizing that some of its warts will not be going away anytime soon (Sun moves so slowly in this regard), and have begun experimenting. Groovy, JRuby and now Scala are obvious examples that Java developers yearn for the expressiveness of dynamic languages. And dynamic languages (mainly Ruby and Python) move ahead adding new features at a rate that makes Java seem antiquated. It appears that Python will even drop features (break old code!) in future releases. Amen!
3. Apple was frustrated.
At Sun. At itself. At developers. The Cocoa-Java bridge never did develop much of a following. The only product that I [knowingly] used that was Cocoa-Java based was Lux, a [very fun] Risk clone.
I don't know what the take is. C++ programmers were probably having similar thoughts in 1996. (...What!? Product X is adding support for that new toy language?) Life marches on, and so does technology. At some point Apple will move on from Ruby, or Erlang or Python or whatever the cool new cat of programming languages is. As evidenced by the fact that there is still a market for Cobol programmers, we need not worry about becoming antiquated too soon. :)
28 January 2008
OSX: Java to Ruby
Posted by Gary Dusbabek at 04:17
Labels: technology
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment