Skip navigation

Message in a Module Blog

Posted by kfarnham Jun 29, 2007

The debut of Java modules

So, I go and complain about how slow things are, and what happens? One of the premiere features of JDK 7 drops its first snapshot. Which feature? Only the new module system for Java, addressing the complaints we've had about JARs for years. Obviously, I'll need to re-ping by featuring these on the front page again sometime next week.

For now, the debut comes to us courtesy of Stanley Ho, who offers a number of items in his info-dump weblog OpenJDK Modules project: Early snapshot, video, and more.

We have just made an early snapshot of the JSR 277 (Java Module System) and JSR 294 (Improved Modularity Support in the Java Programming Language) implementation available through the Modules project on OpenJDK:

This snapshot currently covers the core features (see Andreas's blog) described in the updated specification in JSR 277, and the reflective APIs defined in JSR 294. If you are wondering how the module system works internally and want to take an early look or even contribute, I encourage you to check out the Modules project.

Stanley goes on to describe some of the other goodies provided by the modules project, including a getting started guide, some samples, and a NetBeans project for those of you who want to hack on the module system code itself.

Expect to hear much more here about JAM's --JAva Modules -- as the development of JDK 7 continues.

Also in today's Weblogs, Roger

Finding and fixing bugs in heavily concurrent code

A strong understanding of concurrency and threading is one of the traits that distinguishes the best Java developers, in every permutation of the platform. Servers by their very nature are heavily multi-threaded, good desktop developers know to thread off expensive work and unblock AWT-Event-Dispatch, and ME developers often have to carefully manage threads and other resources in order to coexist with other apps in the same small VM.

The concurrency utilities introduced in Java 5.0 offer various ways to achieve high efficiency with threads. For example, theReadWriteLock interface andReentrantReadWriteLock class give you a convenient means of providing concurrent read-many, write-once access to some resource.

It also provides some means of thoroughly messing up your application. What if you forget to unlock? Or what if you have a read lock and you try to perform a write operation? These mistakes can create subtle, hard-to-fix bugs.

Fortunately, there's help in today's Feature Article, Ran Kornfeld's Extending the ReentrantReadWriteLock

This article was not written just to tell you about these pitfalls and send you on your way, but also to introduce a solution, which comes as an extension to the ReentrantReadWriteLock class. This extension (actually a composition) will wrap the lock and add more capabilities to help you overcome the specified problems.

In Java Today, the Filthy Rich Clients project hosts sample code for the upcoming book of the same name by Chet Haase and Romain Guy. On his blog, Romain recently announced the availability of demos for chapters 5 (Performance) and 6 (Composites). Ultimately, the project will host the complete collection of demos and examples found in the book

The blog has published an interview with Mobile & Embedded Community Leader Roger Brinkley. "Roger and I had a chance to visit recently and talk more about his involvement in leading the community. Read on to learn a little more about what goes on behind the scenes in this thriving community..."

In an opinion piece on JavaLobby, Clemens Eisserer asks Why Doesn't Google Bet On Java? "Google is well-known for doing almost everything possible using Javascript and to have a lot of knowledge in this area. Sometimes this works very well (like for GMail) and sometimes not (like for docs & spreadsheets). [...] But why? Its like building a school-bus with a motorcycle engine just because these engines are there. "

Today's Weblogssection starts with some Quick feedback from Jazoon by Fabrizio


So Lonely Blog

Posted by kfarnham Jun 27, 2007

Welcome back to the developer summer doldrums

Every year, around July, it happens: things getsllllooooooowwwwwww. And it's happening already. JavaLobby posted no new stories yesterday. InfoQ only had one (at least with the Java-only filter on). Some of my other morning-check sites, including Artima, TheServerSide, and Café au Lait have been pretty slow too. Announcements from the communities have trailed off, as has blogging.

With apologies to the Southern Hemisphere, this is a Summer effect we've seen before. In the Java world, it's compounded by all the companies and projects getting their major releases out for JavaOne in May, then basically going dark for a few weeks (or months) while everyone recovers from the crunch. I've talked about this before, making the point that avoiding the JavaOne news crush and instead releasing in mid-Summer would avoid competition for attention and get you a lot more notice.

It's especially slow right about now, with the Independence Day holiday coming up -- O'Reilly is closing down for July 4-6, giving employees a 5-day weekend, though we'll still be updating every weekday as usual. I imagine there are a lot of svn logs that are going to show far fewer commits in June and July than in April and May (or September, when things crank back up).

So, if your project has a release coming up, be sure to let your community leader know to put it on the community web page, or just e-mail me (cadamson at with details. We'd love to help you get noticed, and every tip we get about a great project means less digging for news in this slow season.

Fortunately, we still have a stack of podcast recordings from JavaOne 2007 to edit and publish. Our latest JavaOne Community Corner Podcast is j1-2k7-mtT08: Building Composite Applications Using Open ESB 2.0, from speaker Prakash Aradhya. "OpenESB is the next generation integration platform developed by open source community. is the project that encompasses Open-ESB project. Open ESB is based in JBI architecture. It is fully integrated in NetBeans and Glassfish, other popular open source projects. Open ESB offers a rich set of tools to build SOA based integration applications. In this talk you will learn how to build a composite application using Open ESB. You will understand how to leverage existing enterprise applications by building a new class of applications called Composite applications. Visit for more detailed information on how to get involved in this open source community."

In Java Today, the JSR-275 project is the home page for the JSR-275 (Units Specification) expert group's collaboration, and has updated versions of the draft spec in its documents and files section. JSR-275 specifies one or more Java packages for the programmatic handling of physical quantities and their expression as numbers of units.

"Type arguments to generic classes are not available for reflection at runtime - or are they? The type arguments for statically declared types can be discovered at runtime." Ian Robertson's Artima article Reflecting Generics has a look at how to do this, and why you might want to.

Issue 297 of the NetBeans Weekly Newsletter is out, with a preview of the IDE Shootout at JUG Cologne on July 3, the Dream Team Profile of Edgar Silva, Putting Flickr on Rails, Resolving Java ME Device Fragmentation Issues, NetBeans Google Toolbar Module Tutorial, Extending the NetBeans API Wizards, and more.



Walking on the Moon Blog

Posted by kfarnham Jun 26, 2007

Another strange trip with Flying Saucer

Now here's an irony... despite the usual trend of media formats having being more readable than writable, PDF's may be easier tocreate than to view in Java SE. Adobe's own PDF component is long out of date, and many alternatives are commercial, although a list at does show some open-source readers. But for just writing PDF, the open-source iText library is available and quite popular. So popular, in fact, that the Flying Saucer project adopted it as an optional rendering technology.

In our Feature Article, Flying Saucer founder Joshua Marinacci takes a look at Generating PDFs for Fun and Profit with Flying Saucer and iText:

PDFs are a great format for maps, receipts, reports, and printable labels. Flying Saucer and iText let you produce PDF files programmatically without having to use expensive tools or cumbersome APIs. By using plain XHTML and CSS, your graphic designer can use their existing web tools like Dreamweaver to produce great looking CSS templates that you or your developers plug in to your applications. By splitting the work, you can save both time and money.

In Java Today, the JFXBuilder blog talks about the latest feature effort, MouseOver Animations in JFXBuilder/JavaFX: "This week we've been playing with a user friendly way to easily configure graphical and animated actions for common input events, like MouseOver and MousePressed. JFXBuilder already has a shape custom tailored for this called a "SwitchShape". The basic idea is to select a group of shapes that we want to react to a mouse event, select the menu item "Group in SwitchShape", then simply configure the look of the different "versions" (MouseOver, MousePressed, etc.)."

The GlassFish Plugins Project enables IDE users to develop, deploy and run their Java Enterprise Edition (Java EE) applications using their favorite IDEs. Available plugins support NetBeans (included with NetBeans 5.5.1 and 6.0 M9), Eclipse 3.3 Europa with WTP 2.0 RC3, Eclipse IDE 3.2 and MyEclipse. There are also NetBeans plugins forjMaki, Phobos, and more. The project is also actively seeking more developers to develop plugins for other IDE's.

ComputerWorld is hosting an excerpt from Java Data Mining: Strategy, Standard and Practice by Mark F. Hornick, Erik Marcad and Sunil Venkayala. "This book excerpt uses an example sales campaign to introduce the Java Data Mining application programming interface. From data preparation to modeling to evaluation and deployment, the short example gives a feel for the business problem and solution."

In today's Weblogs Greg


Synchronicity Blog

Posted by kfarnham Jun 25, 2007

The concurrence of a web service stack's various pieces

So why Metro? What's the deal big enough for several of our bloggers to be talking about it last week? I think Kohsuke does a great job explaining by example:

I think this move is a bit like the one we did with JWSDP, for those of you who remember. Back then, we've been developing a bunch of composable but independent technologies (JAXP, JAXB, JAXM, SAAJ, JAX-RPC, JAXR, ...), and we realized that for most people they are too fine-grained. It is more convenient to be able to get them in a bundle, with a lot of testing to ensure that pieces work together.

In many ways, Metro is just that. The JAX-WS RI is made highly extensible and pluggable, so that enabled us to build composable but independent features (like transaction, security, reliability, custom transports, Spring support, JSON, ...) on top of the basic web service. But for most users, especially for those who are not using a dependency management system like Ivy or Maven, this is actually a nightmare, because you need to deal with a dozen or more of small jars. And as the number of configuration increases, people feel less comfortable about whether their particular configuration is tested.

So while it looks like a merger, or at least a friendly affiliation, of two projects under a common GlassFish umbrella, Metro can be more than that. It hopes to be a single destination for those who need an integrated, tested web services stack, yet still be flexible enough for those who want to swap in different pieces.

In light of this, we've cast this week's Spotlighton Metro. Combining the JAX-WS RI and WSIT projects, Metro bills itself as "a high-performance, extensible, easy-to-use web service stack. It is a one-stop shop for all your web service needs, from the simplest hello world web service to reliable, secured, and transacted web service that involves .NET services." More information and perspective is available in introductory blogs byKohsuke Kawaguchi, Arun Gupta, and Harold Carr.

We begin the Java Today section with a related project. The JAX-WS Commons project, part of Project Metro, has added JSON Support for JAX-WS. "JAX-WS supports a "pluggable encoding" -- meaning it can use formats other than textual XML. This extension takes advantage of this and allows JAX-WS services to be exposed via JSON. JSON support is implemented as a custom binding. So just like there are SOAP/HTTP binding or Plain Old XML binding, you can specify JSON binding to expose a service as JSON service."

Work has begun on a new version of the Servlet API with the submission of JSR-315, Java Servlet 3.0 Specification, to the JCP. "Servlet 3.0 specification will work on extensibility / pluggability. Web framework pluggability will be a key driver of the Servlet 3.0 specification. As part of the revision for Java EE 6 we would like to revise the Servlet specification to support the Ease of Development (EoD) using the newer language features. Also along with EoD there have been requests for enhancements in other areas as well to support the modern next generation web application development." Balloting for this JSR closes on July 2.

Portlets define a streamlined way to aggregate content from several sources into a single Web application. In an MP3 interview with Artima, Use-Cases for Portlets, Brian Chan, chief architect of open-source portlet vendor Liferay, describes the use-cases for portlets.

Differing notions of Beans Binding top today's Weblogs. Shannon


Dissidents Blog

Posted by kfarnham Jun 22, 2007

The movement to overthrow Java's checked exceptions

So over the last few weeks, we've covered the debate in the community over the idea of ditching checked exceptions. Some developers have complained about checked exceptions over the years, but so far, it's mostly just been talk. Every now and then, you see frameworks where all the exceptions areRuntimeExceptions, and thus don't require handling, but it seems like those speaking most strongly against checked exceptions have moved on to other languages, often highly dynamic languages where checked exceptions don't make sense anyways.

But recently, Neal Gafter openly explored the idea of removing checked exceptions from Java, in response to a suggestion from a colleague who noted that much of the complexity in Gafter's closure proposal came from reconciling closures with checked exceptions. That got a strong reply from Elliotte Rusty Harold, whose Voting for Checked Exceptions calls the very idea a "hideous idea from the closures camp." Elliotte continues:

The people who object to checked exceptions mostly seem not to know the difference between checked and unchecked. Most importantly, they seem not to know when to use checked exceptions and when to use unchecked exceptions. A few libraries such as the Java USB API even get this exactly backwards. And I will admit, if you don


Weightless Blog

Posted by kfarnham Jun 21, 2007

Let your clients take some of the load off your webapp server

In our second webapp feature article of the week, we take a look at the RAJAX project, which allows you to move more of your webapp out to the client side. As the project page says, "The main goal is to create a library that at runtime will generate a proxy JavaScript class to a server side Java class allowing the web programmer to invoke remote methods in the local JavaScript object."

Paulo Lopes offers an introduction and tutorial on RAJAX in todays Feature Article, An (Almost) CPU-Free MVC Pattern with Ajax . Paulo says that with RAJAX, you can move some of your model and view logic over to the client, for example using XSLT in the browser to do client-side rendering and presentation rather than forcing the server to do that work.

But is this the right idea? Paulo says:

It is clear we can do it, but why we should do it is the next question to arise. Everything works fine with the current paradigm, so why make a change? To me, it is clear that this change should be made for the same reasons we started using Ajax in the first place: web applications were slow, suffered from network latency, etc. Ajax brought the data layer to the web browser; now we bring the layout layer to the web browser, too. By doing this, we get a clear separation of code and data, and simplify the code necessary for displaying a view in the browser by using XSLT transformations in a template instead of a big HTML file.

The more the clients do, the easier it should be for your server to scale. What do you think? Is this a workable approach for your webapp?

In Java Today, InfoQ reports that the first GNU Classpath/Sun Java hybrids have begun to appear. In Hybrids Combine GNU Classpath and OpenJDK, Xandy Johnson reports "The hybrids combine GNU Classpath with Java code that Sun has recently released under the GPL either to improve an existing project or to further the goal of having a completely Free JDK." The article covers projects from IKVM, CACAO, and Red Hat.

Jersey is the open source JAX-RS (JSR 311) Reference Implementation for building RESTful Web services. Jersey also provides additional APIs and extension points (SPIs) so that developers may extend Jersey to suite their needs. Jersey is currently available as an early access implementation. Jersey cannot go to version 1.0 until JAX-RS reaches the final release and is an approved JSR. Until that point Jersey will track the JSR 311 API and will regularly update according to 311 Expert Group agreed snapshots of the API

In the latest Java Mobility Podcast, entitled A Swarm of Cheap Robots on Mars (Or Wherever You Need Them) , Bruce Boyes, CEO of Systronix, describes TrackBot, a small robotic device with built-in sensor modules that provide beaconing, obstacle avoidance, spatial awareness, communication, and navigation. Add a SunSPOT device to TrackBot, and the result is a powerful but affordable strategy for large-scale deployments in swarms and collaborative robotic behavior (see also TrackBot on YouTube).

Today's Weblogsstart with Sean


Radio Silence Blog

Posted by kfarnham Jun 19, 2007

About halfway through the mini-talk podcasts

As you'll recall, we've offered mini-talks from project owners and other community members in the booth at JavaOne for the last three years, and for the last two, we've recorded them for podcasts. Last year, we tried to get them out quickly, in an attempt to capture the immediacy of the show, but a lot of them got lost in such a dramatic push, so this year, we've been taking it easy, pushing out two mini-talks a week, usually on Wednesday and Friday.

Looking at the raw files on my drive, I think we're probably about halfway through the mini-talks, at least those that are viable. Here, for example, is what the Wednesday audio folder looks like:


At the top level, you see finished podcasts (meaning they have been edited to remove dead space, fix levels, and have the intro and outro bumps added), saved as AIFF's. Nobody's complained about the naming scheme yet, which surprises me, but to reiterate:j1-2k7-mtW05 means "JavaOne 2007 mini-talk, Wednesday, number 5". I put this shorthand at the front of the titles so it's easier to read on tiny devices like iPods and phones, where file listings truncate all but the first 15 or so characters (for example, my iPod's Podcast will have three seemingly identical listings for This WEEK in MEDIA..., another three forBattlestar Galactica Ep..., etc.). This naming scheme is meant to distinguish the mini-talks from other podcasts on your device and between its own episodes, by putting the crucial data in the first 15 characters.

Anyways, inside the Raw from Microtrack folder, you'll notice the MP3's as we recorded them on-site at JavaOne. The green files are those that have been used for podcasts already -- you'll notice there are four green files and four finished AIFF's in the parent folder. Red files were determined to be unusable, usually meaning there was no audio (something got unplugged or a mic wasn't on or the presenter just never clicked the record button). Looking at the screenshot, my guess is that file104.mp3 isn't usable either, as it's only 72KB; it's quite likely our own "testing, testing" recording at the beginning of the day.

So, looking at the Wednesday folder, it looks like we've used about half of the viable MP3 files. We'll figure out what the rest are over the coming weeks and feed those too. If you gave a mini-talk, check back on the Community Corner wiki page and look under the "podcast" column: for those podcasts that have gone out, I've linked your podcast number to the article page, which has a description and download link. For those of you whose talks haven't gone out yet, I have a request: please put an abstract in the wiki if you haven't already (actually, talks shouldn't have been accepted without abstracts, but some talks were added on-site), and please link to your slides if you have any. More people will hear your talk via the podcast than were able to see the mini-talks in person, so providing a good abstract (which I use for the article page) and slides will help your audience immensely.

As for what's on the feed now, our latest JavaOne Community Corner Podcast is j1-2k7-mtW05: OpenDS project introduction by Trey Drake. This session introduces OpenDS, an open source community project building a free and comprehensive next generation directory service. In particular, OpenDS is designed to address large deployments, provide high performance, and be easy to extend, deploy, manage, and monitor. Attendees interested in using or contributing to OpenDS will gain a clear understanding of the real-world problems solved by the project, the overall architecture, and how to get involved in this active and growing community.

In Java Today, Aran Gupta explains EE-free web services in GlassFish Web Services Stack Tango with JavaSE6. "The Web services stack in GlassFish V2 uses JAX-WS 2.1 and JAXB 2.1 as the core Web services platform. WSITextends this core by providing an implementation of key WS-* specifications. Since JavaSE 6 has Web services support through the JAX-WS 2.0and JAXB 2.0specifications, it allows to build basic Web services using only JavaSE 6 but does not have any of the WSIT capabilities. But now that's possible! Fabian explainedhow a WSIT endpoint be easily deployed using the JAX-WS Endpoint API. In a follow up post, I provide a detailed writeup with complete working code."

Building on top of the concepts and principles learned in the NetBeans Google Toolbar Module Tutorial, a new "Part 2" tutorial shows you how to develop a more advanced Google search plugin that will display its results inside applications built on top of the NetBeans Platform, such as NetBeans IDE. In this tutorial, you create a more advanced version of the plugin in part 1, by recreating it and then adding support from the JDIC native browser, which is part the JDesktop Integration Components (JDIC) project, to it.

The Java language contains two intrinsic synchronization mechanisms: synchronized blocks (and methods) and volatile variables. Both are provided for the purpose of rendering code thread-safe. Volatile variables are the weaker (but sometimes simpler or less expensive) of the two -- but also easier to use incorrectly. In the article Managing Volatility, Brian Goetz explores some patterns for using volatile variables correctly and offers some warnings about the limits of its applicability.

In today's Weblogs. Carol


The Flat Earth Blog

Posted by kfarnham Jun 19, 2007

Swap your web MVC webapp pieces around

A flexible and dynamic development environment is currently a great concern, and even though scripting languages have shown they can be of help, we still need to create applications that can be maintained easily while giving us what we need during development. Recognizing the usefulness of scripting languages, Java SE 6 introduced the new Java Scripting API: a language-independent framework that allows developers to use scripting engines from Java code. With this new API, we can take advantage of the characteristics of the scripting languages where we need them most, while being able to use our well-known Java bag of tools.

In our Feature Article, A Dynamic MVC Development Approach Using Java 6 Scripting, Groovy, and WebLEAF , Daniel López uses not only scripting languages, but a highly decoupled MVC webapp approach that allows him to swap different views to render the results of the Groovy-scripted business logic. Check it out and see how you can use this flexible approach in your work.

In Java Today, the jai-operatorsproject recently posted a new build. jai-operators provides extension operators for use with the Java Advanced Imaging library. "It contains among other things an operator to apply any point operation (such as pow() and sqrt()), an operator to apply the same operation on a collection of images (the first renderable collection operator!), a pipeline operator and the famous DFT3D and IDFT3D along with a 3d periodic shift."

JSR 275, Units Specification, is in Early Draft Review, which specifies the programmatic handling of physical quantities and their expression as numbers of units. "Developers frequently encounter the need to model units of measure, because objects in the real world are subject to these measures. When working with units, developers need to understand the mathematics of units, how to convert between systems, and how to format and parse string representations of units. Most of this work can be consolidated into one or two Java packages, which is a primary aim of this JSR." The Early Draft Review ends on July 8.

The latest episode of the Java Posse podcast devotes much of its time to the recent dust-up over Neal Gafter's trial balloon of removing checked exceptions from Java (in order to simplify closure proposals for JDK 6), and Elliotte Rusty Harold's spirited defense of checked exceptions. Digging into the issue in detail, they note that the absence of checked exceptions from dynamic languages is something of a false comparison, as checked exceptions are really meant for use with statically-typed languages like Java.

In today's Weblogs. Brian


The Ability To Swing Blog

Posted by kfarnham Jun 18, 2007

Has Matisse succeeded or failed?

Not to beat a dead horse, but the discussion that has been moving around the Java community about using GUI-building tools versus writing your GUI's by hand continues to generate new opinions, anecdotal recommendations and warnings, and a fair amount of controversy.

Over on JavaLobby, Michael Urban has touched off an intense debate by asking the open question, Has Matisse Really Changed Anything? A one-time supporter of Matisse, he found he's using it less than he would have expected. His reasons include the following:

  1. I think I actually find it faster to code by hand using a good layout manager, than I do working in a GUI visual designer where I have to drag and drop components using the mouse, size them, edit property text fields, etc. The visual designer breaks my flow I think, where as just writing code maintains my flow.

  2. I generally find hand written code easier to maintain, since I am much more familiar with the code than if it is magically written by a GUI visual designer. It's also easier to debug IMHO. Since although Matisse for example, scores great on rapidly mocking up a GUI. It doesn't score nearly so well on the human readability scale.

  3. Finally, yes, I'm sure some of it is just because hand coding is what I know and am familiar with. Until relatively recently most GUI visual designers seemed to be quite buggy. Combine that with the fact that you still had to coerce components into layout managers anyway, it was just easier to do it by hand. Yes, Matisse changes that. But again, at the expense of human readability of code.

It can be faster to write with your own layout manager? I don't know... I used Matisse for the first time on my Glossitope desklet, and for putting together a simple GUI with specific positioning and a few static images (e.g., images loaded from inside the desklet JAR and put into ImageIcons), Matisse was extremely efficient. The usual counter-argument is that tool-built GUI's sacrifice flexibility or maintainability; you usually don't hear people claiming it's slower to use a tool. There's also the question of approachabillity: Michael's an accomplished, long-time Swing developer. But not everybody is or has time to become one... if a tool unblocks more Swing development, isn't that a good thing? What do you think?

Also in Java Today, Vladimir Sizikov has an update on What's new in ME Framework 1.2. "We (the ME Framework team) are getting closer and closer to the release date of ME Framework 1.2, and I thought that it would be useful to provide a high-level list of most important changes, improvementns and new features that we implemented in this upcoming release." His list includes a new Text Export feature, a "Debug Agent", a major Distributed Test Framework update, and more.

The latest issue of the JavaTools Community newsletter has been posted, with tool news from around the web, announcements of new community projects and one graduation from the community's incubator (Jarvis), and a "Tool Tip" on enabling GZIP compression on Apache.

Today's Weblogsstart off with a Seam Refresh from Brian


Northeastern Wind Blog

Posted by kfarnham Jun 14, 2007

Why do I need a compass to lay out my GUI?

GridBagContraints gbc = new GridBagContraints();
gbc.anchor = GridBagConstraints.NORTHEAST;

Personally, I don't mind GridBagLayout that much... it's terribly verbose, but generally, I only have to build the GUI once, so I don't spend that much time hacking on the layout, compared to the rest of an application's functionality. Looking through an interactive TV book the other day, I was actually relieved to see that MHP and OCAP supportGridBagLayout, because I appreciate that GBC does offer a great deal of power and flexibility if you're willing to work with gridwidths and weightys. Granted, my desktop apps would probably be even better off if I would learn to use SpringLayout andBoxLayout.

But then again, I've been doing Java GUI's for 10 years, so it's a hill I've already gotten over. For the new developer, laying out GUI components is a lot to learn and involves a ton of typing. And why the heck do I need a compass to lay out my GUI -- the label is "anchored" in the NORTHEAST... what is this,Treasure Island? Do I go 35 paces WEST to find the submit button?

All the other rich client environments provide visual GUI builders (Adobe Flash, Apple's Interface Builder, Microsoft's various "Visual" products, etc.), so they must know something, right?

Josh Marinacci continues the recent set of blogs about GUI building with A Response to GUI Building: tool vs hand coded. He says it's not necessarily an either-or choice:

First there is the issue of using a visual tool instead of hand coding your GUI. I think there really is nothing to decide. Laying out your GUI is a visual task. Use a visual tool!End of story. I wouldn't design a newsletter without a visual tool like Quark Express. I wouldn't edit photos without a visual tool like Photoshop. Why should I design my GUI without using a visual tool like NB? That's madness!

Now notice I didn't say that you have to only use a visual tool. It's perfectly acceptable lay out your GUI initially using NetBeans and then add tweaks afterwards. In fact, I do this all the time.

As with yesterday's blog about GUI building in the Swing Tutorial, Josh's blog has already kicked off a robust discussion. Hopefully Josh has clarified the situation and made the case for it not being an either-or decision.

With GUI building a front-and-center topic this week, the Poll asks "How should GUI's be developed?" Cast your vote on the front page, then visit the results page for current tallies and discussion.

Also in today's Weblogs, David


Old Flame Blog

Posted by kfarnham Jun 14, 2007

Still instinctively typing new GridBagLayout()?

Stuart Clements of the Swing Tutorial team is working on updating the Swing trail in the Java Tutorial, and wonders if it's time to shake off old habits and make a major change in their approach. In Layout Management: Use an IDE or Code by Hand?, he writes:

"Have you seen this cool video about the frustrations of coding a GridBag layout manager? We on the Swing tutorial team think this is a pretty accurate portrayal of how frustrating hand-coding a GUI can be, which is why in the latest update of the Swing trails we've decide to encourage the use of NetBeans as much as possible, especially where layout management is concerned. So, do you agree with this approach?"

There's already a huge mass of comments, and the response is mixed at best. For every few readers who endorse the GUI tool approach:

Yes, definitely! Coming from C++ and just started with Java, the reason for choosing Netbeans and not Eclipse was that I like to develop desktop applications and therefor I need to do much GUI Design. And Netbeans was more intuitive to use and Matisse is a great feature!

There are others who won't be coupled to a tool...

Well to be honest I can hardly believe that you're actually serious in asking the question. As long as there is no standard defined for GUI builders it's just way too much risk to depend upon a tool for your code.

some for whom a static-GUI builder won't meet their needs...

I handcode my gui because of readability, reusability and dynamic gui building. I've never seen a gui builder which allows to dynamicaly add a Component.

and some who think the problem is the built-in layout managers:

This is a pretty accurate portrayal of how frustrating hand-coding a GUI can be when using the built-in layout managers, particularly GridBagLayout.

You have to wonder if expanding the scope of the question was really what Stuart had in mind, and if the feedback is the kind of thing that the Swing Tutorial can really address, or if these are comments really meant for another audience, like the Swing team itself. Is the problem with hand-coding your GUI reallyGridBagLayout, and if so, are the subsequentSpringLayout, BoxLayout and Matisse'sGroupLayout not acceptable replacements, or perhaps not well enough understood by long-time Swing programmers? Does using Matisse, which is open-source, really lead to intolerable tool dependency? Lots to debate here, and it's not clear that there's ever going to be an answer that makes everyone happy.

Also in Java Today, A new article on SDN takes an introductory dive intoJRuby and the Java Platform. "This introductory article gets you started using JRuby and the Java platform. It shows you how to set up JRuby, explains the basics of using JRuby scripts with Java applications and the NetBeans integrated development environment (NetBeans IDE), and provides links to help you learn more. Also, the Getting Started section briefly introduces RubyGems and Ruby on Rails."

Inspired by an upcoming book on developing Blu-Ray Java apps, the HDCookbook project is a code repository "to gather useful code for Blu-ray Java, and other GEM terminal specifications like MHP, OCAP, and GEM-IPTV." The project is currently converting from cvs to Subversion, so interested users may want to hold off checking out code until that migration is complete.

In our Feature Article, Marla Parker talks with one of the most prolific bloggers and project owners, in Top 50: Interview with Kohsuke Kawaguchi of the Hudson ProjectIn this installment of our series of interviews with developers from some of's most active and prominent projects, Marla interviews Kohsuke Kawaguchi about the Hudson project, a continuous integration server used by large companies and open source projects.

In today's Weblogs, Sean


No Way Out Blog

Posted by kfarnham Jun 13, 2007

Where is Rich Internet Application development going?

Simon Morris' blogs never lack for the Big Think, that's for sure. This time he's gone and tried to figure out just what Rich Internet Applications are, given that Wikipedia's definition and list of related technologies are all over the map. Underlying the confusion over just what RIA's are, he identifies three rather snidely-named camps of developer philosophies:

  • Browserism - "the belief that the web browser (or comparable page-centric markup-orientated HTTP-bound middleware platform) is the future of end user facing software; a belief solely based on observation that the web is currently the predominant tool for accessing the internet."

  • Neo-Desktopism - "the belief that the web browser as an end user facing application platform is ultimately an evolutionary cul-de-sac. The goal of Neo-Desktopism is to evolve traditional desktop application technologies [...] to a point where they can float free of a physical local client installation, deploying on demand just like web pages."

  • Pragmatic Neo-Desktopism - "the belief that the web browser as an end user facing application platform is ultimately an evolutionary cul-de-sac, but we'd all get fired if we admitted that to our bosses."

In the turmoil and competition among these user-facing technologies, Simon gleefully points out some of the most pathological behaviors of the various camps, like the Browserists' delight at their ability to recreate the functionality of a Commodore 64 application from 1984 (like, say, saving data locally), or the Neo-Desktopists' relief when a Java Web Start application actually launches correctly the first time.

Simon's blog, A Rose By Any Other Name, has something to offend pretty much everyone... a sure a sign as anything that he's on to something. It's a great read, and once you're well and duly tweaked, there's a robust discussion to join in the comments section.

Also in today's Weblogs, Eamonn

Another "end of Desktop Java" scenario

Yesterday's keynote from the Apple WWDC conference didn't have a lot of surprises, at least not good ones. There's plenty of grumbling over the fact that not only has Apple forsaken Java ME on the iPhone (meaning it can't run the MIDlets that the rest of us run), but also refused to provide any sort of SDK beyond typical web applications. Even the normally booster-ific Daring Fireball is calling B.S. on that one.

But looking at the tea leaves, Cafe Au Lait's Elliotte Rusty Harold makes an interesting hypothesis about Apple's most surprising announcement, a Windows port of their Safari web browser, and draws a dire consequence:

Based on early betas of Safari 3.0 forWindows, some people are speculating that Apple has succeeded in porting Cocoa to Windows. If that turns out to be true, that could be a real threat to Java on the desktop, but a boon for Mac developers. If they could port to Linux too (probably an easier task) Java on the desktop would be dead.

Elliotte's a great opinion writer, but this seems to stretch things. First there's the concept of whether a Windows port of Safari indicates that all of Apple's Cocoa API's are on Windows, or just enough to support Safari. Just porting AppKit and CoreFoundation would be a tall order, and then there'd be the question of what other frameworks would be needed by real-world applications: would multimedia developers expect Apple to bring CoreAudio and QTKit to Windows? The Quartz graphics API's? Disc-burning and device API's? If not, how much could you really do with Cocoa on Windows? Remember, some of these are the things that Elliotte complained that Java still can't do, and Java is seriously trying to be cross-platform (it's arguably the whole point of Java). It has yet to be proven that Apple is really intersted in cross-platform development beyond a few strategic developments, mostly in media (iTunes, QuickTime, etc.). And as for Linux, outside of the Bonjour API's, I'm not aware of Apple ever releasing a Linux app (Google gives only 500 hits for "linux" on Apple's developer site, most of them about porting).

If a cross-platform Cocoa were available, would that really mean the end of Desktop Java? This takes us to the realm of arguing hypotheticals, but the idea of masses of developers picking up a new language (Objective-C) and new API's for the sake of developing cross-platform apps -- apps which, unlike Java, presumably aren't meant to be embeddable in web pages -- seems remote. In fact, hasn't this been the challenge of luring developers from the likes of Cocoa and Visual Basic to Desktop Java in the first place? And isn't this "there's another cross-platform runtime; let's abandon Java" story the same thing we've been hearing about Abobe AIR (né Apollo)?

At the end of the day, Java, AIR, and the hypothetical cross-platform Cocoa will compete with each other and with single-platform technologies for developers' business. Whichever ones solve the right problems for people should eventually win out. It's a competition that's really been re-energized in the last few months, and let's not call it over before it's even begun.

In Java Today,JRuby 1.0 has been released. InfoQ has collected a number of perspectives on the release in JRuby 1.0 Released: Bringing Ruby Compatibility to the JVM, including comments about the milestone from committer Ola Bini, a look ahead co-lead developer Charles Nutter, and an update on NetBeans' Ruby support from Tor Norbye.

Over on JavaLobby, Michael Urban reports that NetBeans 6 Rocks! "After working with NetBeans 6 over the last week, I have to say I am very impressed. This is not simply a minor upgrade, as is so common in IDEs these days even when they are given a new major version number. Quite the contrary, NetBeans 6 is a major new release, and a major improvement over NetBeans 5.5."

The World Wide Web Consortium (W3C) has released a Web Services Description Language (WSDL) Version 2.0 Primer. "This document is a companion to the WSDL 2.0 specification (Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language [WSDL 2.0 Core], Web Services Description Language (WSDL) Version 2.0 Part 2: Adjuncts [WSDL 2.0 Adjuncts]). It is intended for readers who wish to have an easier, less technical introduction to the main features of the language. This primer is only intended to be a starting point toward use of WSDL 2.0, and hence does not describe every feature of the language."

Today's Weblogsbegin with Cay


Phone Number Blog

Posted by kfarnham Jun 10, 2007

ME on the mind lately

A year ago, I complained openly about how hard it was to find out the real story about ME development, to find ME bloggers or ME apps or to get at anything other than the various official resources. Now suddenly, it seems like there's more ME material than I know what to do with. Maybe there's been a surge in ME development in the last year -- certainly the emergence of Java FX Mobile (né SavaJe) and set-top box ME platforms like Blu-Ray argue for the possibility that it's not all just about tiny apps for the phone anymore. Or maybe Google's use of ME for Google Maps for Mobileand GMail for Mobile have legitimized the platform for some of the doubters (this was a hypothesis I blogged a while back). And maybe it's perception bias -- I took a second look at Blu-Ray after JavaOne, and have found a number of related projects in the BD-J and interactive TV space, a high-novelty fringe of Java ME.

Or maybe it's just that the highly motivated/productive Roger Brinkely moved over to the Mobile & Embedded community for the GPL launch, and he's been happy to do a tremendous amount of outreach for the ME world.

At any rate, it's nice to have more micro Java content on the site, because it used to be one of those things that proved hard to deliver to its target audience within the larger community. It's gotten a lot easier.

Let's kick off the Java Today section with some ME content, namely a number of current contests that allow ME developers to show off their stuff. The bd-j-application-contestproject is home to discussion and submission forums around the FOX JavaOne BD-J Sweepstakes announced at JavaOne. Submissions for this contest are due July 6. Meanwhile, Qusay H. Mahmoud blogs about a number of student contests hosted by Vodafone Betavine, including competitions to develop social networking, information and entertainment, B2B, and social-impact applications. The deadline for these contests is September 30.

Continuing the ME theme, the Java Mobility Podcast has released its eighth episode, Amobee Delivers Ad-Funded Mobile Java Apps and Services. "In this interview at 2007 JavaOne conference, Amobee Media Systems' Ziv Eliraz describes the company's unique operator-centric system for ad-funding mobile services and applications. Developers can integrate Amobee's handset API ("HAPI") in their Java applications and generate revenue in a way that is contextually sensitive and user-friendly."

Mark Reinhold explains the "big bang" that will expand into a full-blown community around OpenJDK in his blog OpenJDK Community Cosmology. "So. Here we are. We have a Charter for the OpenJDK Community. The Charter creates an Interim Governance Board, with three members from outside Sun and two from within. The Charter empowers the Board to write a Constitution, get it ratified by the Community, and then hold elections for the three non-appointed seats. In the meantime Sun will strive to be the very model of a modern benevolent dictator. "

This week's Spotlightis on the aforementioned Java Mobility Podcast. Launched in late April, the podcast has already put out eight professionally-produced episodes featuring interviews and discussions on a number of topics of interest to the mobile developer community, including important JSRs and device fragmentation, vendor initiatives like Vodafone Betavine, OpenLazlo for ME devices, and more. Subscribe to the podcast via its feed, or find the podcast in the iTunes Store.

Today's Weblogsbegins with Stateful web service support is getting some traction, as noted by Kohsuke

What'll it take to unencumber OpenJDK

I came across Mark Reinhold's blog entry Slides from "OpenJDK Project Report" @ JavaOne 2007 while poking around OpenJDK, and noted the coincidence that it has been exactly one month today since he presented this talk at JavaOne 2007.

So, you guys done yet?

Kidding! But given that most of the Sun people should now be through their post-J1-crunch comp time, it probably is an appropriate time to start taking stock of big plans announced at the show and how long it will take to get there. For OpenJDK, the big to-do is obviously the replacement of encumbered bits with GPL'able replacements. Who's on it? How're they doing? How long's it going to take? Mark's blog has some interesting specifics about the projects started to replace the dependencies: audio-engine,font-scaler, and graphics-rasterizer. He also has metrics on how much of the JDK source is encumbered: 894 files, or 4%, cannot be shipped as source, and 1,885 files (8%) are not under GPLv2, many because they are Apache-derived.

That should help to establish reasonable expectations about what it's going to take in terms of effort to get to a 100% GPL class library, and the specific skill-sets needed from the community to pull it off.

So, as you crunch those numbers in your head, the latest Poll asks "When will the OpenJDK project be able to offer an unencumbered, 100% GPL class library?" Cast your vote on the front page, then visit the results page for current tallies and discussion.

One other thing I'm wondering aloud... are the strident F/OSS-only Linux distros waiting for every last bit to go GPL, or are they willing to adopt OpenJDK now? Maybe some of you in the Linux community could give us a sense of how this is playing in that part of the online world...

Speaking of communities working on the core Java platforms, theJava Today section points out the white paper The GlassFish Community Delivering a Java EE Application Server(620 KB, PDF), which takes a high-level look at one of's most active communities. "A year and a half after the initial launch, the GlassFish community has already delivered its first final release and is on its way to its second. In this article we will provide an overview of all the aspects of the GlassFish Community and the GlassFish AppServer."

Jeff Martin's latest JavaFX update is on Key Frame Animation in JFXBuilder/JavaFX: "In the last week we've been adding animation support to JFXBuilder. Fortunately, JFXBuilder's existing key frame animation model matches well with JavaFX - in particular, using the JavaFX "dur" statement. [...] JFXBuilder already has an animation panel that lets you animate almost any shape attribute: x, y, width, height, rotation, scale, skew, opacity, color, stroke color and stroke width. To define an animation, you simply draw a shape or drop a component, move the animation time slider to a different time, and change the attributes for the new time. JFXBuilder will automatically interpolate all the values between the two key frames."

The 124th issue of the JavaTools Community Newsletter is online, with tool news from around the web, announcements of new projects in the community, and a tool tip explaining why you should move your project's source control to Subversion.

In our latest JavaOne Community Corner Podcast j1-2k7-mtH06: A peek into Bunny Hunters, a Darkstar based game, Project Darkstar founder and community leader Jeff Kesselman introduces Bunny Hunters, a demo game written to run on Darkstar.

In today's Forums, "GB Developer" has an open-ended Question about GF history I'd love some details on this. How did glassfish come about? when/why did you fork other codebases and what was the driver of that? Just in case you're wondering why I'm interested... I'm considering a migration to GF, and (good or bad), I don't want to base that choice on just technical merit (real or perceived... oh, the flamebait!). All other technical considerations being equal (or nearly equal), I'd like to take into consideration such things as community, activity, the number of 'warm fuzzies' I get by reading the dev list.


True Colors Blog

Posted by kfarnham Jun 6, 2007

Combining your preferred client- and server-side technologies

Ajax and JSF would on the surface seem to be two technologies that would be difficult to marry. Ajax processing is predominantly client side, while JSF processing is predominantly server side. Ajax is mostly JavaScript and JSF is Java.

So, does it even make sense to put them together, or do we leave the sever-side to the Java developers and the Ajax client-stuff to the JavaScript types, and hope they manage to integrate at some point before production? Author Chris Hardin argues for integrating much earlier... in fact, to put the Ajax support into custom JSF components. In our Feature Article,Bundling Ajax into JSF components, Chris Hardin shows how to do this with custom or extended JSF components, using aPhaseListener to deliver Ajax content to the response, and embedding JavaScript content via the renderer class.

Chris adds that this isn't the only place you'll see this idea: "there are already many Ajax-enabled JSF components already out there and most are open source. The ability to create reusable dynamic web components is where the power in the coupling of JSF and Ajax lies."

In Java Today, InfoQ reports Geronimo has passed the Java EE 5 compatibility test suite. "The Apache Geronimo project has passed a significant milestone in that their latest release candidate (2.0-M6-rc1) has passed all tests in the Java Enterprise Edition 5.0 Compatibility Test Suite, making it the first open source application server other than Glassfish to pass the tests."

Jasper Potts has posted a Nimbus L&F Update: "So it has been a while since I blogged about Nimbus, Java One has come and gone and I am sure you are all wondering whats happening to it. Well things have changed for Nimbus since it was announced at Desktop Matters conference in March. The initial plan was for Nimbus to be a open source project jointly run by Ben Galbraith and myself. In early prototype I hacked together thats available from was very well accepted both inside Sun and in the swing community. As a result a decision was made to bring the Nimbus L&F; into the JDK as part of the new Consumer JRE."

The JRuby team has announced JRuby 1.0.0RC3. "This will likely be our final release candidate before our 1.0 release. People are encouraged to try out this release to help us find any remaining showstopper issues. We have spent a lot of time over the last month squashing compatibility bugs and we have confidence that applications 'will just work' (tm)*. Please try your applications and libraries against JRuby and give us feedback."


Gaming by the hundred-thousand

To the casual observer, the MMORPG looks simple enough: everyone in the game can see and interact with everyone within a certain distance. Of course, the game developers out there know this is a tricky proposition, if only from making the graphics analogy to which objects in a scene should and should not be rendered. If each of 100,000 players needs to continually figure out and track the location of 99,999 other players, you're going to burn up a lot of CPU time just tracking other players, most of whom are trivial-reject cases.

Jack Strohm of Perpetual Entertainment -- the company working onStar Trek Online -- dropped by the Community Corner booth at JavaOne to talk about his experiences working with Project Darkstar, the Java-based MMORPG server, and to share a mini-talk on approaches to solving this significant problem in practical ways. We've released this mini-talk as our latest JavaOne Community Corner Podcast, Managing Player Awareness in Darkstar. Those of you subscribed to the feedmay already have this in your podcatcher, but if not, you can get the MP3 directly from the show page.

Later this week, we'll continue the gaming theme with a mini-talk podcast from Darkstar founder / community-leader Jeff Kesselman.

While we're on the topic of podcasts, we've topped the Java Today, with episode 7 of the Java Mobility Podcast, OpenLaszlo and Project Orbit, in which Max Carlson, Laszlo Systems co-founder, and Hinkmond Wong, Sun senior staff engineer, discuss OpenLaszlo and Project Orbit. Designed to free content developers from worrying about runtime issues, OpenLaszlo supports zero-install deployment of Ajax applications in multiple environments. Project Orbit is the Sun Java ME viewer for Laszlo Web 2.0 content on set-top boxes and smart cell phones.

Chris Oliver announces a new update to JavaFX: "We just posted a new build of JFX which contains the following fixes and features: UI -- Shape Morphing, JavaFXPad to search for dependent classes, Mouse Wheel support in Canvas, and Baseline alignment of Text. Interpreter -- Bind is now only allowed in initialization contexts, Fixed array assignment problem reported on openjfx forum, Fixed bug with while condition of dur expression reported on openjfx user list. JSR 223 -- Fixed problems reported on openjfx user list."

Following on Neal Gafter's open wondering about removing checked exceptions in order to make a closures implementation easier, and Elliotte Rusty Harold's spirited defense of them, Artima asks its readers What Features Would You Remove from Java? "Removing features can be a useful part of keeping a language simple over time, especially as new features are added to the language. In a recent blog post, Neal Gafter asks whether checked exceptions could be a candidate for removal from Java. If not checked exceptions, then what features would you remove from Java?"



All Through The Night Blog

Posted by kfarnham Jun 5, 2007

Sometimes things just come together

There wasn't supposed to be a feature article today, because I'm still catching up from almost two weeks of being mostly AFK. But fortunately, Community Manager Marla Parker has been continuing her series of interviews with leaders of the top 50 projects on Late last night, she sent a copy of her latest interview.

Before I put the computer to bed for the night, I asked her and her interview subject "this is great... can we run it tomorrow?"

So, in our Feature Article,Marla Parker interviews Joe Walker about the Direct Web Remoting (DWR) project, which provides an infrastructure for developing Java-based Ajax web applications. In the interview, Joe talks about what DWR does, how popular it's become, how he manages such a significant project, and a surprising less-is-more request for

In Java Today, the JCP Executive Committee has voted 11-0 (with five non-votes) to approve JSR 314, JavaServer Faces 2.0. This new version of JSF aims to improve productivity, integrate Ajax, support non-JavaScript clients, use the Java Persistence API, and leverage modularity to better integrate with other client- and server-side technologies. ONJava blogger Shashank Tiwari describes the JSF 2.0 kick-off in his blog JSF 2.0 is here!

A new SDN article by Tim Quinn and Rick Palkovic looks at Java Web Start Technology and Application Clients in the GlassFish Application Server. "To make this capability available, you do not need to develop your application differently or distribute any files to end-user systems yourself. Launching application clients with Java Web Start software overcomes the distribution problems that have historically impeded widespread use of application clients. The GlassFish application server provides Java Web Start support automatically, providing the feature without any extra effort from you as a developer or administrator."

TheServerSide is among the many sites to note the release of Emacs 22 after six years, kicking off a Java-centric discussion inEmacs 22 released - still with limited built-in Java support. "GNU Emacs 22 has been released. This release has many, many (many, many, many) changesto it, some of which affect Java (in that jdb support has been updated, as well as some of the font-lock stuff), but for the most part, it remains what it was: an editor that happens to have an operating system in it (or vice versa) that many coders still love."

In today's Weblogs. John


Change of Heart Blog

Posted by kfarnham Jun 3, 2007

Google Gears and its Java-based alternatives

So, one of the big announcements last week was Google Gears, which allows web applications to operate in an offline mode. It does this by installing a local database server (SQLite) and a browser extension that offers a JavaScript API to interact with the database.

Because of its use of a browser extension, it is limited to a specific set of browsers and operating systems: currently Firefox and IE on Windows, Mac OS X, and Linux. Presumably, the SQLite install would also require admin privileges. (fact check me on this, someone, please? Also check if Gears' Linux support is Intel-only? Thanks.)

Surely, I can't be the only one thinking... maybe y'all could have done this in Java? Using an applet-embedded database likeDerby / JavaDBwould offer zero install hassles and not present any concerns about native-OS compatibility. Java would also be compatible with more browsers and OS'es on Day One than the native browser plug-in will probably ever be. And as noted in last week's feature article, applets can be used to maintain state for webapps, even surviving refreshes and page-closes. Setting aside the sometimes iffy nature of JavaScript-applet communication, this seems like a more compatible, lower-maintenance approach.

So how did this option get missed? As your editor often asks, "was Java considered and found lacking, or never considered at all?" This seems like a huge missed opportunity for our favorite platform, especially considering that Sun and Google have a partnership.

Google says "the company's long-term hope is that Google Gears can help the industry as a whole move toward a single standard for offline capabilities that all developers can use." My gut tells me that this arrangement has a "string, tape, and popsicle sticks" design smell that isn't going to hold up, but if that's true, maybe something else will succeed. After all, you can put an all-Java persistence solution to work today, and get to more browsers and operating systems.


Filter Blog

By date: