The Java platform can be used to interpret more than just the Java language — it has expanded its coverage to include Ruby and Python, with PHP to follow shortly.
We sat down with Matt Thompson, director of Sun Developer Network, and discussed Java’s move into scripting language interpretation in the first half of a two part interview.
Builder AU: What’s the strategy with the Java Virtual Machine and scripting languages?
If you look at the evolution of software development today, it really is being driven by the faster time to prototype.
Completely fairly or unfairly, creating a full blown user interface with Swing is a lot of work. So developers are looking, for Web based applications particularly, at how do I create a user interface in as little time as possible.
They are likely not going to go and hire 10 designers and write a whole bunch of user input code — so that is at the forefront of driving the lightweight Web app quickly.
Remember that a lot of people think that Java is a previous generation language, it’s actually at its core a kind of scripting language. We have now added things like compilers and the ability to generate byte code on the fly. But fundamentally, if you think about it, it was to the world of C and C++, the ability to write code and generate code faster.
And we are moving to the point where we want to go even faster.
There are things that are still very hard to do in Java and other like platforms, but it’s just really easy to do with things like Ruby and PHP.
We are looking at that and going “you know, the key is that the Java platform was probably misnamed, we have a world-class runtime and a language with the same name” — the Java language and the Java platform. For years people have proven that the Java platform is useful to things other than just Java.
So the thinking here is: how do we enable developers to go faster? How do we enable them to tie into frameworks and runtimes that they already have? While also leveraging this rock-solid virtual machine that we’ve got?
Are you targeting 100 percent scripting language developers, or developers that are already using Java?
I think that there are a number of ways that this technology will proliferate. The first way that we care about is providing capabilities to those Java developers today that have invested heavily into Java and the Java platform and are looking to now either accelerate in the Web space or provide really lightweight frontends to enable mash-ups etc.
There is this concept that is starting to emerge that Web frontends, Web applications, Web services are both consumable and potentially time bound in their lives. Meaning that in a perfect world, wouldn’t you want to create a customised interface for each one of your customers along the way, or every user of a particular application?
The reason we don’t do that today is that it takes a tremendous amount of effort to write a completely customisable, morphable interface in technologies like Java — however that’s because the cost to create that sort of interface is so high.
What happens in the case where you could pull together a user interface in minutes, and deploy it within seconds? Wouldn’t you then create the ability for users to customise their own user interfaces of your application?
Maybe even be willing to throw away a particular user interface after an hour, a minute or 10 minutes of use. Create it for an instance and then remove [it].
That’s a lot of the usage we are seeing around Facebook and technologies such as that. Where certain users will gain access to a friend’s population so they’ll want to interact in a certain way: IM, pictures, video, audio, whatever, and then just have all that go away. That’s the extent of their actions, they want it to go back to whatever interface they were using previously.
We have some technologies that we will be showing off in the spring, that kind of take it to its next logical step.
I would suggest that support of scripting languages while using the Java platform as the base, is strategic to what we want to do and pretty much what most developers want to do.
Is the focus shifting from Java the language to Java the platform?
I would actually say there are places where the Java language is critical. We are not going to do transaction processing in JavaFX or PHP, it’s just not going to happen. But you might create a user interfaces for a transaction based system using those technologies.
Will developers be able to share objects between JRuby and Jython?
The Jython one is an interesting question, one in which [we] haven’t quite got our minds completely wrapped around yet — lots of support from within the community to do something there and write more support for [it].
But in the JRuby case, let’s use JRuby and Java, the answer is absolutely.
Would you be able to do it using other J-like appendages to that runtime? We believe the answer should be yes, we still need to work out the details.
When you are working with the open source community, a lot of the time you have to show them why something is valuable to get them to adopt it. In the JRuby case, we’ve had huge success in being able to get that community to understand the value.
Is there much work needed to get a strictly typed JVM to run dynamic languages?
The power of open source is that by opening up how the Java Virtual Machine works, we enabled the folks in the Ruby community to go look at how the JVM executes and compare that to how native Ruby executes. That caused a lot of work to be done outside of Sun.
Are we adding capabilities within the Java Virtual Machine to support things like Ruby? An answer is that that work was already done, we actually did that going back almost two years when we announced that we were going to provide scripting support through the JCP and the JSR capability to enable support for all sorts of scripting languages.
So the work was already done and was really a matter of the open source community going “we can actually use that now”. The only work we are doing on the Java runtime right now to support these things, it’s almost orthogonal, the question [is] for Java to be a standard for client side applications. We needed to do something to the runtime to make the runtime even more ubiquitous and more accessible, and that included narrowing it down in size, making it [perform better] on start-up, things like that.
It’s really wasn’t about adding functionality for any individual scripting languages, per se, it’s more about getting the Java RE to be more responsive and more appropriate for places you would see client side usage required.
In a perfect world, would the JVM run every interpreted language?
If James Gosling [“father” of Java] was sitting here, I think his answer would be: “I don’t see why not”.
We certainly haven’t looked at that.
Fundamentally, what you want is an extremely high-powered, high-quality, high performance runtime environment for scripting capabilities — that’s what we have with the VM.
It has the capability of providing that type runtime support for lots of different scripting languages, and we are seeing more and more of that work come to fruition.
Could we see LISP running on the JVM?
There are a number of what people would term “older, research orientated” languages, and LISP certainly fits in that to a point. But it seems to be relegated to research at this point.
That they are like “if it is the language capability that we need, and the work is in supporting the runtime, can we [as Sun], with the open source community as well, do some of the work ourselves?”
I know of several universities that are working on supporting languages more arcane than LISP, specific language capabilities for older scripting languages to run on the Java runtime, just because it’s easier for them, they don’t have to maintain a runtime and a language.
Why do you no longer see Microsoft as a competitor?
I think there has been a sea-change among the company, it certainly helps when you get through the legal issues and start co-operating with a company of Microsoft’s size. Certainly we took the view that we have more in common than we do different.
If you were to look across Sun’s Top 1000 customers, you’d probably find almost everyone of them using Microsoft technologies as well. If you looked across Microsoft’s Top 1000 customers, a large percentage of them are using Sun technologies.
So this idea of being these polar opposites, who’s in the middle? The customer. And that was never the intention. Scott [McNealy] never meant to put the customer in the middle, he was just taking easy shots at the big company that exists in Redmond.
The other thing that I am constantly looking for is where developers are focused and mindshare. If you map out a developer community within a region or across the world, I can tell you what technologies are on the upswing and on the downswing.
So when we look at that we see that, we see the world as not suddenly switched to Windows based native desktop applications again.
So if that’s not where developers are focusing their attention, then where are they focusing their attention?
Why is Ruby interesting? Because it has gone from 50,000 to 250,000 developers in the space of a year. If you look the world population of developers it would be somewhere between 12 and 15 million, depending if you count students and people using older technology, 250,000 is a really small number but as a growth rate we talking about 10 percent of the market within 2-3 years. That’s high growth, it’s massive, it’s as high a growth as we saw in Java within its first year.
Do I expect Ruby to get as big as Java? No, but I do expect it to be significant.
So where is Microsoft with Ruby, Python, PHP? Strong support, but what we are seeing is that we have a whole class of VB developers that have gone from workgroup class applications to being told “I want your application on the Web now”.
Deploying VB to the Web for an external site, Microsoft has enabled but it is a pure Microsoft pool and it is bound to IE and it is using what I would assume to be less than public interfaces to do that work.
A number of these companies that are not completely Microsoft shops have said “OK, if we have to take this functionality that represented a workgroup application before and move it to the Web, for either our customers, our partners or just our remote offices to give access to [them]. How are we going to do that? Maybe we should consider using something else.”
What you are seeing is those companies that are technology locked to Microsoft are starting to use IronPython and some of these other things to do some of that capability. What we are seeing is Microsoft developers moving within their own sphere of technology, moving from VB to some of this newer technology. That’s great, in my opinion there’s also a chance for them to move off the Microsoft platform.
Do we see 20-year-old start-up people, may have dropped out of university, [and are] taking up a new technology, building the next great personal networking app focused on Microsoft technology? We see none of that. None.
We’ve got Twitter which is classic case. Were they ever bound, did they ever really consider a Microsoft stack from the perspective of what they were doing? No. So what did they take? For us it was great: Sun hardware, Solaris, and now Ruby and JRuby. That’s a Sun story — but it’s picking up Sun technology, picking up pieces of other people’s technology and a tremendous amount of open source technology and deploying services.
So from a mindshare perspective, in that space, Microsoft has a lot of room to grow. They’re a strong company, I think that they will figure out what the magic agent is and we’re all going to look at it and say “Wow, they made significant gains here”.
Google was the same, it wasn’t a focus on “what do we use from Microsoft to do this?”
What is the justification for supporting PHP if you are interested in upward trends?
PHP has certainly undergone a couple of transitions and relative all these other technologies it is certainly older than these other technologies.
PHP has kind of undergone a revolution, in that a generation of Web designers have grown up now with PHP as one of the core tools in their toolbox. From that perspective there is a huge number of developers that start from “I want to create a service for people”, whether it be going back to the Internet Bubble and any of those companies that failed, they started with “what service do I want? And how do I quickly get that out?”
I think what you are seeing is Ruby provides a framework with Rails that you do to some of the surrounding infrastructure very very well. For custom one of things, PHP is the best thing you can use — custom input stream, custom output streams, management and presentation of your Web site.
Whereas Ruby allows to build that entire Rails framework to build your Web site much more easily, but you have to accept that there are limitations in the Rails framework that allows you to do some things really well and some things get a lot harder.
You see where Sun is going to place the bets, we’ve not going to cover the entire gamut of technology but we are placing our bets on which technology we think will be the winners, and those discussions are going on everyday.