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.

AppFuse 2.0 Status

I managed to get most of AppFuse's code moved over to a Maven 2 structure this week. I have tests working in the hibernate/ibatis projects, as well as the service project, but not in the web tier projects yet. I do have everything compiling though. ;-)

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] AppFuse ............................................... SUCCESS [2.228s]
[INFO] AppFuse Common Data Module ............................ SUCCESS [1.681s]
[INFO] AppFuse Hibernate Module .............................. SUCCESS [0.809s]
[INFO] AppFuse iBATIS Module ................................. SUCCESS [0.630s]
[INFO] AppFuse Data Modules .................................. SUCCESS [0.008s]
[INFO] AppFuse Service Module ................................ SUCCESS [0.696s]
[INFO] AppFuse Common Web Module ............................. SUCCESS [2.817s]
[INFO] AppFuse JSF Module .................................... SUCCESS [4.410s]
[INFO] AppFuse Spring MVC Module ............................. SUCCESS [4.038s]
[INFO] AppFuse Struts 2 Module ............................... SUCCESS [4.954s]
[INFO] AppFuse Tapestry Module ............................... SUCCESS [4.042s]
[INFO] AppFuse Web Modules ................................... SUCCESS [0.007s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26 seconds
[INFO] Finished at: Fri Aug 18 15:06:54 MDT 2006
[INFO] Final Memory: 11M/26M
[INFO] ------------------------------------------------------------------------

If you'd like to review any of the work done thus far, I've uploaded my latest work to:

http://static.appfuse.org/downloads/appfuse2-20060817.zip

The major issue I've encountered to date can be reviewed on the Maven user mailing list. If you happen to try things out, the best thing to do is post feedback to the dev list. I'm considering another device-free weekend, so I may not respond until Monday.

Posted in Java at Aug 18 2006, 03:17:31 PM MDT 14 Comments

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

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

Moving from CVS to SVN at java.net

I like java.net. Ever since I moved AppFuse to java.net from SourceForge (in February 2004), I've been very happy with their service. I can't recall having an issue with CVS, and if I did, it was during a scheduled outage. The only thing that's ever made me consider moving AppFuse to another site was java.net's lack of Subversion.

A lot has changed in the last year, and now java.net does support Subversion. However, if you want a project converted from CVS to SVN, you have three options:

  • Drop and re-create your project, losing all of your mailing-list/forum history
  • Create an entirely new project, which gives you similar results to the first option
  • Pay to have your repository converted

Since I like being at java.net (uptime being the major factor here), I've decided to go with option #3. It's costing $750 to convert AppFuse from CVS to SVN, and Virtuas has agreed to sponsor the move. I like that we'll be using SVN soon, but it does seem odd that we actually have to pay for it. AFAIK, moving a SourceForge project from CVS to SVN doesn't cost anything.

In recent days, I've thought about moving AppFuse to Google Code, but it looks like they might be having some early growing pains.

Google Code Error

Posted in Java at Jul 29 2006, 07:26:16 AM MDT 5 Comments

AppFuse Videos updated for 1.9.3

I've created new AppFuse demo videos that are up-to-date with version 1.9.3. The setup video is around 3 minutes, and the AppGen one is around 3:30.

New Project and Feature Tour
Setup Screenshot

Code Generation with AppGen
AppGen Screenshot

If you have any suggestions on making the above movies more effective, please let me know. I used SnapZ Pro X to shoot them and QuickTime Pro to compress.

In other AppFuse news, a couple of new tutorials have been written:

Props go out to Chris, Matt and Luciano for taking the time to write these detailed tutorials. Well done gents!

Posted in Java at Jul 24 2006, 08:58:06 PM MDT 10 Comments

Article on Equinox in Das Java Magazin

In AppFuse's IRC, I learned of a German article on Equinox. It sure looks cool - too bad I can't read it.

Posted in Java at Jul 20 2006, 12:35:41 PM MDT 4 Comments