Showing posts with label sun. Show all posts
Showing posts with label sun. Show all posts

Monday, January 14, 2008

Language Wars 2008

Two interesting blogs inspired this post. First, there is the amazing analysis of the great Neal Gafter. And then there is the insightful rant of Rick Hightower.

I have to admit that I am getting on the Scala bandwagon. Here is why I think Scala is important. Note, most of this is just me ripping off Neal Gafter :-)

There is great potential in languages with control abstraction. Scala is just such a language. It is possible to implement the actor model, a shared nothing, message based design for parallel computing, in Scala. This is not possible in Java. You can do it in Groovy, sort of, but it can be awkward. The reason for this is simple. If you have a object call method call closure (for example) the closure can return control back to the object in Scala, but only to the method in Groovy. The extra control structure coupling in Groovy makes some aspects of control abstraction awkward at best.

And then there are pattern matching (no not regexp) and case classes... The point is that there are syntactical advantages in Scala that make it possible to handle concurrent programming in a completely different, more scalable way. So it is not just about lines of code and what not, it is about being to do practical things in a better way.

Now Rick's main point in his rant, is why invest in JRuby and Scala when there is Groovy. Hopefully I've given at least one reason why Scala has potential that Groovy does not. When it comes to Ruby, the answer is less technical and more social.

On the technical side, it is very conceivable that by the end of the 2008, the absolute best way to deploy a Rails application will be to use JRuby. That is partially because of the current state of native Ruby interpreters, but also just because of how powerful the JVM has become. Sun really wants this to be the case, and here is why.

Sun knows what it takes to introduce a new language and platform and make it the de facto standard in the industry. It is very hard and expensive. They have done it once, and it cost them dearly. Java cannot stay at the top forever. They do not want to fight this battle again. However, if they can get the Rails on JRuby scenario described above to exist, then they could "stay on top" without having the fight all of the battles this time. They let the Rails community do it for them. They let guys like DHH and Martin Fowler win over the hearts and minds, while they simply concentrate on making JRuby run screaming fast.

But wait, there's more. Sun really wanted NetBeans to be the premiere Java development platform, but IBM beat them with Eclipse. They get a second chance if Ruby becomes the new de facto standard, and this time they have a head start on IBM. Sun is imagining a future where there are armies of IT developers writing Rails apps using NetBeans and deploying them to Glassfish.

Now all of the above may be possible, maybe even easier, with Groovy. But then they have to fight the language wars all by themselves. They have to win over the hearts and minds of developers to get them to use Groovy instead of C# or PHP.

That is why it makes more sense for Sun to back JRuby than to back Groovy.

That is also why you should not expect Sun to get behind Scala until they have no choice.

Friday, May 11, 2007

JavaFX Tools

As I mentioned earlier, I gave the JavaFX plugin for Eclipse a try. I was not too impressed. So I went through the monstorous download of NetBeans 6.0 and installed the JFX plugin for it. I'm still not too impressed!
jfx

Again this was basically just a text editor with the JFX runtime automatically launched. No palette or even much code completion. There was a little syntax highlighting, but that was about it.
Ok, so I know this stuff is really new, and I shouldn't be too critical of it. However, I read this exerpt from an interview with Sun CEO Jonathan Schwarts from OnJava:

In response to a question about JavaFX and JavaFX Tools. Whether Sun was planning on charging for FX tools.

Schwartz: “The world is divided into two camps, those who can and will pay for technology because its expense is less than the inconvenience of not having a support contract and those who cannot and will not pay for software for whatever reason, economically, culturally or the business just doesn’t need it. Our economic motives are to go after the former camp, our technology objectives are to go after the latter camp. Because almost by definition given what Dr. Diallo(sp?) just said, they out number the former camp 50,000 to 1. So volume defines market opportunities for everybody, you need only look at the internet to have that proven to you. It’s up to us to figure out how to monetize those volume opportunities in and among the communities that are capable and interested in doing so.”

Hmm. So now I'm thinking that designer like tools for JFX will be coming, but they won't be plugins to Eclipse and NetBeans. The big advantage I thought JFX might have over Flex and Silverlight was its free-ness and open source-ness. Not only would that make it attractive to adopt but would also open up third party enhancements. What's a Java technology without at least a dozen different frameworks built for it?

Now I'm thinking that this won't be the case. Sun will try to monetize JFX in the exact same way that Adobe and Microsoft monetize Flex and Silverlight. There's nothing wrong with this, it just means that JFX won't have one potential advantage over those technologies. That doesn't mean it won't have other advantages, as mentioned in previous posts. Its architecture may make it much more suitable for designer-developer workflows and rapid development.

I still think Sun is missing a huge opportunity. They could be the disruptive technology in all this, but it sounds like they won't go that route. So much for "Open Possibilities."

Tuesday, May 08, 2007

JavaFX

I guess the big news out of JavaOne today is JavaFX. The more I heard about it, the more it sounded familiar. Sure there's the obvious comparisons to Flex and SilverLight (more on that soon) but there was something even more familiar about it. Then I realized it: F3! I had read about F3 just last week (you can see it on my del.icio.us links) and had given it a try. So it turns I've already been running JavaFX.. Here's a picture of the F3 Calculator running on my laptop:

One of the most interesting things is the white space on my desktop. The F3 Calculator is part of it actually (or vice versa really.) There's probably some bugs to be worked on here! Also notice the little F3 icon in my system tray. You have to use that to close the calculator. The whole thing launches using Java Web Start, which is a good thing.

So yeah, JavaFX has a lot in common with Flex and SilverLight. Even in name. Microsoft had WinFX which became Windows Presentation Foundation which became Windows Presentation Foundation / Everywhere which became SilverLight. I'll say some of the same things about JavaFX as I said about SilverLight. If they could actually achieve "my dream" of writing a UI once and having it render nicely as a web app, a desktop app, and (most importantly) a mobile app, then it will be a huge success. I don't think anyone is close to that, yet.

JavaFX could actually have a lot more legs to it than SilverLight. It will be completely open, unlike either of its competitors. That should give it a huge advantage. That open nature should also mean a lot of creative integrations with the huge open source Java ecosystem. That's how JavaFX could win over developers. The key will be for Sun et. al. to deliver adequate tooling for it, as it is a UI language. Adobe already provides good tooling and Microsoft is sure to do the same. Sun's doesn't have to be as good as the Flex/SilverLight tooling, but it needs to be close. If it's not as good, you can expect to see other folks in the Java community step in.

Speaking of tooling, Cedric has a good rant against JavaFX. He smelled Sun trying to get people to use NetBeans, but as you'll see in the comments, there is an Eclipse plugin. Maybe the Jigloo guys can work with it, too. The better point that he makes is that Groovy SwingBuilder does a lot of the things that JavaFX promises to do. Maybe Sun should have leveraged that. I haven't tried JavaFX out yet, so I can't say if it has any syntactical advantages over Groovy. I must agree with another commenter that Sun doesn't seem too fond of Groovy. They seem much more interested in embracing Ruby via JRuby.

Update: I tried out the JavaFX plugin for Eclipse last night. It is quite bare-bones. It basically just lets you run a .fx file from Eclipse. No visual editing. It didn't even seem like there was any extra syntax help. I will try out the NetBeans one, but it sure looks like Cedric was right on about Sun once again trying to push NetBeans on people.