Matt RaibleMatt Raible is a Java Champion and Developer Advocate at Okta.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Canoo WebTest vs. Selenium

From a message I sent earlier to the AppFuse user mailing list:

After getting Dojo's DropdownDatePicker working with both Struts and Spring MVC, I've run into a snag:

You can no longer use Canoo WebTest to enter dates in a form.

It doesn't find the form element because HtmlUnit (the underlying browser implementation for Canoo) doesn't understand/render Dojo's components.

For users, workarounds include:

1. Don't write tests for entering data on forms that have required dates.
2. Don't make dates required.

Either way, it seems logical to move to Selenium for UI testing.

What do you think? Are Dojo-based components the future of Ajax support in Java web frameworks? If so, I wish Dojo allowed more "progressive enhancement" features instead of the invalid HTML feature it seems to rely on now. I'm more than willing to support Dojo if that's what AppFuse users want. However, in my experience with Struts 2's datetimepicker, it seems pretty slow. Of course, if I could render my own input element and then add a datepicker next to it, I'd be much happier. AFAICT, the Struts' datetimepicker doesn't allow you to do this, but I could be wrong.

Of course, if Dojo 0.9 lives up to the hype and is much faster - maybe I should quit caring about Hijax and just start writing those Selenium tests?

For users of those "next-gen" Java frameworks (like Seam, Grails and Wicket), what do you use for UI testing? Does Canoo WebTest work for you when you have a lot of Ajax functionality? If not, do you use Selenium or leave UI testing up to the QA folks?

Update: I ended up using jscalendar for both Spring MVC and Struts 2's datepickers. It's simply the best tool for the job. Dojo is too bloated IMO (240K for a datepicker!) for such a small feature. This allows us to worry about getting AppFuse 2.0 out the door without migrating to Selenium first. We will eventually migrate to Selenium (it's a better tool for the job IMO), but probably not until 2.1. The only question is what's the best way to distribute Selenium tests?

Posted in Java at May 31 2007, 12:25:03 AM MDT 19 Comments

Live Coding for 4 Days Straight

Last week I had an interesting 4-day consulting gig for a client in Boulder. I was supposed to fly out to Connecticut to deliver a training course, but it got rescheduled due to the 45-day Vendor Approval Process I need to go through. The client in Boulder wanted me to come out and do an architectural assessment and provide recommendations. Topics they were interested in: web tier (specifically Spring MVC), Security, Ajax integration, build process, web services and localization. I've done this kind of before with Virtuas, but this time was different. With Virtuas, I'd do 5-days worth of presentations on just about anything the customer wanted. For example, checkout this agenda for a client in NY last year.

With the company in Boulder, I delivered zero presentations. Instead, everything we talked about and coded was hands-on. On Tuesday, we started out by discussing their application and some issues they were having. They'd done a lot of customization to Spring MVC and had managed to eliminate all the XML needed when adding new controllers and views. I spent 3-4 hours that day with 2 of their engineers finalizing and implementing their convention-over-configuration rules. On Wednesday, I helped them implement Acegi Security into their application. This was interesting because they didn't have any security mechanism and we had to implement Acegi from scratch and then tie it into their backend (using a custom AuthenticationProvider). We also integrated i18n so all messages were retrieved from their database.

On Thursday, we configured Ant to run their tests and wrote some tests for their controllers. As part of this process, I showed them how to use jMock and EasyMock and tried to explain the benefits of using Spring IoC (which they still aren't sold on). On Friday, we integrated Selenium into their build process and wrote a few tests using Selenium's Java support. In the afternoon, I showed them how they might use Scriptaculous and Prototype to Ajax-enable some features in their application.

Doing all the "live coding" on someone else's machine (with 5 developer's watching) was a bit nerve wracking. However, thanks to Cenqua's FishEye tool, I was able to search AppFuse and AppFuse Light's SVN repositories for code snippets and examples. While I knew how to do much of the stuff we covered, FishEye and Google bailed me out when I didn't. About halfway through, I realized that I don't keep a lot of my knowledge in my head. Instead, it's on this blog, or spread out on the web. I don't remember URLs anymore, all I remember are keywords. If I've read a blog post or article on the web, chances are I can find it again pretty easily with Google. Even though I store a lot of bookmarks in, I didn't use it all week. Remembering keywords is the new bookmark for me.

The whole week was an interesting exercise in "live coding." The whole team (6 or so) sat in a conference room all week and VNC'ed into the architect's box to do the work. We worked in Eclipse and used WTP to deploy/test things on Tomcat. The keyboard was passed around between developers at random and everyone got a chance to implement new features. I think the reason that everything worked so well was because the team was full of Senior Java Developers. Everyone learned from each other as they saw new shortcuts, keystrokes and ways or writing code. I don't know if this kind of thing will work in all development teams, but I'd encourage you to try it. It's a great way to share knowledge and educate the entire team on how a new module works.

Over the weekend, I received the following e-mail from one of the developers on the team:

Very nice to meet you this past week and get a chance to see firsthand the breadth and depth of your experience in web app frameworks and such. I believe due to your visit, we will be cranking happily along here very shortly. Everyone was quite happy with the results at the end of the day yesterday.

On a related note, if you're looking to hire an enthusiastic Web + Java Developer, please take a look at my resume or send me an e-mail. My current contract ends this month and I'm hoping to find something new to get me through the summer.

Posted in Java at May 24 2007, 01:50:30 PM MDT 1 Comment

The Security Annotation Framework

Spotted on the Acegi Security mailing list several weeks ago:

A few weeks ago, I started an open source project (Security Annotation Framework) which addresses annotation-based, instance-level access control for Spring applications. It is also based on Spring 2.0's extensible XML authoring features. You can find more info at and

The framework was created during a project in 2006 and is now available under the Apache 2.0 license. It's a generic framework focused on processing security annotations on Spring beans as well as domain objects (which typically aren't managed by a Spring application context) and can be used to enforce access decisions for domain object instances. It can be used with any authorization provider and is not specific to Acegi. However, I plan to include an example how to use the SAF with Acegi authorization soon. Furthermore, it supports inheritance of annotations from base classes and interfaces.

What do you think about SAF? Are annotations a better way of implementing ACLs on domain objects?

Posted in Java at May 24 2007, 12:42:35 PM MDT 1 Comment

A couple of good blog posts

Here's a couple of good blog entries I've enjoyed reading over the past few days - in case you missed them:

Warner is spot on when it comes to Tapestry's biggest problem. Let's hope Tapestry 5 is the end-all-be-all that Howard thinks it will be. As for Gavin's post, I like it because it's mostly true and the f-bomb makes it enjoyable to read. ;-)

Posted in Java at May 24 2007, 09:50:37 AM MDT 5 Comments

AppFuse 2.0 M5 Released - now with CRUD generation and XFire support

The AppFuse Team is pleased to announce the release of AppFuse 2.0 M5! This release marks a milestone in the features of AppFuse 2.x. This release adds CRUD code generation, full source support (just like 1.x) and XFire integration. In addition, we've fixed all the issues related to switching persistence frameworks, and you should now be able to easily switch from using Hibernate to to iBATIS or JPA. The videos have been updated for M5. The Easy CRUD with Struts 2 video shows how code generation currently works.

AppFuse 2.0 is available as a Maven archetype. For information on creating a new project using this release, please see the QuickStart Guide or the Hello World video.

If you've used AppFuse 1.x, but not 2.x, you'll want to read the FAQ and join the user mailing list if you have any questions. The Maven Reference Guide has a map of Ant » Maven commands. Maven for Newbies might also be useful if you've never used Maven before. There is some support for Ant in this release.

For more information, please see the 2.0 M5 Release Notes. If you'd like to use AppFuse offline (or download everything at once), you may want to grab the dependencies and extract them into your ~/.m2/repository directory.

The 2.0 series of AppFuse has a minumum requirement of the following specification versions:

  • Java Servlet 2.4 and JavaServer Pages (JSP) 2.0
  • Java 5 for Development (Java 1.4 for deployment using the Retrotranslator Plugin)

Comments and issues should be posted to the mailing list.

We appreciate the time and effort everyone has put toward contributing code and documentation, posting to the mailing lists, and logging issues. We also greatly appreciate the help from our sponsors, particularly Atlassian, Cenqua, Contegix, JetBrains, and KGBInternet. Without them, working on this project wouldn't be nearly as much fun.

Update: The videos are much lower quality than the ones I originally recorded (13 MB vs. 70 MB). If you want to view the high quality videos (they're much clearer), you can download them from If someone has a better way to compress these (I just used QuickTime's Export feature), please let me know.

Also, this release contains the first release of the AppFuse Maven Plugin. This plugin is largely based on Hibernate Tools. We modified many of the FreeMarker templates from Hibernate Tools to default to certain annotations, as well as clean up the formatting. These templates are currently available in AppFuse's SVN. Hopefully making them available is enough to satisfy Hibernate's LGPL license.

Posted in Java at May 23 2007, 05:49:10 PM MDT 16 Comments

Proof that Abbie is growing up fast

Abbie Loo There's been a couple of significant events in Abbie's (and our) lives in the last couple of weeks. First of all, Julie and the kids spent two weeks down in Florida at the beginning of May. Julie's mom has a pool, so the kids enjoyed swimming in it almost every day. They've both been taking swimming lessons, but they certainly couldn't swim by themselves. Julie taught Abbie to do an underwater breaststroke rather than doggie paddling after the first few days. By the time I arrived (a week after their arrival), Abbie could swim all by herself, underwater. By the end of the week, she could swim from one end of the pool to the other. Pretty impressive I must say.

The 2nd event I learned about on Friday night. Sometime last week, Julie decided to start giving Abbie money to do chores around the house. She can only earn a maximum of $1 per day, but she's super pumped about it and is always asking if she can do stuff. Her room is usually spotless now. With her new found wealth, she needed something to store it in - so Julie bought them piggy banks over the weekend. Who knows how long their enthusiasm will last, but I think it's important to teach them how much things cost and how they can save money to get things they want. When I was a kid, I had a lot of chores and earned something like $5/week. While I didn't like the chores, I loved the allowance. It's good to see inflation hasn't influenced allowances too much. ;-)

Posted in General at May 21 2007, 08:31:16 AM MDT 1 Comment

Thanks Erik!

From Erik's Weblog:

After 7 years, It's time to put my linkblog to rest.

I've been struggling in the last few months to find good content... what used to take 30 minutes, now takes hours. Moreover, places like DZone are doing a better job than I ever could.

I took a few weeks off last summer hoping it would help with my frustrations, but it didn't. In a way it made things worse. It is no longer fun and I can't shake the feeling that I could do something more productive with my time.

Thanks to all my regular (and not so regular) readers. It has been fun.

Thanks for the memories.

I'm definitely bummed to see Erik's Linkblog go, but I understand time commitments and priorities. Erik's Linkblog was one of the first Java blogs I started reading and I've enjoyed it thoroughly all these years. Thanks for all the hard work you've put in over the years Erik. Your linkblog will be missed.

Posted in Java at May 14 2007, 09:40:33 PM MDT 1 Comment

A Story about My Mom

Beautiful Water My Mom is one of the coolest people I've ever met. She was born in Billings, Montana on January 4, 1950. That makes her a Montana Native. She grew up in the city, but moved to The Cabin in her 20s. Life at the cabin wasn't easy. My parents were pretty darn poor the entire time we lived there. To help reduce the cost of living, we raised a lot of animals. We had chickens for eggs, goats for milk, rabbits to eat and every so often, we'd get a couple of pigs to raise for food.

The pigs presented an interesting problem: bears. Bears love pigs. I can remember a couple of times where bears would sneak in and run off with one of the pigs for dinner. Bears were dangerous and my parents didn't like them - both for fear they'd harm one of us, but more because they'd harm the animals and our food supply. Bears were also good eatin', so if there was one hanging around, my parents didn't hesitate to try and shoot it.

When I was 2 years old, I got a puppy for my birthday. We named him "Woofer". He grew into a big ol' Hound Dog and turned out to be great at treeing bears. He had a very deep bark that would apparently scare them into climbing trees, making them easy targets.

The story I'd like to tell about my Mom happened when I was a kid. I don't know how old I was - but I was young enough that I don't remember the story. My dad was out of town, and a bear had been hanging around. My Mom was not happy and set out one day with the rifle and Woofer. They ended up getting the bear up a tree and my Mom shot him down. Apparently, she was pretty mad at the bear for threatening her children and all. She hauled him back to the "skinning tree", which was next to our house. I can see her now, yelling at the bear, telling him he deserved it and what a cocksucker he was. Foaming at the mouth, she whipped out her hunting knife, grabbed him by the balls, and sliced them right off. Still swearing at him, she grabbed a hammer and nail, and angrily nailed his nuts to a tree. "Serves you right you motherfucker", she probably muttered to herself.

To this day, that nail is still here and a small tuft of hair hangs from it. I apologize for the swearing in this story, but my Mom has always cussed like a sailor. ;-)

I'd like to take this opportunity to thank my Mom for all she's taught me. One of the things I've always admired about her is how happy she is all the time. She's a true optimist and enjoys almost everything she does, from being a "Burn Boss" to running in marathons. She's an incredible lady and I'm very proud to call her my Mom. Happy Mother's Day Mom!

Posted in General at May 13 2007, 09:58:54 AM MDT 8 Comments

Off to Florida

While I've been trouncing around the globe with my Dad, Julie and the kids have been splashing around Julie's mom's pool in Florida. Tonight I'll be joining them via a Frontier red eye. I'm not looking forward to the flight, but it'll be great to see everyone. Hopefully by this time tomorrow, I'll be sipping on a cold Corona and sitting by the pool. I like the idea of going on vacation a lot better than attending the JavaOne festivities. ;-)

Sunset in West Palm


Posted in General at May 08 2007, 08:02:25 PM MDT 3 Comments

What a Trip - Amsterdam was a blast!

Last week's trip to Europe for ApacheCon EU was nothing short of spectacular. Amsterdam was an incredible city that amazed me with its awesome biking system (and usage!), incredible atmosphere and a nice sense of relaxation. I think the picture below sums up our trip nicely. The weather couldn't have been better - sunny and warm with a cool breeze.

Amsterdam 2007

ApacheCon was likely an excellent conference, but I'm proud to say I didn't attend a single session. I did manage to make it to Sun's party on Thursday night (thanks Dave!), but that was about it. At the party, the Wicket guys had a BOF, which my dad and I sat in on. Thanks to Martin, Eelco and others for the good conversation, even if we did have to shout.

Wicket BOF

After my talk on Friday, we scrambled for the airport. It was pretty hectic after my talk with our departure looming and the fact that I still needed to pack. To top it off, the power went out in the hotel shortly after my talk. After arriving at the airport, I realized I forgot my passport in the room - Doh! (you're right Neil). Luckily, I was able to sweet talk my way onto the plane anyway and we arrived in Stuttgart an hour later.

The weather wasn't nearly as nice in Germany, but we did have a great time. The folks we went to visit have same last name as my family. Roland Raible was driving his VW Bus through Montana in the early 80s, when he noticed the "Raible" name on our mailbox. Curious, he drove up our front road and made it all the way to the cabin. I remember him driving up the road - I was only 9 years old when it happened. He hopped out of his van and yelled to us "My last name is Raible!" We don't know if we're actually related, but Roland and my dad have stayed in touch ever since that initial meeting. My dad visited him for the first time last year, following one of his trips to Africa.

Roland, his wife Helga and their 2 children all live in Wangen, which is a countryish town in Southern Germany. It rained the two days we were there, but we did make it to "Fidelisback", a bakery that's been around for over 500 years. The beer was excellent, as was the food. On Saturday, we traveled to the Zeppelin Museum and some stone-age huts along Lake Constance. Both places were very cool and educational. We enjoyed the audio tour at the Zeppelin Museum just like we did at the Van Gogh Museum in Amsterdam.

On Sunday, we left Stuttgart around 11 and arrived in Amsterdam at noon. Bruce hooked me up and left my passport in a locker. It was surprisingly easy to travel between The Netherlands and Germany with nothing but a driver's license. We arrived at my house in Denver at 11:00 on Sunday night.

If you ever get a chance to visit Amsterdam for Queen's Day - I highly recommend it. I know we'll be back.

For some photos of our trip, see my Europe 2007 Set on Flickr. Also, checkout Dave's Amsterdam vacation wrap-up for some good photos of Queen's Day.

Posted in General at May 08 2007, 06:17:46 PM MDT 3 Comments