Thursday May 08, 2008 Groovy, JRuby, Jython, Scala: Who Wins the Script Bowl?
Wednesday's Script Bowl was indeed what the caption promised, a rapid-fire comparison of scripting languages. Four developers took on the challenge to convince the audience of their language of choice -- in only three minutes per round. Guillaume LaForge represented Groovy, Charles Nutter represented JRuby, Frank Wierzbicki represented Jython, and Jorge Ortiz represented Scala.
All four languages compile to Java bytecode, but what distinguishes them? The jury, made up of Roberto Chinnici, Carol McDonald, and Ola Bini, made the four contestants compete in three categories: Each developer had prepared three demos, a desktop application, a web application, and one free-form app that shows off what the particular scripting language does best. After each round, the host Rags Srinivas encouraged the attendees to vote by sending text messages.
The rich client app demos were first. The task was to implement a desktop client that allows you to log on to Twitter and view your friends' feeds and status, and search for text in their postings. The ability to post was not required, but some of the demo'ed clients could.
The Groovy implementation clearly followed the MVC pattern and the language features made it very easy to parse the XML input; the GUI made a good impression. The JRuby implementation was designed using the NetBeans GUI builder (Matisse) and the Profligacy library, and therefor looked like a native app on MacOS; the users of this JRuby app will also appreciate that the build script generated native executables for different operating systems. The Jython app could save time by reusing an already existing model for accessing Twitter APIs; still the app was an odd one out, since it had to be started from the Terminal, and despite having a GUI with buttons to select Twitterers, the output was printed to the Terminal (frankly it looked as if he didn't have time to complete the UI). The Scala developer got started quickly by extending a SimpleGuiApplication class for desktop apps; Scala also made it easy to parse XML input, and the jury pointed out the clean error handling.
Next came the web applications. The application should access a MySQL database containing a world factbook, allow the user to browse facts about countries, and sort entries by criteria (language, population, etc). Additionally it should display the selected cities on a map.
The Groovy developer of course relied on the Grails framework together with Hibernate to access the database. The web application contributed by the JRuby community relied on the Rails framework and hooked up the components using the NetBeans IDE. The Jython web application relied on the Django framework with good-looking results. All three web applications made good use of their respective web frameworks and came with nice user-friendly web interfaces. Only the Scala team failed to produce the required web application and lost votes accordingly; instead, they demo'ed two other web apps, a chat client and a task list that use Ajax to keep the view up-to-date.
A quick look at the votes shows that JRuby and Groovy are presently the most popular choices in the audience... Will Scala and Jython catch up in the last round, where each team gets a chance to show off what their language can do best?
The Groovy representative decides not to show off demo apps, but instead he convinces the audience by talking about the seamless Java integration that Groovy is famous for. But then the JRuby submissions wow the audience with their smooth visual beauty: The first demo is a Star Wars-like scrolling Twitter client; the second demo is a 'Face For Steven Hawkins', a flock of colored dots that vibrate and change colors in response to audio input. Yes, admittedly, not very useful, but... pretty! The Jython representative chose to demo the Terminal-based Python help system that will soon be integrated into Jython too. The Scala demo was an application that searches and counts words in RSS feeds; it showed very well how Scala handles concurrency in minithreads.
Before the results were made public, the audience had a chance to pose questions to the experts. Asked about the relation of JavaFX to the other languages demonstrated today, Charles Nutter explained that each language was justified by its unique approach, so he does not see JavaFX as competition, but a powerful contribution to the variety of scripting languages. Another attendee asked how exactly languages such as Scala integrate with Java? All scripts written in these four languages compile to Java bytecode (war or jar files) that run on the standard JVM. Regarding Scala, Jorge Ortiz remarked that calling Java libraries from Scala apps is however easier than calling Scala from Java apps.
Finally, Rags announces the winner: JRuby! Groovy comes second, then Scala, and Jython (Check the final results in Rags' Blog, A=Groovy, B=JRuby, C=Jython, D=Scala). Jython had produced good results, but may have lost a few points for the terminal hacking required to start the applications, since all other contestants used IDEs. Although it felt a bit rushed and it was sometimes hard to pick up the details, this format of comparison is very suitable to get an overview of the "contestants".
Posted by seapegasus ( May 08 2008, 10:52:09 PM CEST ) Permalink Comments [4]Innovators Grant Winners Announced
As Tushar already mentioned, the NetBeans Innovators Grant winners have been announced!
We're working on a page detailing the projects so you can get a picture of what to expect from the acronym-titled ones, too. :)
Posted by seapegasus ( Apr 17 2008, 01:52:08 PM CEST ) Permalink Comments [0]Free JavaOne Passes for Students
If you're a student and you can be in San Francisco between May 5-9, then don't miss JavaOne and CommunityOne. CommunityOne (Monday) is free for everyone to attend, but if you fax us a proof of enrollment from your college, you also get a free pass for JavaOne! What will you get?
Here you get the free student registration for CommunityOne and JavaOne. Curious about the sessions? Here is more info:
Hope to see you there! :)
Posted by seapegasus ( Apr 11 2008, 12:45:12 PM CEST ) PermalinkJust wanted to mention that the review period of the NetBeans grants submissions has been extended until next week (see NetBeans Grant page).
We knew we'd be getting a lot of submissions, and there are so many good ones that it's hard to decide. You guys and girls submitted very detailed project descriptions, which shows you put a lot of effort into your planning, and we want to give each of them a fair share of attention during the evaluation. So please bear with us until we announce the winners next week!
Posted by seapegasus ( Apr 03 2008, 08:20:33 PM CEST ) Permalink Comments [1]Innovators Grant Deadline Extended to March 7
There is still time to submit a proposal for the open-source project of your dreams–and be awarded a grant (US$ 11,500 or 2,000) for implementing it!
Bruno Souza announced on the nbusers mailinglist that the submissions deadline was extended to this Friday (March 7, 2008) to allow more countries to participate. (Giving out a grant is restricted by very different laws in each country, and it was not easy to get permission to offer a grant in this form everywhere.)
Over a 100 developers submitted proposals for plugins, books, localization projects, and web and desktop applications. I really look forward to see them become reality, you guys and girls out there have great ideas, and the skills to do it!
Get your team into gear, read the Innovators Grant rules, and send your proposal this week!
Posted by seapegasus ( Mar 04 2008, 12:17:36 PM CET ) PermalinkSooo... Does this mean... If I write an open-source lunar lander control software.... Can I win both? >:-D
Check out the NetBeans wiki, there are more ideas what you can implement to win one of the grants. Get together with your hacker buddies and write your project proposal now! The deadline is in 10 days, on March 3 2008.
(*) Google always have to one-up us. Or, in this case, twenty-up. *sigh*
Posted by seapegasus ( Feb 22 2008, 03:37:41 PM CET ) PermalinkPix From the NetBeans Chat on Second Life
Since Roumen forgot to take pictures during the Netbeans chat in Second Life yesterday, here is one for you.

As Roumen already mentioned, the chat was well-attended (20-30 people I guess), allthough I had trouble finding the theatre. So I came a bit late but I finally learned the event was at the south end of the island. What you do when looking for an event in a big place: Fly up and around and try to find an agglomeration of people (dots) on the minimap - that's where the action is.
I had to leave after an hour already, I would have liked to stay longer and chat a bit more, but then my laptop ran out of batteries (me and James attended from an internet cafe, and wireless just drains the power). And then, when I left the cafe - I spotted an extension cord behind a corner only 5m away from me - bummer.
Well, when you get on Second Life the next time, don't forget to look for the Sun Microsystems pavillions, the island is pretty stylish! There are hardware and software showrooms, free t-shirts and coffee, a beautiful bay, and even a public sandbox.

This brave office mouse (we named her Koko) does not fear the wildest doc writers. You can even poke her, and she just looks at you, shrugs, and then keeps on munching her chocolate.
Wait.
OUR chocolate! >:-o

PS: And no, she didn't come in the NetBeans box, Troy put her there. (Because it's cuuute!)
Posted by seapegasus ( Jan 16 2008, 02:45:24 PM CET ) Permalink Comments [1]CHOCOLATE! No, sorry, NetBeans Day Frankfurt (4)
If you haven't been at the NetBeans Day in Frankfurt, you missed the cool presentations by the local developers. Toni Epple and Sven Reimers introduced us to their respective projects, which both rely on the NetBeans platform:
Toni Epple is a Java developer at Genomatix Software. Click the product icons to see video demos of his NetBeans platform-based apps: ChipInspector for instance helps experts assess the effect of drugs on genes. (No, not those kinds of drugs.) Being a java.net community leader, Toni has also initiated several open-source projects, including Jarvis (a visual Jasper report designer for NetBeans IDE), and the Peppy plugin, dedicated to porting Java performance guru Kirk Pepperdine to the NetBeans platform! :-)
Sven Reimers uses NetBeans for his SQE project. This quality enhancement plugin combines the power of tools such as Findbugs, PMD, CheckStyle, Dependency Finder into one highly configurable tool. Both developers extended the NetBeans IDE or Platform respectively to fit their needs. But where to start? Sven outlines the process:
First, read the excellent platform documentation on platform.netbeans.org. When you get hooked, read the books that are available in English and German. Also have a look at the IDE source code to see how stuff is implemented.
For starters, create a plugin that just adds a menu item. Then have it dump some text to the Output window. Wrap some useful library into your plugin and access its APIs. Learn to add a view, and customize it. Go step by step and implement one piece of functionality at a time. Toni for instance described how he ended up adding custom file types, and even custom views for his genome viewer (using the Netbeans Visual Library).
The NetBeans platform is feature-complete and only updated about once a year (together with a new NetBeans release), so it's stable and well documented. As an experienced developer you can migrate your application from platform 5 APIs to 6 in a day. Of course you dou don't have to. But every time you do, you get new usability features "for free". For example, in apps based on platform 6, you can dock and undock all windows just by using the default NetBeans APIs.
Another question was, whether a platform app could be a front-end for a Java EE app? Yes, there are even demos available that show you how to create clients and servers. Tip: NetBeans projects have a webstart setting that automatically builds a web-ready JNLP file for you.
Between the Community speakers and the next session, Roman stepped on the stage again and acknowledged the community's team effort that went into the localization of the IDE for university students. NetBeans IDE 5.5.1 is already available in German, and work on NB 6_de has started. Peter Heusch received an award as a representative of the team, as did Jake Jackson and others (in absence). Thank you all for your contributions!
Next was an interesting talk by Karol Harezlak about mobile Java applications. I like the new support for scalable vector graphics (SVG) in the Mobility pack. Hm... I still have a half-finished mobile game lying around... I'm tempted to rewrite it using SVG, but will my old phone support that? Need to investigate.
Karol also demoed a typical Java ME application that allows you to connect to a servlet from your phone to look up data in a database. He also showed the new game builder for creating these little 2D maps for mobile adventure games. Read more about the updated Mobility pack here.
The last talk, Tools for Simplifying SOA, by Sang Shin, was still very well attended, although it was already after 6pm. But Sang is an icon and you just want to see his talk. :) I won't describe it here, not only because I have no clue about the details of service-oriented architecture, but mainly because Sang has the fantastic habit to provide step-by-step scripts for his talks on javapassion.com! There are all kinds of free Java classes too (incl Java FX script soon), have a look.
Apart from walking us through his demo, Sang also explained aspect oriented programming: I cannot explain it very well, but you apply this concept when you want to add code to certain cases (e.g. make a security check every time a setter changes text), but it would be too much of a fuss to add this manually to every method. One question from the audience was: When Sang talked about reliable web services, somebody remarked that .NET interoperability and "reliability" were not even clearly defined, or, were they? Yes, they are! Sun and Microsoft really sat together once, and defined interoperable technologies, google for WSIT.
So, and now I'm gonna drink my hot chocolate. :-P
Posted by seapegasus ( Dec 15 2007, 05:17:34 PM CET ) Permalink Comments [1]Here you can watch the little Sun Tech Days Frankfurt video that I shot last week in Germany. Three cheers to iMovie that turns any mobile cam video into cinematic art. ;-) (Though I have to admit I completely forgot to use all those cool framing effects! And most of the fancy transitions I couldn't use since they garbled the audio of the target frame, don't know why.)
The video contains shots from the 10 year anniversary of Sun Tech days (with James Gosling and Reggie Hutcherson), including happy German developers carrying special anniversary edition gingerbread; and a few crazy shots from the talent show, where local developers again topped each other performing stunts and dances to win a cool Sun jacket... You will wish you had been there. ;-)
Posted by seapegasus ( Dec 10 2007, 03:38:50 PM CET ) PermalinkIn the next talk on NetBeans Day in Frankfurt, Roman showed us how to create a RIA with Netbeans. In case you never heard of the acronym RIA: RIAs are interactive and (hopefully) userfriendly rich internet applications.
As opposed to, say, an HTML form, they can do everything a desktop app can, but in comparison to a desktop app, you don't need to install the RIA (instead, you start it via your web browser). So are RIAs better? "It depends" on the application. On the one hand, you save time and disk space, but on the other, you are dependent on your internet connection and the RIA provider.
Examples for RIA technologies that you use every day are Java applets, interactive Flash or ActiveX web pages, AJAX/JavaScript-enhanced pages, or web-starting Java applications (JNLP). And as soon as the tools are released, JavaFX will be another option (more below).
And speaking of Java applets: They kinda used to be the "mother of RIA". If you knew Java, you could build a powerful interactive platform-independent browser applet, without the need to learn a whole new technology like ActionScript or ActiveX. So why are there so many Flash pages? The advantage of these other technologies over Applets is that they presently are more responsive, and load faster in the browser. If it wasn't for the performance, I would rather reuse my existing Java code and write Applets, instead of learning ActionScript and starting from scratch. Roman mentioned that Applet performance is one of the things getting fixed in the upcoming JDK6 updates, and there are also plans to make it as easy to install the Applet plugin as it is to install the Flash plugin - sounds cool, I think I will give Applets a second chance.
For the many JSF developers who were present, Roman creates a visual web sample app that uses JMaki and Ajax. He drops a Yahoo map widget, a Google map widget, and a Dojo geocoordinate component from the palette onto the design canvas, and runs the app. In the web browser, both map widgets update in response to input to the geocoordinate widget - and we haven't even written a single line of code yet. The code snippets immediately work together because they use the same standards. Then Roman creates a similar sample application that accesses a Derby database, with a nice-looking Yahoo DataTable control integrated into the UI.
The third example of a RIA is the GWT mail app. Click the About link at the top-right to see a RIA-style dialog. The GWT (Google Web Toolkit) is very handy for Java developers who need to create these kinds of Ajax applications, but don't know Javascript well enough. So you write your stuff in Java (with JDK6), and GWT converts it into equivalent HTML+JavaScript. Neat! There's also a NetBeans plugin for the GWT, check it out.
One question from the audience was, whether there was a GUI Builder for GWT? Not yet, but you can join a community project dedicated to fix that.
Many wonder where the new JavaFX will come in - yes, it is the perfect fit for Java-based RIAs: You can use existing Java code for the back-end, and add declarative JavaFX script for the GUI, the effects and animations. To get a first impression of JavaFX, install the JavaFX plugin and sample (using the NB6 plugin manager from the tools menu). Then create a new project and select the JFX Weather sample, or the JFX 2D tutorial: Click the preview button (an eye icon) and then change the code in the editor. You will see live changes in the editor's preview area.
Question from the audience: So, is JavaFX for designers or for developers? Roman explains that there will be tools for designers to create the UIs in declarative JFX script, while the developer writes the back-end in Java. Since both are basically Java, you save time otherwise spent with integration. Keep an eye on JavaFX, especially if you are considering to mix different unrelated technologies in your RIA project, or if you are about to invest a lot of money in expensive web animation tools.
Stay tuned, more NetBeans Day reports (and pics) are coming...
Posted by seapegasus ( Dec 06 2007, 05:18:40 PM CET ) PermalinkMystery of the NetBeans Cube Solved!
Did you catch one of the mysterious cubes during a tech day this year? This photo story of Andrii, the Ukrainian Sun Campus ambassador, reveals their dark secret...

Next, Janos Koppany from Intland (Stuttgart) introduces us to his Jolt-award winning change management tool, CodeBeamer. He compares CodeBeamer to other project hosters like Sourceforge - its purpose is to help a team to manage their application lifecycle. Check out javaforge to get the picture. You'll see that Codebeamer has a web interface that offers tons of services (cvs, wiki, build management, forums, bug reporter, etc) for your team. There is an integrated CodeBeamer plugin for NetBeans for developers, and a webapp version for managers. (A plugin for 6.0 will soon be released).
Next one is Jaroslav Bachorik. He demos a NetBeans feature that, to his surprise, only a small number of developers in the room know and use: The NetBeans profiler.
But now there is no excuse anymore, since the profiler is now fully integrated and pre-installed in NB6. :-P The catch about profiling is: If you profile a whole app, the whole results gathering process will most likely run pretty sluggish. If you however restrict profiling to critical parts, you will gather results much faster. The NetBeans profiler understands your project and lets you select individual methods to profile.
So, a question form the audience was, whether it was possible to profile a set of methods described by a regular expression, such as "foo*bar"? No, currently, the star operator does only globbing (org.package.*). To get results for a subset, you will have to profile a superset of methods and then filter the results by the specified regular expression.
Jaroslav also shows some real-life use cases, among them an actual memory leak that a NetBeans user found in the HttpUnit app. The user noticed that the number of generations (= objects of the same age) increased and a certain kind of objects was never garbage collected (object age = how many garbage collections it survived). He found out that the problem was an array of exception objects, silently caught and collected, until the array overflowed.
Another interesting feature are profiling points (similar concept to debugger breakpoints): How often do you add code here and there just to count how often a method was called, or when, or how long it ran? Don't clutter your code with these unrelated things, use profiling points instead. :) Learn more (e.g. a heap walker) about the profiler on the new product pages.
Posted by seapegasus ( Dec 04 2007, 06:08:42 PM CET ) PermalinkReporting somewhat live from the NetBeans day in Frankfurt, Germany!
Which was yesterday. But I jotted down a lot of incoherent notes that I will post here so it will almost feel as if I was posting them live. Just one day later. :)
Presently it's very gray and stormy in Frankfurt, a city famous in Germany for its technology and business tradeshows, its traditional Christmas market, and the exceptionally high number of skyscrapers (I counted ten). To get in the mood, Martin Balin and Roman Strobl tried to steal each other's show by speaking a few lines of German in the welcome session, and the 150-200 developers present appreciated it, since most of the other speakers spoke English only.
Interest in NetBeans is clearly rising within Germany: A quick poll shows that the majority of the audience knows and has used NetBeans before (and only half of them also used Eclipse); three German books using NetBeans have been published this year (I will write more about them later this week); there are two German developers in the NetBeans DreamTeam; NB5.5.1 was localized into German by community members (and work on NB6 has started); As a "reward", the release of NetBeans IDE 6.0 (and the homepage redesign) are announced first at the NetBeans Day in Frankfurt. :)
Roman's next poll revealed that about 10% of the attendees have visited the community video page netbeans.tv. For the rest who don't know it yet, Roman quickly shows one of the crazy "help we need to deliver NetBeans CD to palestina" road movies. By the way -- from now on, we will send out DVDs (instead of CDs), and they do not only include installers and the JDK, but also tutorials.
After this introduction to the community, Roman demos an example of the NetBeans Platform, and then finally, the freshly released IDE:
If you're an Eclipse user, feel free to try it and tell us whether you think the editor is now on par with the Eclipse editor -- e.g. concerning code generation, smart code completion, inline rename, mark occurences, annotations, javadoc, syntax highlighting, and a local history to easily revert small changes, hints, fix imports. Also try to run, stop, and rerun an application, using the play/pause buttons.
One question from the audience was, whether the keyboard shortcut card is dynamic or static. The PDF card in the help menu is indeed static. I couldn't catch the guy who asked after the talk, but if you are reading this: You can find out how to generate your custom keyboard shortcut card here.
Roman also demoed the updated GUI builder: Matisse now assists you even when you create a Java desktop application that you want to use to display and manage content from a database (CRUD = create/read/update/delete). Roman's real estate manager app includes a map viewer to visualize actual locations, and uses beans binding to connect the GUI to the database. While he whips up a whole database-aware desktop app in minutes, we learn that we can copy&paste whole sets of components in the GUI builder, that we can add e.g. the swingx image renderer into a GUI app (drop non-visual components next to form to access them), and that we can set the application's cmdline arguments and look&feel in its properties. A dialog also allows you to add your own type converters or validator classes to the GUI.
Apart from cool new Java frameworks, version 6 also supports other projects types and languages such as Ruby,/a>, C and C++, and there will be plugins for PHP, JavaFX and groovie. As an example for the half dozen Ruby developers in the audience, Roman creates a Ruby on Rails weblog in a few minutes.
PS: I took a fantastic photo series of somebody opening one of our new cube shirts! Or shirt cubes? If you got one of these mysterious cubes: It is not a stress ball! It's really a shirt! You will see when I post the pictures... (Will post them on Thursday -- I took lots of pics but of course brought no cable to connect my cam to the mac...)
Posted by seapegasus ( Dec 04 2007, 05:30:15 PM CET ) Permalink Comments [2]New Issue of the NetBeans 6 Magazine
NetBeans IDE 6.0 is here, and with it, a new issue of the NetBeans Magazine!
Download the full PDF to print it, or download individual chapters as PDF to read.
Posted by seapegasus ( Dec 04 2007, 12:21:35 PM CET ) Permalink