Skip to main content

Getting Groovy

Posted by daniel on May 19, 2004 at 6:05 AM PDT

"This calculator could get a B+ in our Algebra/Trig class. Shouldn't we change what we teach."

Twenty years ago I was at a math meeting where Joan Countryman held up a calculator and said that. I got the same feeling reading Michael Ivey's blog entry Quick and Easy Object Persistence: pBeans + Groovy Beans and maybe I'm beginning to get what Groovy is about. If we have tools and languages that help us with certain routine tasks in coding - shouldn't we change how we code? It's Groovy and other languages, it's code gen, ..."

The aha moment came when Michael showed a JavaBean. For each of the private variables there were the required getter and setter. They're required. And they pretty much do what you'd expect. You know what to type, I know what to type, shouldn't your IDE know what to type for you? Then he showed the same example in Groovy. He listed the variables. Behind the scenes it knew what to type.

Sure, this is part of the issue that Allen Holub has with accessors. But the Groovy code was not less readable. In fact, it was more readable. Groovy is not the only language that can be used this way, but it seems to be catching on quickly and is being tuned to the needs of Java developers. What do you think?

Also in today's Weblogs. N. Alex Rupp notes that Open Source Flex alternatives require broad industry support. Rupp is not the first person to bring up the restrictions with Macromedia's licensing of the beta versions of Flex. He also point out that if you are looking for more information about the Shockwave format " is a good place to start if you're looking for Open Source SWF editors." Rupp is looking for others interested in "developing Java and XML driven Shockwave technologies for the Open Source market"

Kito Mann wraps up his comprehensive conference report in TheServerSide Symposium - Day 3. He covered JCP executive director Onno Kluyt's breakfast talk and Ted Neward's presentation on JSR 175 and attributes. He reported from Peter Fenton's VC talk that outsourcing is growing. After a presentation by John Weigand on Eclipse, Mann ended up back in a Ted Neward session with Neward fielding questions from Java developers about .Net.

Also in Java Today
,Hans Bergsten wraps up his four part series JSP 2.0: The New Deal with a look at developing custom tag libraries. With JSP 2.0 you can develop a "custom action as a tag file. A tag file is a plain text file where you use JSP elements for all dynamic parts, just as in a regular JSP page. It has the same purpose as a Java tag handler: to provide the logic for a custom action. The main differences between a tag file and a JSP page are that a tag file has a .tag filename extension, uses a tag directive instead of a page directive, and lets you declare input and output with a few new directives that are only valid in tag files." Bergsten also details the new simple tag handler API.

Where's the eyedropper tool for choosing colors? In his latest Swing hack The Eyedropper tool, Joshua Marinacci provides a cheat to handle the limitations he describes because "getting a screenpixel requires native access, usually locked off from Java programs. Java 1.3 introduced a new method to the Robot class, getPixelColor(), which can retrieve the color anywhere on the screen. The problem is that you don't get mouse events once the cursor leaves your JFrame. Fine if you only want to select colors from your own application, but we want to select anywhere on the screen."

In today's Projects and Communities , if you look at the recent changes link in the JavaPedia you will notice many pages have been added or altered to highlight different applications. Add your favorites to the lists.

John Mitchell reminds us that the public review period for JSR 170 Content Repository for Java technology API is open now until July 19, 2004.

Is anyone listening? That's all markswanson asks in his post Make it easier to provide feedback in today's Forums . He writes "I feel disheartened when I send out a bug report to with a perfect small 15 line program that shows the exact error and it takes 11 months, 20 days (my current record) to receive the response, 'Hello, sorry for the late response. Are you still seeing this?'"

Jerry responds to the challenge of Throwing one away by suggesting you do "your prototype with a technology that just won't be used in your organization for a production version? You could select a language that will not be supported by operations - Python, Smalltalk, Lisp or anything exotic enough that operations won't touch it (note that I'm *not* implying that either of these languages would not be fit for production use)."

Consider the Psychology of Swing RayTucson writes that consumers " don't usually care how a product works, only how good they look using it. For example, many people don't know the engineering involved with a car. They just want to get in, hit the gas, and go. They do care, however, how they look driving it. [..] Out of the box, Swing should implement a polished UI."

In today's News Headlines

Registered users can submit news items for the href=""> News Page using
our news submission
. All submissions go through an editorial review by news director
Steve Mallet before being posted to the site. You can also subscribe to
News RSS feed

Current and upcoming
Java Events

Registered users can submit event listings for the href=""> Events Page using our href=""> events submission
form. All submissions go through an editorial review before being
posted to the site.

Archives and Subscriptions: This blog is delivered weekdays as the
Today RSS feed
. All members can subscribe to the email
updates for the site at the href="">
java-net Mailing Lists page. You must be logged in to subscribe
the javanet_Daily and javanet_Weekly lists. Also, once this page
is no longer featured as the front page of
it will be archived along with other past issues in the href=""> Archive.