Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

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.

10+ YEARS


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.

On the Road Again

This week is a travel week for me. However, it should be a bit more enjoyable than most "business trips". I'm at Denver's airport right now, getting ready to jump on a plane to Philadelphia. Tomorrow I'll be speaking at Spring Forward 2006. Thomas Risberg and I will be presenting a Spring 2.0 Kickstart session, with Thomas covering Persistence and me covering MVC. It should be a fun show, especially with the current speaker lineup. We've put together some good slides, as well as a sample application. I'll make sure and post a demo, the code, and the presentation following our talk.

I'm going to stay with a friend in Philly on Tuesday night, then head to New York City on Thursday. I heard there's a bullet train that'll get you there in an hour - so I'm going to try to catch that. Wednesday night, I'm crashing on a friend's couch, and then heading up to Boston on Thursday. Hopefully I can catch a train and make it there in a few hours. Julie is flying into Boston on Friday. We'll be enjoying a kick-ass weekend at a friend's wedding before flying home on Sunday.

The beauty of this "train trip through New England" is my EVDO card. Thanks to it, and a 2nd laptop battery, I should be able to work while I'm traveling. On my todo list this week is working on Spring Live and AppFuse.

Posted in Java at Sep 25 2006, 11:49:21 AM MDT 3 Comments

TSS runs on Tomcat?

Looks like TheServerSide.com runs on Tomcat - or at least that's what their 404 page says. I don't know which is better - TSS's 404, Javablog's 404 (blank page) or JavaLobby's. It's hard to believe that major sites like these don't have better 404 pages.

For those of you who want to add a 404 page to your Java-based webapp, it's as simple as adding the following to your web.xml:

    <error-page>
        <error-code>404</error-code>
        <location>/404.jsp</location>
    </error-page>

Props to InfoQ for implementing a 404 page, even if it is rather useless.

Posted in Java at Sep 21 2006, 12:28:22 PM MDT 10 Comments

Lessons learned from using VMWare, Ubuntu and Maven 2 in a Training class

Last week I taught a Spring 2.0 training class in Milwaukee, Wisconsin. This class was different from previous classes because I made a VMWare image of Ubuntu for students to use when doing the labs. They also used Maven 2 and all the computers were without an internet or network connection (yikes!). Eclipse was used for the IDE and Maven's Jetty plugin was used for any web development activities. I'm pleased to say it worked out pretty well, but there were a couple of things I thought I'd write down for others trying this approach.

First of all, this was my first experience using VMWare in a classroom setting. In the past, I've had students setup their own environments. I've also built machines at the training facilities - and had their staff ghost the image for students. I think having students setup their own environments is a good idea, but I've had mixed results. There's always some folks in class that have no interest in knowing how things are setup and would rather everything "just works". These folks are usually disappointed when they have to spend 20 minutes installing a bunch of software. There's always a couple who don't read the instructions thoroughly and install things in the wrong locations. And then you have the folks that want to work on their Linux or OS X laptops. I can generally work it all out b/c I know Windows, Linux and OS X - but this is generally not a good avenue for instructors unfamiliar with multiple operating systems.

The second method - building a machine at the training facility (or client site) and having it replicated - works very well. However, it's often difficult to get private courses (at client sites) to use this method, and students don't get to walk away with anything. The VMWare option, however, allows you to burn the image to a DVD and give students everything from the course, including the computer they worked on.

I've thought of using the VMWare earlier this year, but never seriously considered it until I spoke with Howard Lewis Ship at this year's OSCON. He said he'd used it for a couple classes, and it worked great. He gave me a sample DVD and I used it to start creating my DVD (thanks Howard!). The nicest thing about using this DVD was we were able to brand it for students, as well as setup all 18 machines in the classroom in less than an hour.

Here is a list of issues I found with using a VMWare setup in the classroom:

  • I downloaded the Ubuntu 5.10 image to begin with. After upgrading to 6.06 and installing all the standard Java development software (less than 100MB), my image was 8GB. I was able to shrink it to 4GB and zip it to 2GB, but it's still quite large. Maybe installing 6.06 from scratch would slim things down.
  • On my home machine (dual core AMD with 3GB RAM), the VMWare image ran very fast, with no noticeable performance issues. I used VMWare Server at home, and VMWare Player during the class because it didn't require a (free) serial number. I had it set to 768MB of RAM at both locations, but the machines were noticeably slower (and close to unusable) in the classroom. The classroom machines were 2.5GHz with 1.5GB of RAM.
  • Since I knew most developers would be Windows users, I gave students the option to have me build their Windows environment. One student took me up on the offer and the only painful part was getting the Maven repo to the students machines. I had the Windows setup software on the DVD, so I was able to use that, but then needed to copy my local Maven repo to a thumb drive to transfer that. In the future, I'll put the Maven repo (only 36.5 MB) on the DVD.

All in all, using VMWare in the classroom turned out to be a good experience. It's likely we'll use it for most of our classes, but we'll also fall back to setting up a Windows environment for those students who don't like Ubuntu. As far as using Maven 2, it's been working great too - most of the students didn't even know it was used b/c they did everything in their IDE.

Posted in Java at Sep 19 2006, 11:29:45 AM MDT 4 Comments

New Tutorial: Integrating JBPM into AppFuse

Ameer Ahmed has written a tutorial titled Integrating jBPM into AppFuse. If you're interested in using jBPM in your project, you may want to check it out. I'm sure Ameer would appreciate any comments on his work.

Posted in Java at Sep 15 2006, 02:01:59 PM MDT 10 Comments

Integrating Hibernate Validator with Spring MVC

Remember when I wrote about Better client-side validation with Prototype back in May? Ted Bergeron responded to my post with the following comment:

Now that I am using Hibernate Annotations Validator, I stopped using commons validator. You can use the hibernate validator without using hibernate for persistence. I wrote some jsp 2.0 tag files to handle binding my form fields with spring mvc, and I use reflection to check for the validation annotations. This makes it no work to have a js calendar for all Date fields, or have class="required" added to all fields that have a @NotNull annotation. I'd be happy to send you the code for appfuse 2.0.

Ted followed up by sending me the code. I took a look at it, and reviewed a well-written PDF he'd written for his work. I told him he should publish it as an article, hooked him up with some folks at IBM developerWorks - and voila! Ted's article, titled Hibernate can meet your validation needs was published yesterday. Nice work Ted!

I'm looking forward to trying to leverage Hibernate Validation annotations for all the web frameworks in AppFuse. Should be interesting hacking into the cores of the frameworks to modify how their validation engines work.

Posted in Java at Sep 13 2006, 11:17:46 AM MDT 14 Comments

Integrating Compass with AppFuse and the Display Tag

ChenRanHow has written up a detailed tutorial on how to integrate Compass with AppFuse and the Display Tag. From his mailing list post:

Thanks ChenRanHow!

Another great tutorial was recently written by Luciano Fiandesio. If you're looking to use Quartz, checkout Luciano's (well styled) AppFuse and Quartz tutorial.

In other AppFuse news, FanYang has started translating the documentation to Japanese, Mike McMahon has converted the appfuse-hibernate module to annotations, CruiseControl is continually testing, Mike Horwitz has solved most of the "Maven doesn't read a WARs dependencies" issue, and Scott Ryan is still hard at work on the code generation plugin. Even better - we've asked Scott to come aboard as a committer and he's accepted. Welcome aboard Scott - we appreciate all the work you're doing.

As far as progress on AppFuse 2.0, we're almost done with the Maven 2 conversion. The only thing left is figuring out how to get Mike's maven-warpath-plugin to hook into the Eclipse and IDEA plugins to they generate project files correctly. After that, it's time to start on documentation. I'm still torn on if we should use Confluence or DocBook. However, after looking at Spring's documentation for the past week, I think DocBook is probably the better choice. Then again, Stripes' Confluence Wiki looks nice and organized.

What do you think? What's the best way to write documentation for an open source project? Which system do you prefer to read? From experience, I prefer reading Spring's documentation over trying to find stuff in WebWork's wiki.

We've had great success with AppFuse users contributing to the documentation via a wiki, and I'd hate to create a documentation system that gets away from that. Maybe a DocBook/Confluence combination is the way to go? It looks like the CeltiXFire folks are having a similar debate.

Posted in Java at Sep 09 2006, 12:51:40 PM MDT 6 Comments

GlassFish Numbers Fudging

Remember when I thought Sun/java.net was trying to make GlassFish look more popular than it is? It looks like they took it up a notch in August. Not only do they have the top spot in "most accesses", but they have the top 2 spots!

java.net stats

Isn't it possible to automate these stats instead of using a spreadsheet? ;-)

Posted in Java at Sep 08 2006, 01:58:14 PM MDT 5 Comments

Continuum vs. CruiseControl for Maven 2

I spent some time this past weekend getting automated builds setup for AppFuse 2. Since the project now uses Maven 2, I figured I'd give Continuum a try. I pointed it at my pom.xml in SVN and expected everything to work out-of-the-box. No dice. It seems that Continuum reads the artifactIds instead of the module names for sub-project resolution. To workaround this issue, I'd basically have to rename all my sub-projects to have an "appfuse-" prefix. Doesn't that violate the whole DRY principle? Sure, there's projects that do this, but there's others that don't.

Since I didn't feel like renaming the modules/directories in SVN, I gave CruiseControl a try instead. It took a bit of elbow grease on my part, but I ended up with a config.xml file that works splendidly. It seems somewhat ironic to me that the CruiseControl works better with Maven 2 than Continuum does.

Posted in Java at Sep 05 2006, 03:29:04 PM MDT 28 Comments

AppFuse 2.0 Status

Last week I managed to get AppFuse to compile with Maven 2, this week I got all the tests passing. This week, I struggled with Maven's WAR dependencies and how AppFuse will be used by end-users. It was frustrating, but I think I got most everything figured out. Unfortunately, there's still many issues to be sorted out.[Read More]

Posted in Java at Aug 26 2006, 02:41:26 PM MDT 7 Comments

High Performing Java Web Frameworks

Steven Haines appears to be gearing up for a showdown among Java web frameworks. In his Web Frameworks article (found via dzone), Steven notes the following:

There are many factors that you need to consider when choosing an application framework, including but not limited to:

  • Suitability for your specific business needs
  • Developer productivity
  • Performance
  • Support and community activity
  • Technology maturity
  • Developer prowess
  • Business relationships

He goes on to say that he's planning on comparing a number of web frameworks, and his study will give special attention to how these frameworks perform. He'll be comparing Struts 1.x, Struts 2.x, Shale and Spring MVC. If you think your framework can compete, Steven invites you to send him an e-mail.

If anyone has a compelling reason why we should add an additional framework, please contact me and I will be glad to consider it in this endeavor.

I'm looking forward to reading Steven's articles, I just hope I can find them again when they're published.

Posted in Java at Aug 21 2006, 08:42:40 PM MDT 9 Comments