<< March 2008 | Home | May 2008 >>

Groovy Java File Prepender

applying common comment blocks to java files

A friend of mine is getting ready to release an open source project and needed a quick way to put a common comment block at the beginning of every java file. I thought this would be a good chance for me to brush up on Groovy's slick File tricks and support. Yes, I know this has been done before and probably in Groovy as well, but it was a fun exercise. I would like some suggestions on how to make it better/leaner?

Read more...

Tags :

DRY CRUD DAOs with JPA

...and Spring

I wanted to shove a few more acronyms into the title of this article but I couldn't find anymore that were relevant. So I am currently working on a very small project using JPA and Hibernate. It has a very simple DAO layer and there are a handful of Model objects, POJO's, JavaBeans; whatever you young kids are calling them these days. Most everything in this application revolves around CRUD operations.

Read more...

jqGrid JSON Java Model

I've been using the JQuery plugin jqGrid for several months now. I've been really pleased with it. Up to this point, due to laziness, I've been building my JSON string manually using StringBuilder. Tonight I decided it was time to make this easier.

Read more...

Improve Form Usability

The JQuery Way

I just read an article on how to improve form usability with auto messages. Antonio did a great demonstration. These kinds of things can really spruce up a form. He used prototype and scriptaculous so I thought it would be a good idea to show a similar demo using JQuery.

Read more...

SwingBuilder: Integrating Groovy and Java

Today's SwingBuilder excursion revolves around the fact that I am developing a Swing application where Groovy isn't being used at all. What I realized was that while I can't say for certain if SwingBuilder really makes complex forms easier to write I do know that simple forms are far simpler in SwingBuilder than vanilla Swing.

Read more...

Groovy SwingBuilder Model Binding

I've been messing around with Groovy's SwingBuilder in my spare time. I did quite a bit of google-ing trying to figure out how to bind widget values to model properties. The example on the Groovy website wasn't very real world though it did get me pointed in the right direction.

Read more...

Down Votes on DZone Deserve Comments

Say that 5 times fast

I've been guilty of this myself but have been trying to follow my own advice. If you vote something down on DZone it would be really nice to give a reason either in the DZone comment system or on the article itself. No one likes to see their content voted down but maybe with some constructive criticism authors can improve their content.

I'd also like to see down votes actually matter with regards to the front page. I know there is probably some fancy shmancy algorithm determining front page promotion. I think it goes something like this:

if (rick.likesArticle || article.lotsOfClicks) { article.promoteToFrontPage() }

But once the down vote exceeds the up vote it doesn't make a lot of sense for it to be on the front page anymore. Well, that's my opinion anyway. YMMV. Happy blogging.

Tags :

Benchmarks Mean Squat

Squat is a technical term...

I just read a claim that JavaFX benchmarked at 186 fps. I thought that was pretty impressive. I had to check it out. I followed the link to the BubbleMark site and tried the JavaFX jnlp on both JDK1.6.0_05 and JDK1.6.0_10 preview release. Both performed miserably. 9 FPS!!

My machine's specs:

  • Ubuntu 7.10 - Gnome Desktop (Compiz turned off)
  • Duel Core 2.1GHz
  • 4GB RAM
  • NVIDIA GeForce 8400M GT (256MB)

All this proves really is that benchmarks mean squat.

JavaFX vs Plain Old Java

This week on JavaRanch we've had the honor of having Jim Weaver promoting his JavaFX Book. Jim's a great guy but I'm not sold on JavaFX just yet. While reading up on it and reading responses to questions I get this horrible feeling in my gut reminisce of another slew of (empty) promises from Sun regarding a web technology who's name I won't mention but its initials are JSF.

So one of Jim's common responses to "why JavaFX" is "The simple, elegant, declarative scripting that (IMO) makes it as easy to create a JavaFX application without a GUI designer as it is to write a Swing/2D app with a GUI designer."

Read more...