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.
You searched this site for "appfuse". 771 entries found.

You can also try this same search on Google.

Welcome to 2005

Happy New Year y'all! 2004 was a great year for this website. It was also an awesome year personally. I have a new baby, a new house and a new bus. I learned way more than I thought I would about Spring, WebWork, Tapestry and JSF. And I spoke at a couple conferences, which I certainly didn't anticipate. In 2005, I hope to step back a bit and spend less time working and more time being a good father and husband. Restoring the bus is my major goal I hope to accomplish this year.

Here's this site's stats for 2004:

Usage summary for www.raibledesigns.com

Summary by Month
Month Daily Avg Monthly Totals
Hits Files Pages Visits Sites KBytes Visits Pages Files Hits
Dec 2004 69799 49161 22409 8240 48267 14900635 255456 694680 1523995 2163770
Nov 2004 60768 44741 19467 6909 44461 14825881 207276 584016 1342233 1823057
Oct 2004 59121 42360 19773 6143 45245 13809074 190443 612977 1313172 1832774
Sep 2004 63906 43636 23673 5774 42490 13261427 173226 710216 1309089 1917204
Aug 2004 64860 45090 19532 5624 43517 11726885 174369 605511 1397803 2010661
Jul 2004 57133 39572 16076 5186 42676 10198473 160794 498364 1226754 1771147
Jun 2004 60793 43063 16368 5250 47805 12193392 157517 491061 1291909 1823808
May 2004 57158 42594 14260 5233 48390 13505124 162228 442085 1320430 1771900
Apr 2004 65187 49228 14960 5366 48607 14728211 160982 448823 1476866 1955629
Mar 2004 56271 43067 13638 4956 44910 12697448 153664 422780 1335091 1744423
Feb 2004 53122 40628 13052 4514 41702 10786518 130932 378534 1178222 1540566
Jan 2004 47717 36967 11173 4147 37554 10305975 128587 346372 1145985 1479249
Totals 152939043 2055474 6235419 15861549 21834188

Posted in General at Jan 01 2005, 09:30:53 AM MST 5 Comments

New AppFuse Developer: Nathan Anderson

Nathan Anderson has been a huge help on the AppFuse mailing list lately. He's also setup an IRC Channel and keeps the wiki up-to-date with all kinds of tips and tricks.

I've asked Nathan to join AppFuse as a Committer and he's accepted the offer. Welcome aboard Nathan!

Posted in Java at Dec 22 2004, 12:32:48 PM MST 1 Comment

Happy Holidays!

We're heading for the airport in the next hour. I stayed up and tried to finish off Chapter 11. I still have a few more hours to go, but I made a good dent in it. Our flight leaves in 2 hours (6 a.m.) and we'll be in West Palm Beach, FL until the 31st. Should be a fun day - no sleep, 2 kids and we don't arrive until 3 this afternoon.

Enjoy your holidays - I know I will (after today is over with).

Posted in General at Dec 21 2004, 03:45:46 AM MST 1 Comment

If you could add another framework to AppFuse, which would it be?

If you could add another web framework option to AppFuse, which one would it be and why? Please keep in mind it already includes Struts, Spring, WebWork, JSF and Tapestry.

Posted in Java at Dec 13 2004, 09:52:17 PM MST 38 Comments

AppFuse Tip: Backup and Restore Data with DbUnit

One of the nice things about having DbUnit integrated into AppFuse is you can easily import and export data. I've often used this feature to export a test database (or even production) into my development environment to try and reproduce data-related errors. Here's how to do it:

  1. Run "ant db-export -Ddatabase.host=otherhost". This exports all the data into an XML file named "db-export.xml" in the current directory.
  2. Run "ant db-load -Dfile=db-export.xml" to import the data into your local database.

I've used the db-export task for other things too - like populating the database through the UI and then updating the test data. All you have to do for this is to copy the db-export.xml file to metadata/sql/sample-data.xml.

NOTES:

  • For Oracle, you need to add a "schema" attribute to all the <dbunit> tasks in build.xml. You also need to do this for the "db-export" target for PostgreSQL.
  • If you want to limit the tables exported (i.e. from a production database), simply nest a bunch of <table name="table_name"/> elements inside the <export> element.
  • If you get errors about foreign key constraints when running "db-load" after "db-export" - you need to re-arrange the order of your tables in the imported XML file.
  • To clear out tables before your tests, add an empty <table name="table_name"/> element to sample-data.xml.

Posted in Java at Dec 13 2004, 10:43:18 AM MST 2 Comments

How do I attach a profiler to Ant?

I'll admit, I have very little experience working with a profiler - but I think I need one. Someone e-mailed me about testing all of AppFuse on a super-beafy box, and he got OOM errors after 17 minutes. For a dual CPU, 2Ghz Opterons, with 2GB RAM running RHEL3 workstation, it only made it to the Spring/AppGen test, which is #8 of 21. On my PowerBook, it makes it to #12, but my Linux box only make it to #8 too. My guess is there's some sort of memory leak in one of the testing tools - Tomcat, Cargo, WebTest or AppFuse itself.

Anyone have experience attaching a profiler to their Ant build or testing process to look for memory leaks?

Posted in Java at Dec 12 2004, 10:55:35 AM MST 10 Comments

XmlHttpRequest

Dave quotes it, Charles writes it. XmlHttpRequest is the topic at hand and how it will help us build the next generation of web UIs. I've used Brent Ashley's JSRS Library to do some fancy UI work (one drop-down populates another) last year. It worked well in combination with Erik Hatcher's articles: Remote scripting using a servlet and Sending rich messages between client and server using asynchronous messaging. The project was AppFuse based, so I have the code if someone really wants it.

An example of XmlHttpRequest is in Roller itself - in the twisty comments you see on this site. For those who have used them, you probably know they're somewhat buggy. With all this talk of XmlHttpRequest, maybe it's high-time to revisit Roller's implemenentation and see if the technology has gotten any better. In reality, I know it hasn't - it's the browsers that are the problem and there hasn't been an update to IE in quite some time. My code could probably use some work though. If you want to dig in and check it out, here's the xmlextras.js that does the heavy lifting and comment-specific JavaScript.

After looking at this code this morning, it looks like there's different methods being used for the different browsers.

/////////////////////////////////////////////////////////////////////
//// XML Document loading

function loadXMLDocument(aURL, aCallback)
{ 
  gMediaCallback = aCallback;
  
  if (window.ActiveXObject) {
    // Internet Explorer XML loading syntax
    gMediaDoc = new ActiveXObject(getControlPrefix() + ".XmlDom");
    gMediaDoc.onreadystatechange = onMediaReadyStateChange;
    gMediaDoc.async = true;
    gMediaDoc.load(aURL);
  } else {
    // Mozilla XML loading syntax
    gMediaDoc = document.implementation.createDocument("", "", null);
	var xmlHttp = new XMLHttpRequest();
    xmlHttp.overrideMimeType("text/xml");
	xmlHttp.open("GET", aURL, false);
	xmlHttp.send(null);
    gMediaDoc.loadXML(xmlHttp.responseXML.xml);
    onMediaLoaded();
  }
}

I wonder if there's a common way that can be used for both browsers? BTW, 99% of the code for these comments was borrowed from Joe Hewitt.

Later: Another article covering this technology: Using the XML HTTP Request object. Hat tip to Carl.

Posted in Roller at Dec 11 2004, 09:29:09 AM MST 13 Comments

Can you test all of AppFuse?

I'll admit, it's time for me to get a G5. I can no longer test everything in AppFuse in one fell swoop. When I try to run this Ant build file(info) (which I'd like to use with CruiseControl) on my Mac and Linux machines, I get OutOfMemory errors. My PowerBook has ANT_OPTS set to "-Xmx768m" and my Fedora Core 3 box has it set to "-Xms1024M -Xmx1024M". Both machines have 1 GB of RAM. The build dies a lot sooner on Linux (15 minutes), and the PowerBook gets really close to finishing (42 minutes). I'm guessing all the tests would take about 50 minutes on the PowerBook. There are currently 21 AppFuse combinations tested by this script. Spring is used in all of these, so I've eliminated that as a listed option.

NOTE: If you're trying this on Windows, remove the "fixcrlf" call at the beginning of the "test" target.

  1. Struts + Hibernate
  2. Struts + Hibernate and iBATIS
  3. Struts + iBATIS
  4. Struts with AppGen - Generic
  5. Struts with AppGen - Detailed
  6. Spring MVC + Hibernate
  7. Spring MVC + iBATIS
  8. Spring MVC with AppGen - Generic
  9. Spring MVC with AppGen - Detailed
  10. WebWork + Hibernate
  11. WebWork + iBATIS
  12. WebWork with AppGen - Generic
  13. WebWork with AppGen - Detailed
  14. JSF + Hibernate
  15. JSF + iBATIS
  16. JSF with AppGen - Generic
  17. JSF with AppGen - Detailed
  18. Tapestry + Hibernate
  19. Tapestry + iBATIS
  20. Tapestry with AppGen - Generic
  21. Tapestry with AppGen - Detailed

So, the question is - can your machine run all the tests for AppFuse? If so, let me know your specs. I'd love to get this setup for CruiseControl, but if I can't even run it with Ant, I doubt CruiseControl will be any better. I realize I could split things up, but I prefer to have one build file.

Posted in Java at Dec 10 2004, 08:51:02 AM MST 8 Comments

Pick the web framework you think is cool

Ever since I started adding additional web frameworks into AppFuse, people have asked me "which framework should I use?" I've often told them "use what you know." If you have in-house knowledge of Struts, use it. I thought this was good advice because I believed that existing knowledge leads to greater productivity.

Lately, I've started to change my philosophy. I'm starting to think it's more important to use the web framework you're passionate about. The one you want to learn more about. After reading Kathy Sierra's "Does it really matter if your tool is cool?", it seems this is a good idea. She writes:

Coolness (or just perceived coolness, it really doesn't matter) is linked to passion. The cooler you perceive your tools to be, the more passionate you are about those tools. And passion, while it might lead to the "everything is a nail" syndrome, has an extraordinary amount of value!

Obviously there's quality of life... a life with passion is certainly more fun than one without. And the more passion, the greater the chances that a person has what psychologists label optimal experiences. And the more optimal experiences one has, the more likely one is to describe life as being "happy". So, passion = optimal experiences = happiness. And research says happy people are generally more productive. Certainly they're more spirited and fun to be around...

So I guess passion leads to greater productivity, not existing knowledge. So which web framework do you think is cool? Which one are you passionate about?

If I had to choose based on my passionate choice, and the one that I think is the coolest, I'd have to go with Tapestry or possibly JSF (JSF would be a lot cooler if it let me put my JSPs in the WEB-INF directory instead of in the root). These are the frameworks I want to learn more about. 6 months from now? Maybe Laszlo or JDNC.

Posted in Java at Dec 09 2004, 04:47:25 PM MST 17 Comments

Speaking at MySQL Users Conference

Looks like I'll be speaking at the MySQL User Conference in April 2005. This conference is at the Santa Clara Convention center, where SD West was last year.

Congratulations! You have been accepted as a presenter for
the MySQL Users Conference 2005 at the Westin Santa Clara, Santa Clara,
California, April 18, 2005 - April 21, 2005.

The following has been accepted as a 3 hour tutorial class for the
event:

"Developing Test-Driven Web Applications With Spring and Hibernate"

The tutorial classes are scheduled for Monday, April 18, and we will
send the exact time schedule shortly.

They wanted a fancier title than all the AppFuse ones I had cooked up - that's why it's titled Developing Test-Driven Web Applications With Spring and Hibernate. Now I just need to figure out what kind of app to develop in 3 hours. With AppGen and AppFuse Generator, it takes a lot of fun out of the development process. Or maybe it puts the fun back in?

If there's a JUG nearby that'd like to know a bit more about AppFuse or Spring, let me know.

Posted in Java at Dec 09 2004, 02:21:52 PM MST 1 Comment