When Sun Microsystems began looking at what needed to be added to the Java platform, high on the list was support for dynamic languages, according to Graham Hamilton, a Sun vice president and fellow in the Sun platform team.
Sun was interested not only in providing support for so-called dynamic or scripting languages—which enable developers to build applications more quickly than with static languages such as Java—but also in providing better support for popular languages overall, Hamilton said.
The company is looking to make changes to the next major version of the Java SE (Standard Edition) platform after the upcoming release, according to Hamilton. That release is known as Java SE 6 and is code-named Mustang, but the follow-on version to that is Java SE 7, code-named Dolphin. Hamilton discussed some of the features that are expected to appear in Dolphin.
In an interview with eWEEK, Hamilton, based at Suns Santa Clara, Calif., headquarters, said the company is moving to provide enhanced support for scripting languages such as JavaScript as well as for popular languages such as Microsofts Visual Basic on the Java platform.
“The Java language is a great language,” he said. “There are other language styles out there. Some people like using scripting languages, some people like using dynamic languages and some people like Visual Basic.”
What the company is not trying to do is clone any specific version of Visual Basic, Hamilton said. Sun is attempting to support common VB.Net features on the Java platform.
“If youre familiar with VB.Net, this will be a very easy-to-learn language for you,” Hamilton said of the Basic implementation Sun is working on.
Meanwhile, Sun has also delivered a technology preview showing JavaScript support on the Java EE (Enterprise Edition) Web tier, he said.
Sun has demonstrated an application that uses JavaScript, both on the client in the browser and on the server side. The application uses AJAX (Asynchronous JavaScript and XML) effects within the browser and then makes calls back into JavaScript code running on a Java EE application server.
Why the need to provide support for varied platforms?
“There are different kinds of languages with different strengths,” Hamilton said. “We tend to think Java is great for long-lived, maintainable source code. We put a lot of thought into making Java a language thats clear and easy to read.”
But there are times when, for instance, a marketing department has a Web tier, GUI presentation layer that appears to change every other day. “[If so,] you may want a language thats focused on a more exploratory style for rapid turnaround—where continual change is more important. Scripting languages are really good for that,” Hamilton said.
Developers may also “choose to have a mixed development style where you use Java for long-lived business logic and then you use scripting languages or dynamic languages for your presentation tier—where your presentation tier is changing rapidly,” he said.
Sun is also working on projects to support dynamic languages such as Ruby on the Java platform and the Python language on the Java platform.
Meanwhile, developers who work in Java every day chimed in to share their views on where Sun is taking Java.
“I like what they did for scripting in Java SE 6,” said John Zukowski, a developer with SavaJe, in Boston, a maker of Java software for mobile devices.
“If Java SE 7 includes more scripting languages in the standard platform, I can see it being useful for people who work with the scripting languages now,” Zukowski said. “With [Java SE] 6, you get the framework and JavaScript. There are many other scripting languages besides just JavaScript, so making some of the more popular ones standard could be beneficial for those users.”
John Crupi, chief technology officer at JackBe, in Bethesda, Md., said enhanced support for dynamic languages “should be a top priority for SE 7. More and more AJAX and so-called Web 2.0 capabilities will drive Web computing for the next few years.”
“If Java doesnt have a good scripting/dynamic language story, [Sun] will be sitting on the sidelines,” Crupi said. Crupi was a distinguished engineer at Sun until earlier this year, when he moved to JackBe.
Benjamin Booth, a developer with WebMethods, in Fairfax, Va., said scripting support in Java is “hugely important. Ruby is my new favorite language, so Im very interested in finding ways to use it wherever possible without completely cutting over from Java.”
Moreover, “with so much money invested in Java libraries, rewriting everything in Ruby doesnt make sense,” Booth said. “JRuby shows how this is possible and makes a strong argument for Rubys usefulness in enterprise development.”
For Bruce Snyder, a developer with LogicBlaze, in Marina del Rey, Calif., scripting language support “is one of the most important features because it will allow Java to compete at a level at which it has neglected to date.”
Snyder said he sees the rise in popularity of Ruby as “a testament to the fact that not everyone needs a compiled language for a simple database-backed Web application. Adding scripting language support to the Java platform will extend its influence and life in ways that nobody can foresee today.”
Not all developers were big on the scripting support.
“The scripting I could care less about, as I am not sure the level of leverage scripting will play in Java,” said Jeff Genender, CTO at Savoir Technologies, in Evergreen, Colo. “The interoperability with other languages of it will be interesting … but I still think the jury is out on whether this will have any widespread impact in Java development.”
Meanwhile, Cedric Beust, a developer at Google, in Mountain View, Calif., said of Suns plans to add more support for dynamic languages: “Im afraid its too little—and probably too late as well. The only added support is one bytecode in the virtual machine that—while a big progress for scripting languages—still requires a lot of work from language developers interested in writing a JVM [Java virtual machine]-based scripting language.”
Hamilton said other new features to come in Java SE 7 could include upgrades to the Java language itself, including better support for XML.
LogicBlazes Snyder said that while he likes the idea of making it easier to navigate XML, “Im not particularly fond of the idea of supporting in-line XML directly in the Java language. XML literals are already supported by the likes of Groovy et al., and I think thats a good place for it.”
On the other hand, Beust said, the use of a LINQ-like module “might be inevitable for enterprise software, so you might as well integrate it so the compiler can help you write it correctly.”
Meanwhile, Hamilton said Sun is looking at a couple of other Java language changes, including one called “super packages.”
“Super packages are a new, higher-level scoping mechanism,” Hamilton said. “And the developers we talked to are quite excited about that because that is solving a real problem for large-scale development.”