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.

Comparing Open Source Application Servers

With all the recent hubbub about GlassFish, I decided to do a quick performance test this morning. I downloaded all the most recent versions of the various open source application servers, deployed AppFuse 1.9.3 (Struts version) on them, and ran "ant test-canoo" to see if any of them were faster than the other. This was by no means a scientific, isolated test. It also didn't take into account any performance tuning you should do on these servers, I just used the out-of-the-box settings.

I ran these tests on my MacBook Pro (2.16 GHz Intel Core Duo, 2 GB DDR2 SDRAM) with my JAVA_OPTS set to:

-Xms768M -Xmx768M -XX:MaxPermSize=512m -Djava.awt.headless=true

When typing "java -version" at the command line, I got:

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-103)
Java HotSpot(TM) Client VM (build 1.5.0_06-57, mixed mode, sharing)

Servers tested (in no particular order):

  • JBoss 4.0.4
  • GlassFish B48
  • JOnAS 4.7.6
  • Resin 3.0.21
  • Geronimo 1.1

I'm pleased to note that all servers allowed me to deploy appfuse.war without using a console or command-line tool. They all support dropping the WAR in some sort of auto-deploy directory. Very cool! Secondly, I was able to successfully deploy AppFuse on all of them with no changes to AppFuse nor the server. Quite impressive.

My test consisted of the following:

  • Copying appfuse.war into the appropriate directory
  • Starting the server
  • Running "ant test-canoo" from my $APPFUSE_HOME directory once
  • Running "ant test-canoo" 3 times, recording the numbers for each run

Here's what I found:

Server Name1st run (seconds)2nd run3rd runAverage
JBoss 4.0.424232323.33
GlassFish B4825242424.33
JOnAS 4.7.625252725.66
Resin 3.0.2123232323
Geronimo 1.128232324.66

Since I know you're going to ask about Jetty and Tomcat (the two main servlet-only containers), I ran the numbers on those too. First off, I tried Jetty 6 RC0. No dice - I got the following error when trying to start the server.

java.lang.IllegalStateException: Cannot initialize context because there is already a root application 
context present - check whether you have multiple ContextLoader* definitions in your web.xml!
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:173)

Since AppFuse deploys on all the above app servers, as well as Jetty 5.1.x, I'll chalk this up to a bug in Jetty 6. I used Jetty 5.1.11 for this test because I already had it installed on my machine.

Server Name1st run (seconds)2nd run3rd runAverage
Jetty 5.1.1124252424.33
Tomcat 5.5.1723232222.66

I don't know that these numbers mean anything, but it was a fun experiment. For those of you who think these numbers might mean something, here's the rankings:

  1. Tomcat 5.5.17
  2. Resin 3.0.21
  3. JBoss 4.0.4
  4. Jetty 5.1.11/GlassFish B48 (tie)
  5. Geronimo 1.1
  6. JOnAS 4.7.6

Of course, the better test would be hammering each server with 1000 concurrent users (or a number higher than that) and comparing how each server holds up.

Posted in Java at Aug 15 2006, 10:00:56 AM MDT 11 Comments

AppFuse Roadmap updated for 2.0

I've updated the AppFuse Roadmap for the upcoming 2.0 version. The current plan is to have a few milestone releases before the final 2.0 release. I can't promise any specific release date because of developer's schedules and current commitments. However, my hope is we can have it done by the end of this year.

Milestone 1

  • Maven 2 integration
  • Migrate from CVS to Subversion
  • Remove XDoclet, putting generated files into source tree
  • Get all flavors (WARs) deployed and running on Tomcat and Jetty Maven Plugin
  • Spring 2.0: Upgrade XML to XSDs, annotations where appropriate
  • Upgrade WebWork to Struts 2
  • Documentation - move to new Confluence or DocBook-based system for 2.0 documentation

Milestone 2

Milestone 3

  • Integrate XFire by default (for existing classes and generated classes)
  • Code Generation/AppGen - hopefully with the AppFuse Maven Plugin
  • Documentation

2.0 Nice to haves

  • TestNG replacing JUnit
  • Hibernate Validation Annotations (hard part is hooking it into the web frameworks)
  • Tomcat Plugin for Maven (that operates like Jetty's plugin)
  • JPA Support
  • Support for JDK 1.4 using something like Retroweaver
  • Support for using Ant to build/test/deploy AppFuse-based projects
  • Someone to do all the documentation ;-)

Let me know if there's anything that seems to be missing from this list.

If you can't wait until the end of this year, you may take a look at Patrick Lightbody's newly announced Project Able. He has a lot of good ideas in there that I hope to learn from.

Posted in Java at Aug 15 2006, 07:06:24 AM MDT 8 Comments

A device-free weekend

This weekend, I did something I haven't done in a while (if ever). I left my laptop at work, and I promised myself to not touch a keyboard all weekend. When my phone's battery died on Saturday morning, and I realized I'd left my charger at work, I decided to go no-devices all the way. Of course, I still watched TV and enjoyed my car stereo, but being computer-free felt liberating. It was an awesome weekend, and I'm thinking about doing it from now on.

Saturday, Julie and I had a great time watching Superman, IMAX, in 3D. It was killer. The whole movie wasn't 3D, but the 4 scenes in 3D were incredible. I highly recommend it. On Sunday, we had kickass seats to The International thanks to Virtuas. We sat on the 18th hole and watched golf while getting free cocktails served to us for several hours. It didn't suck by any means.

Posted in General at Aug 14 2006, 10:06:00 AM MDT Add a Comment

Tutorial: How to Create an AJAX-based file upload progress bar

Helge Tesgaard has written a nice tutorial on How to Create an AJAX-based file upload progress bar with AppFuse 1.9.3. Check it out if you have a need for such a thing. I especially like Helge's comment on productivity towards the end. ;-)

Posted in Java at Aug 10 2006, 04:11:39 PM MDT Add a Comment

How accurate are java.net's top project statistics?

Yesterday, java.net updated their Top Ranked Projects page to reflect the top projects for July 2006. I've always thought these were fairly accurate. However, a couple of weeks ago, I did a bit of investigating (since GlassFish always seems to top all categories) and I found some interesting information. First of all, when last month's stats were first published, I noticed that DWR was on top of the "mailing list traffic" category. I did some investigating, and found the following:

DWR: 62 + 522 + 1 + 3 + 1 = 589
AppFuse: 65 + 134 + 542 + 21 = 762

So I thought, am I missing something? Why does AppFuse rank lower. I posted a question to the java.net forums, and got the following response:

I have a typo in my spreadsheet where I ran the numbers. Let me recheck and fix.

Thanks to Helen for her honesty, but isn't this something that could easily be automated? This would eliminate any calculation errors? Especially since there seems to be issues with the previous month's statistics.

For June 2006 (excluding AppFuse's issues and cvs lists):

GlassFish: 184 + 204 + 28 + 80 + 2 + 36 + 4 + 11 + 17 = 566
AppFuse: 684 + 19 = 703

AppFuse had more mailing list traffic, yet GlassFish is #1 and AppFuse is #3. Is java.net trying to make GlassFish look more popular than it is?

Posted in Java at Aug 10 2006, 01:48:00 PM MDT 7 Comments

Denver JUG Tonight: Echo and Wicket

Looks to be a good show at tonight's DJUG: Justin Lee will be talking about Wicket and Tom Poindexter is presenting on Echo2.

BTW, did you know that Wicket may become an Apache project? I consider the main web frameworks in Java to be: JSF, Spring MVC, Struts 2 and Tapestry. RIFE, Stripes and Wicket follow close behind, but are generally very unheard of in the Java community at large. It's kinda wierd to see most of the Java web frameworks (save Spring MVC) end up at Apache, isn't it?

Update: This was a good meeting, mostly because both speakers were excellent. Relaxed, comfortable and good humored. Justin has a recap (and downloadable presentation) on his blog.

Posted in Java at Aug 09 2006, 07:15:33 AM MDT 4 Comments

7 simple reasons to use AppFuse

IBM developerWorks published my "Seven simple reasons to use AppFuse" article today. Here's a summary:

Getting started with open source tools for the Java™ platform such as Spring, Hibernate, or MySQL can be difficult. Throw in Ant or Maven, a little Ajax with DWR, and a Web framework -- say, JSF -- and you're up to your eyeballs just trying to configure your application. AppFuse removes the pain of integrating open source projects. It also makes testing a first-class citizen, allows you to generate your entire UI from database tables, and supports Web services with XFire. Furthermore, AppFuse's community is healthy and happy -- and one of the few places where users of different Web frameworks actually get along.

While you're there, you might be interested in reading the "Introduction to Spring 2 and JPA" tutorial. I don't know if we'll get JPA support into AppFuse 2.0, but it's certainly a possibility.

As far as AppFuse 2.0, here's the current structure I've started on for Maven 2:

appfuse
    - data
        - hibernate
        - ibatis
    - service
        - pom.xml
        - src
    - web
        - jsf
        - spring
        - struts
        - tapestry

After code is moved into the directory structure above (or completely re-written), I'd like to move to working on creating single module archetypes and multi-project archetypes (data, service, web) with Maven 2.

After getting the Maven 2 structure checked in, hopefully we can start looking at replacing AppGen. Scott Ryan has done a fair amount of work on this so far with his AppFuse Maven Plugin.

I plan on documenting the plan of attack and milestone features for 2.0 sometime this week.

Update: I started working on the Maven 2 conversion last night. The above structure has changed slightly. Now there's a project in data and web (notice the pom.xml and src in these directories). These projects will contain the classes/files that are common to their sub-projects. The fact that these projects even exist will likely be transparent to the end user.

AppFuse 2 Structure

Posted in Java at Aug 08 2006, 01:14:15 PM MDT 17 Comments

Dream Machine

Mac ProWell done Apple, you've created my dream machine. Too bad it's so damn expensive. My ideal configuration is as follows:

  • Two 3GHz Dual-Core Intel Xeon
  • 4GB (4 x 1GB)
  • Hard Drive - Bay 1: 250GB 7200-rpm Serial ATA 3Gb/s
  • Hard Drive - Bay 2: 500GB 7200-rpm Serial ATA 3Gb/s
  • 2 x NVIDIA GeForce 7300 GT 256MB
  • Apple Cinema HD Display (23" flat panel)
  • 2 x SuperDrives
  • Both Bluetooth 2.0+EDR and AirPort Extreme
  • Apple Wireless Keyboard and Apple wireless Mighty Mouse
  • AppleCare
  • Subtotal: $6,436.00

The nice thing about owning one of these bad boys is you could run several copies of Linux and Windows (using VMWare and/or Parallels). I could literally buy one machine and have 5 in a matter of hours. Hmmm, I should probably bump up that ram to 8GB.

It's tempting, but that's a lot of cash to shell out for a machine. Then again, the more write-offs the better. ;-)

Posted in Mac OS X at Aug 07 2006, 08:47:11 PM MDT 14 Comments

Back from the Hills

Last week at the Cabin was a great experience. It was one of the first times I've been there in a while where I didn't want to leave. The kids loved it, partly because of the 4-wheeler, but also because they were outside the whole time. Allowing kids to get as dirty as they want is kindof fun. Abbie liked it so much she said she wanted to move there. Who knows, maybe she will someday.

When we arrived at the cabin on Sunday, there was lots of tall grass everywhere.

The Cabin

My mom, a.k.a. "The Burn Boss" (that's her new title at work), made quick work of the fire danger and spent the next 3 days mowing down the grass and killing any knapweed she found.

The nightly hangout

When we weren't hanging out, riding "Rockit" or building the new cabin, we enjoyed Glacier Park and putting a foundation under my parent's bedroom.

It's coooollld Getting close

On the way home, we stopped and saw my aunt in Helena, then spent the night at the Old Faithful Snow Lodge. Saturday was a long 11-hour drive through Wyoming.

All in all, it was a great road trip. I think I've had enough driving for a while though. In the first week alone, I hit 7 states in 7 days!

Posted in General at Aug 07 2006, 07:01:33 AM MDT 2 Comments

Going off the grid

Today marks the beginning of Raible Road Trip #10, Leg #2. My parents and I, as well as Abbie and Jack, are leaving soon to drive to Spokane, Washington. We'll stop in Spokane tonight, where we'll meet up with my sister and Julie. Kalin arrives later tonight (hopefully with a case of cider from her cidery), Julie flies in tomorrow morning. From Spokane, it's about a 4-hour drive to the cabin.

Think we're the ones having all the fun? Nope, Julie is in Vegas right now with her sister. They flew in last night for 12 hours of good ol' Vegas fun.

The cabin, which you can read more about on my about page, is "off the grid" in Montana. There's no electricity, no running water, and 120 acres of lush Montana acreage. There's a sauna for bathing (good ol' Finnish roots) and a generator if we really need power. My mom prefers no generator, my dad likes power and bright lights. I suppose I could dial-up to the 'net if I wanted, but MacBook Pros don't have modems, which is how I prefer it. Vacation shouldn't involve a computer - so I'm pretty pumped that mine will be pretty much useless all week. Besides, we're pouring the foundation for the Cabin #2, and that sounds like a lot more fun than any of this computer stuff.

I'll be back in Denver a week from today, but I don't expect to have any desire to work/blog/etc. until Monday the 7th. And with that, I'm officially on vacation. :-D

Posted in General at Jul 29 2006, 07:42:40 AM MDT Add a Comment