Download NetBeans!

20070508 Tuesday May 08, 2007

JavaOne Day One

Woke up tired and groggy in the wee hours. Jetlag and hangover are not a good sleep's best friend. Watched some movies on the hotel TV. Some are really excellent. By now I must've caught up with most of the better movies produced over the past year. I highly recommend Breach, Man of the Year, and The Number 23, though the latter was slightly freaky. Over the past few days I 've seen many other movies on the hotel TV, with thanks to my buddy jetlag, but can't remember the others off hand, so they must have been average. At some point, I fell asleep again, waking up several hours later, part way into the Sun Technical Session, which I would've arrived at in the final few minutes, so didn't bother. Received an e-mail in bed, telling me that the OpenJDK announcement had been made, so pushed the NetBeans Tutorial live as agreed. Finally made my way to the conference center and hung out in beanbag land, catching a few minutes of Rich Green with a mobile phone in his hand.

US Department of Agriculture

Then met with NetBeans evangelist Ashwin Rao and Olaf, who is from the US Department of Agriculture (USDA). His team has developed on top of the NetBeans Platform since 3.6. The application looks really awesome, making full use of as much of the IDE as possible. The application is called "Object Modeling System" and is written for scientists for the analysis of wind, water, and erosion models. Initially the USDA had their own framework that did something similar to the NetBeans Platform, but maintaining it became too much work. I'm going to be meeting with Olaf again and probably doing a technical interview with him soon. That will be published on http://www.netbeans.org soon thereafter. I'm hoping for lots of tips and tricks from him and some pretty screenshots!

Packaging Applications for Ubuntu

Then I went over to "TS-7361: Packaging a Java Application with Ubuntu". On the way, I bumped into Mark Harman, who is building an application on top of the JFugue API, just as I am doing. I'd invited him to join Dave Koelle, myself, and other music-related programmers this evening for dinner. Got to the presentation, not extremely crowded, but then packaging Java applications for Ubuntu is a pretty narrow topic. Jeff Bailey provided a conceptual overview and then Harpeet Singh explained how things went when he packaged Glassfish for Ubuntu. His part of the talk was really practical and I noted down pretty much most of what he said, after he finished talking at some length about Glassfish and all its components. So, here's what you need to do if you want to package a Java application with Ubuntu.

  1. Decide on the number of packages you will provide for your application. For example, if you have platform-specific binaries, they go in their own separate packages. It is also good to subcomponentize, so that the end user can be very selective and only choose those packages that are really needed. For example, in the Glassfish context, JAXB is a separate package because some might want to use JAXB without using the rest of Glassfish. Harpeet explained that Glassfish was collapsed from 18 parts to 4 packages: messaging queue, derby (people should be able to work off JDK5, which doesn't bundle Derby), some system-specific Glassfish utility, and then the entire Glassfish itself.

  2. Figure out licensing, which is especially tricky if you have multiple subcomponents. Often one doesn't have a choice, but when one does, the legal issues might be complex. For example, JAX-WS has its own license. So, in the case of Glassfish, they needed to deal with licensing issues for each of the 18 parts.

  3. Identify the Ubuntu component to which you want to deliver. For example, "multiverse".

  4. List your dependencies. For example, JDK 5.

  5. Package everything up. This is the technical bit I came to the session for. I learned the following:

    • Use system tool dh_make. This creates default Debian files like controls, rules, changelogs.

    • Use debuild from the devscripts package.

    • Modify the rules file to write build rules.

    • Modify control file to define runtime dependencies for your packages.

    • Modify prerm and preinst to add preinstallation scripts.

    • Modify postrm and postinst to add postinatallation scripts.

    Quotable quote from Harpeet: "What I like is that the user downloads and installs, without needing to do any configuration. And the application starts up by default." This means that his preinstallation script ensures, among other things, that when Glassfish is installed, its 'domains' are created. (These are Glassfish-specific folders with user-specific content.) When you uninstall, you probably don't want to purge the domain, hence, this kind of requirement goes in the postinstalltion removal script. Then Harpeet showed a series of files, which were pretty interesting. He showed a control file and a rules file, to show what they look like. They seemed pretty readable to me.

  6. Sign your packages, upload packages to the Ubuntu server, using a tool called dput. For information on this part of the process, see http://revu.tauware.de/. Then you receive feedback from Ubuntu folks, make the requested changes, upload again, get more review comments, upload again, etc., until everything is stable and of a sufficient quality for distribution via the Synaptic Package Manager.

After that useful walk through of everything required, it was back to Jeff Bailey, who ended with a "Lessons Learned" section. The lessons learned reflected what Harpeet had already said, such as that you need to make sure to get your licensing issues sorted out at an early stage. The whole session's key "take home" message was that packaging is non-trivial but worth it. Why is it the right thing? Because it means you're doing the right thing for your users and you're widening the audience for your software architecture. When the technical session was over, I talked a while with Trung, who was there as well. Talked about packaging, but more about Groovy and Grails, in which we're both interested, in terms of tooling support for NetBeans IDE.

Continuations

Next I had agreed to meet with Toni at the java.net booth in the Pavillion. He had told me he was going to do a presentation there on his https://jarvis.dev.java.net/ project. It turned out that the java.net people have a whole program of short "mini talks". They're really excellent, half an hour each, which is much more bite-size than the hour long BOFs and technical sessions. As luck would have it, I arrived half an hour early, just as RIFE creator Geert Bevin was setting up for his presentation, which happened to be right before Toni's. So I enjoyed a very cool presentation on continuations. He is excellent when he compares continuations to "Save Game" in video games. Basically, to paraphrase him, don't you want to save the game right before you try to slay the dragon? And what specifically do you want to save? The location and your possessions, not the whole game. You also want to be able to reload the game at that particular point where you saved it. The game is the application, the save game is a continuation, the progress within the game is the location in the program, and possessions such as potions and swords represent the state of the application. Transferring this analogy to a web application, you don't want to save everything, you want to capture the progress of one particular person, with the state of the action, but the server is unchanged and stays running. One captures from where the function starts, not the entire application, which is known as a partial continuation. All very interesting.

Afterwards I showed Geert the Rich Client Programming book. He seemed interested in working through the chapter on web frameworks, so he'd be able to create a plugin for RIFE for NetBeans IDE. That would be great. I've been planning to do something similar, but haven't had the time recently.

Jasper Report Visual Designer

Toni very enthusiastically presented Jarvis to the world. He explained everything about it, such as the fact that it is based on the Visual Library API, the XML MultiView API, and the Jasper Report JARs. He was extremely positive about the Visual Library API, saying that even if the audience was not interested in his visual designer, they should definitely give the Visual Library API a look. To me, Toni's work on Jarvis is the best external non-company based NetBeans development work I've seen. And it came totally from himself (and one or two others in Munich) without prompting by anyone from Sun or NetBeans. The coolest part is that his visual designer for Jasper Reports can be integrated into any application based on the NetBeans Platform. So, it isn't only relevant for NetBeans IDE, but for other applications too. In fact, someone had asked him whether this was possible, and wanted to actually go ahead and do that. That is pretty cool and further evidence of the pluggability of NetBeans modules. One very cool feature he showed was the ability to drag an image from outside the IDE, i.e., an image in his filesystem, and drop it within his report. One can also drag a table from the Runtime window and drop it into a report. He said he wanted to make the visual designer increasingly component-based, so that the drag and drop items will increasingly focus less on fields, but more on tables and higher-level items like that.

Miscellaneous

Other things that happened or that I did today:

  • Gave a book to Kirk Pepperdine from TheServerSide.com, so that he can review it. He was really positive about getting it and impressed by its general look and feel. I'm looking forward to his review, which he said could be posted in a variety of places, beyound TheServerSide.com.

  • Signed up for a mini-talk at the java.net booth. It is scheduled for 11.30 tomorrow, goes on to 12.00 and will introduce you to the JFugue Music NotePad. It will kind of be a warm up for my part of the technical session on Thursday at 10.55.

  • Met Greg Doench from Prentice and arranged a book signing. It will take place at the bookstore on Thursday, from 10.30 to 11.00, right after Tim and Jarda's TS-3742: Modular Programming with the NetBeans Platform

I also attended the JMaki technical session to see Greg Murray in action, as well as Ludo and Craig McClanahan. It was interesting to see. It was cool when I talked to Ludo afterwards, when he told me that I was "committer number 3" in the JMaki world (i.e., the first after Greg and Ludo), for some spontaneous documentation that I wrote for the JMaki project page, this time last year.

And right now, the final part of today, I'm in the OpenJDK session, listening to Mark Reinhold talk about the current status of the OpenJDK project. Read a really good blog entry by Dave Bristor, called Working on OpenJDK using NetBeans on the OpenJDK project in relation to NetBeans IDE. Building the OpenJDK sources under Solaris, is described in an interesting blog entry here. I like the idea of Sun wanting to build a community around the JDK. Looking forward to writing lots of little (and not so little) tutorials around the OpenJDK in the coming period.

I don't think I'll be attending any more technical sessions or BOFs today, because I'm going out to dinner with Dave Koelle, from JFugue, and several other music-related programmers right after this session. It's been a good if slightly hectic day, but very educational with lots of opportunities to follow up on.

Cool moment of the day. Wow, Mark Reinhold has just said some very nice praiseworthy things, in the middle of his technical session, about the Getting Started with OpenJDK in NetBeans IDE tutorial! What a nice way to end today's JavaOne report.

May 08 2007, 03:33:18 PM PDT Permalink

NetBeans Day 2007

NetBeans Day 2007 was memorable for its large variety of short, powerful demos. That's what I really liked about the day. In particular, the many improvements to the Matisse GUI Builder, demonstrated by Tomas Pavek, were really powerful. My favorite was the one where he selected a bunch of JLabels and JTextFields, then right-clicked and chose "Enclose", which revealed a long list of submenus, each representing a Swing container. So, he chose JPanel and then a JPanel was created and everything he'd selected was added to the JPanel. Then he did the same thing with a JTabbedPane and everything selected was then added to a brand new JTabbedPane. But there were many other things he demonstrated in Matisse, such as the ability to select stuff and then copy them below, above, to the left, or to the right of the selection, with the container automatically resizing, that I thought were really cool.

The day began with Jeet Kaul introducing Jonathan Schwartz and Rich Green, who bantered a bit on stage. I found the hint that open source developers might/should get paid quite interesting. Somewhere during the start of it all, some guys from Sprint showed the Sprint IDE they had developed on top of the NetBeans Platform. The JavaPosse session during lunch was kind of fun and laid back and I later queried and had confirmed that each of the presenters wears a particular colored hat each time. So it wasn't random. Like, Tor wears the blue hat every time, for example. After that there was a meaty session on many mainly editor improvements in NetBeans IDE 6.0. Jan Lahoda and Arseniy showed those, I presented Schliemann, and Jirka and Gregg demonstrated the many improvements to the Profiler. I'm really glad I managed to use Ubuntu for my presentations, despite not having figured out how to display my screen on the wall and my laptop at the same time. (But someone kindly sent me a copy of his Xorg file afterwards, showing what I need to do next time.)

Here's a pic of me in action, with my new friend Ubuntu 7.04 just visible in the background, taken by NetBeans Director Honza Chalupa (he has many other high-quality pics of the last few days here):

Then followed the Swing Application Framework talk. It was interesting to see what the status of that project, and also beans binding, is. Like I indicated at the start, it was especially cool seeing Tomas Pavek's demos on the various enhancements to the Matisse GUI Builder. A lot of applause and cheers of happiness at various points of his story. The JRuby story was great too. In particular, I liked how the session showed the power of tooling in adding usability and productivity to a language. So, the JRuby guys presented the JRuby language and talked about its many parts, then Tor and Martin showed all the tooling that they had built around this language. It was pretty clear that the JRuby guys were pretty impressed by the tooling that was shown, focusing on editor and debugger extensions.

And then the day came to a close. James Gosling led the closing session, which featured Henry Story and Tim Boudreau about the semantic web, me about the NetBeans Movie Player, and a guy called Bob about his dog and how he feeds her remotely via Sun SPOTs and the Visual Web Pack. The latter story was met with much laughter. It was really great, how much he'd achieved on 7 months programming knowledge. The pictures of the contraption he's assembled (with a red marker pen being "the piston", for example) for feeding his dog were hilarious. Along the way, we also were shown the extremely cool new NetBeans magazine and the start of the very promising http://netbeans.tv/. I'm looking forward to us getting the next magazine available as a hard copy, because it is truly excellent. Leonardo, the guy behind it, is doing just about the greatest work imaginable on that magazine and I know what I'm talking about since I contributed an article to it. The results are awesome and getting better each time. This time round, for the first time, each article is unique, i.e., not reused from anywhere. Also, 400 copies of Rich Client Programming: Plugging into the NetBeans Platform were given out at the end of the day. (Jarda, Jens, Tim, and I had a mini ad-hoc book signing with Tom Wheeler's development team, which was kind of funny.)

So, NetBeans Day was cool, with 1000 to 1100 attendees at peak times, which meant a very full room. I met an amazingly large number of people throughout the day, including Juergen Schmidt and other developers from Germany, who work on the OpenOfffice.org integration with NetBeans, Erwin, the OpenOffice.org blogger, prominent Sun blogger Jim Grisanzio, as well as filthy rich clients Chet Haase and Romain Guy, several old(er) acquaintances, such as Jens Trapp, Kirk Pepperdine, and Klaasjan Tukker, and a few new ones, such as Dave Bristor from the OpenJDK team. I also met NetBeans guru Tom Wheeler with his team of NetBeans Platform developers, as well as several Sun colleagues who I seldom see, such as Octavian, Sandip, Charles Ditzel, and Ashwin. In addition, Mark Harman, who develops on top of the JFugue API, Dave Koelle, the creator of that API (and my co-speaker in TS-1130 JFugue: Making Music with Java MIDI and Illustrating API Usability on Thursday at 10:55), Bob (the guy with the Sadie feeder automater, or D.O.R.K., which stands for something like "Dog Oral Reward Kit"), plus the JasperReport Visual Designer creator Toni Epple, and Vadiraj Deshpande, who works in Sun's Bangalore office and has kickstarted a project to create an open sourced MultiView Editor Generator for NetBeans IDE. There were several embarrassing moments when someone came, smiled, and expected me to know them, and I basically didn't because their face had slipped my mind or I'd actually only met them once before, briefly, in a completely different context, and therefore should not be expected to remember them for the rest of my lifetime on the basis of that one encounter, I reckon. :-)

I really met too many people to mention them all and my brain is fuzzy from alcohol consumption that occurred in various locations throughout the later hours of the day. There was a NetBeans party aftewards, with good food that I had too little of because of long engrossing discussions with various people. In a way, I ended up with more food for thought than food for stomach, especially from NetBeans architect Pavel Buzek. The day ended in the Sports Bar near Union Square, which (based on last year and various stories I've picked up) is where most NetBeans people tend to end the day. Slightly seedy place but apparently there's Czech beer. But there wasn't and so I had to settle for yet another disappointing American beer. That's one of the only real disappointments of the day... being told you're going to get Czech beer and then finding yourself holding American beer. For the rest, it was a great day with a lot of information being passed and gained. Looking forward to the rest of the week.

Funniest moment of the day. James Gosling saying: "This is going in a dangerous direction", as it became clear that Bob was about to end his presentation by giving him a plastic bone on behalf of his dog Sadie, in gratitude for indirectly enabling his Dog Oral Reward Kit to be created.

In other news. Many parts of the JDK have been open sourced today, such as the sources of Hotspot and Swing. What's the main URL with info? Here: http://openjdk.java.net. How to get the sources and work with them? See: Getting Started with OpenJDK in NetBeans IDE.

May 08 2007, 07:03:38 AM PDT Permalink