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.

It's so easy to use, it doesn't even feel like work

Today I spent the whole day at my client doing training on the app I've been writing since November. The app is for posting jobs, entering resumes and screening applicants. It was originally created using Struts Resume and is in synch with the latest AppFuse code. It's been a fun app to develop and now that development is winding down, user training is beginning. When the head of HR was leaving the room today, she said something that made my day.

"It's so easy to use, it doesn't even feel like work."

There's nothing quite like compliments from a client. grin

Posted in General at Apr 26 2004, 03:35:52 PM MDT Add a Comment

[ANN] Hibernate 2.1.3 Released

Download · Release Notes. It's been awhile since the last Hibernate release (approx 2.5 months) - most likely because the last one has been rock solid - at least it has been on my projects. All tests pass in AppFuse.

Posted in Java at Apr 25 2004, 10:09:10 PM MDT Add a Comment

Goals for the week with XDoclet, Spring and AppFuse

I have a lot that I want to accomplish this week. Hopefully a few late nights will make it possible. I'm posting this list here in case someone has already done some of this.

  • XDoclet: duplicate the Struts-specific <validationxml> Ant task for Spring. Make it work with POJOs. This is primarily motivated by the fact that I got the commons validator stuff to work just like it does with Struts.
  • XDoclet: create a new <strutsform> task that doesn't depend on ejbdoclet. This will allow me to remove AppFuse's dependency on j2ee.jar.
  • Spring: extract the mock objects used in Spring's internal test suite so I can use them to test Spring Controllers (springtestcase? ;-)).
  • AppFuse: finish Spring MVC integration and release 1.5 beta.

Phew - it's gonna be a rough week with very little sleep. Fortunately, it'll all be worth it if I can pull it off.

Update: Sometimes things just click: generate validation.xml for Spring and generate ActionForms from POJOs w/o an EJB dependency. I also discovered that <hibernatedoclet> requires that xdoclet.modules.ejb.EjbDocletTask is in the classpath. It doesn't make sense, but the compiler doesn't lie.

Posted in Java at Apr 25 2004, 04:02:15 PM MDT 3 Comments

Logout your users automatically after their session times out

One of the common issues I see in webapps is a user leaves their computer, their session times out, and when they come back to do something - the app throws errors b/c their session is null. There are several easy ways to fix this. If you use Container Managed Authentication, the user will likely be prompted to do login and can continue as before. If you're using a slick Remember Me feature (like AppFuse has), the user won't even notice. However, you might not have these options available to you. For those circumstances, I recommend you put a meta-refresh in your app to automatically show the uses a timeout message when their session expires. It's as simple as the following:

<meta http-equiv="Refresh" 
  content="${pageContext.session.maxInactiveInterval}; url=timeout.jsp"/>

I used JSP 2.0's EL in this example for simplification. If you're using a JSP 1.2 container - you'll have to wrap that expression with a <c:out> tag.

Posted in Java at Apr 24 2004, 07:33:10 AM MDT 8 Comments

Full Time vs. Contract

I talked with some folks yesterday about joining their company as a full-time employee. Their opportunity sounds awesome: using open source tools to develop a product. The opportunity certainly appeals to me. In a sense - I could get paid to work on AppFuse. I could get paid to do the stuff I wake up early and go to bed late for. I could spend more time with my family because I'm doing my "moonlighting" stuff during the daytime.

At least that was their sales pitch.

In reality, no company in their right mind is going to pay me to work on all the open source projects I contribute to: AppFuse, Roller, Struts Resume, Struts Menu and DisplayTag. Sure, they might allow me to work on AppFuse and Roller for a few hours a week, but I can guarantee that I'll still want to contribute to the others - and hence, continue to burn the midnight oil. I've also started to think that the main reason for doing stuff "after hours" is because I spend my evenings with Julie and Abbie - whereas I used to work in the evening.

More than anything, the opportunity really got me thinking about doing full-time work vs. contract work. I've been doing contract work for almost 3 years now - and I've only had 2 months of no work in that 3 year period. So that whole contracting is so unstable has been a myth for me. In fact, I see contracting as more stable than an employee position because I control my own destiny for the most part. NOTE: This post is likely a bit biased because my contract just got extended until the end of the year and I'm working on an AppFuse-based application. In other words, I love my job right now.

The thing I enjoy the most about contracting over full-time is freedom. I am planning to take 7 weeks off in the next few months (3 weeks for Spring Live, 4 weeks for the new baby) - and with a full-time gig, that would be impossible. I also like the ability (again, this is probably because my current client is so cool) to take a week off to attend a conference, or take a few days off to run off and do some training. The fact that I'm not tied down to one client/company is awesome. With the full-time opportunity I'm considering, I feel like I'd be marrying a woman I met just a few weeks ago. I guess most full-time gigs are like this after you've been set free with contracting.

One of the main reasons I'm considering this full-time gig is because I don't know where I want to be in 5 years. Most of my career aspirations have been met. When I started in this industry, I wanted to gain enough knowledge about what I do to speak at conferences and such. I did that last week and it was a blast - but I don't really want to do that every month - especially if I have to travel. Traveling away from my family is no fun - and happiness is more important than anything. The nice thing about the full-time gig is that its centered around a product, rather than services. Services (i.e. consulting) are great - but they're only good as long as I'm capable of working. Developing products that earn money while you're on vacation - that's the ideal situation.

The only thing I don't like about my current contract is that I'm a lone wolf. I'm the only guy developing the current app - which is great, but there's no "team spirit." My favorite job ever had awesome team spirit. This opportunity is a startup, which often leads to team spirit - but they also enticed me with ideas of working with a smart bunch of developers. If you've ever worked with smart people, you know that this is a real treat. Learning from your peers just by going into the office is quite a rush. When someone tries to find their answer on Google before asking you - it's refreshing. But is this worth giving up freedom for?

Another important consideration is compensation. Contracting tends to pay 50%-100% more than a full-time position. Of course, this full-time opportunity has options (which supposedly narrows the gap), but we all know that those rarely come to fruition. And if they do - it usually takes a couple of years. I am well aware that a cool job is waaayyy better than a good paying one, but still - getting paid well is nice.

Lastly, to throw a wrench into everything, someone sent me an e-mail last night suggesting they might (someday) be interested in paying me to do full-time AppFuse development. Heh - now that sounds like the ultimate dream job.

Posted in Java at Apr 21 2004, 04:53:32 PM MDT 18 Comments

How does your MVC framework handle duplicate posts?

One of the problems that you'll often see in webapps is that when a record is added - hitting refresh on the browser will cause a 2nd record to be added. This is because the "Save" action usually does a forward, rather than a redirect, and the full post is re-created. I'm curious to know how other MVC Frameworks handle this issue, particularly Spring, WebWork, Tapestry and JSF. In Struts, it's pretty simple to solve. When the form is first displayed, you'll likely go through an Action. In AppFuse, this would be something like UserAction.edit(). In the edit method, you add a saveToken() call to put a token into the session:

// edit method - mark start of operation
saveToken(request);

Then in the save() method, you can check for a duplicate post using the isTokenValid() method:

// save method - check for valid token
if (!isTokenValid(request)) {
    // duplicate submit, continue to success mapping
    return mapping.findForward("success");
else {
    resetToken(request);
}

How does your Java MVC framework handle this? Do you have to programmatically handle it like Struts - or is it built-in to the framework to handle it auto-magically?

Posted in Java at Apr 20 2004, 11:36:29 PM MDT 22 Comments

New PowerBooks

Apple's New PowerBooks (announced today) don't impress me. Sure it's great that you can get a 1.5 GHz processor now, but I want more. I want at least a 2 GHz PowerBook. Why? The simplest reason is easily demonstrated by the following numbers - comparing my 2.6 GHz Windows XP Deskop to my 1.33 GHz PowerBook.

AppFuse TargetPowerBookDesktop
ant compile 44 seconds 25 seconds
ant test-all 6 minutes 7 seconds 3 minutes 18 seconds

Most Mac Heads will probably cry "compare the Dual G5 and see what happens!" I tried doing this at the MySQL conference last week, but the G5s didn't have internet access so I couldn't download Ant and AppFuse to test it out. Regardless, even if I was able to test it out - the G5 is a Desktop - and I want kick-ass speed in a laptop. You can certainly buy speedy Windows laptops.

This post is not meant to be a bash on PowerBooks - I love my PowerBook and I think that Apple makes the best damn laptop hardware out there. I just wish that Megahertz did matter to Apple and they'd give us a faster laptop. Then again, I'm pumped that these PowerBooks are not G5s, 'cause then I'd want one... ;-)

BTW, I tried Jikes 1.20 to speed things up and AppFuse won't even compile. The problem seems to be a bunch of ".class has an invalid format" errors from Cactus. Sorry Jikes, you failed the 10 minute test.

Posted in Java at Apr 19 2004, 09:28:59 AM MDT 10 Comments

Done speaking for awhile

I'm sitting in Julie's mom's house in West Palm right now, trying to report a little about this past week before I go offline for the weekend. If you're interested, you can read about my talks on AppFuse on my SourceBeat blog. The next time I speak about AppFuse it'll be in Colorado in June. I'm scheduled for the Denver JUG that month, and I've been asked to do Boulder's JUG as well. I hope to use that week as a personal deadline for having Sitemesh and WebWork2 as options in AppFuse. I might not be able to pull it off though. I talked to the current owner of my new hobby and it sounds like I'll be driving the bus from San Diego to Denver in the near future. It's got a brand new engine with plenty of power - which is enough inspiration fo me. I've asked my Dad and he sounded interested in joining me for Raible Road Trip #8. The first part of June seems like a great time to embark on this trip. Maybe I'll do it the week after my DJUG preso.

I definitely enjoyed the MySQL Conference, but it wouldn't have been the same without Anthony and Mark. BTW Mark - you need to start a blog. Mark had one session where he told us about 10 or so parameters that you can use to print out debugging information for MySQL's JDBC Driver. I asked him to send me his presentation so I could document them here, but I'm still waiting. It might be a while though - the MySQL company meeting is in Cancun all next week. Mark gets to work full-time out of his house and then lives it up whenever he gets together with his co-workers. Rough life, eh?

Meeting Anthony was a real treat too. He's one of those no-computer-science-degree kind of guys (like Bruce and I), which always makes for fun conversation. The only problem was I couldn't get him to shut up about Python and scripting my Actions all week long. It's like he's in some sort of Python/Beanshell cult or something.

Today, I skipped all conference sessions and opted for a day at Sea World with Julie, Abbie and Julie's Mom Stephanie. It was a great time and Abbie was amazed by all the cool animals. Now I'm ready for a sunny, family-filled, relaxing weekend in West Palm. I'll try to post some pictures if I get around to it.

Shamu
Shamu at Sea World
Steph's Backyard
The Ladies by the pool in West Palm

Posted in General at Apr 16 2004, 10:48:40 PM MDT 2 Comments

i18n - synching up Struts and JSTL

As he did with Roller, Jaap van der Molen made some enhancements to AppFuse to fully support internationalization. He also translated all the existing keys to Dutch. What a guy, eh?!

After I installed this enhanced version of AppFuse, I noticed a few quirks. Namely that my default language was Dutch. To me, this meant that my browser's local must be Dutch. However, since it wasn't, I knew there had to be an issue. After a bit of Googling, I found my answer. It turns out that if you don't specify the language on your default properties file, JSTL won't pick it up - and it defaults to the first one with a language specified. This means that you must have ApplicationResources_en.properties instead of ApplicationResources.properties. Also, another quirk is that you need to synch up Struts locale-setting and JSTL's locale-setting. To do this, I added the following method to my ActionFilter.java class:

    // keep JSTL and Struts Locale's in synch
    Locale locale = (Locale) session.getAttribute(Globals.LOCALE_KEY);
    if (locale == null) {
        locale = request.getLocale();
    }
    if (request.getParameter("locale") != null) {
        locale = new Locale(request.getParameter("locale"));
    }
    session.setAttribute(Globals.LOCALE_KEY, locale);
    Config.set(session, Config.FMT_LOCALE, locale);

Even with all these "hacks" - Mozilla and Safari handle this stuff differently on the Mac. Jaap says that everything works fine on Windows w/o these hacks, so maybe it's just an OS X thing. Regardless, to make things easier, I've added the ability for users to switch between languages by clicking on their language of choice.

There's nothing like adding a new feature to something you're about to demo! I'm on in 45 minutes - the butterflies are fluttering like mad...

Posted in Java at Apr 15 2004, 12:42:00 PM MDT 9 Comments

[ANN] Display Tag 1.0 Beta 3 Released

View the Release Notes, checkout the changelog and/or download. Kudos to Fabrizio, who does almost all the work on this tag.

BTW, I tried downloading it a few times and it kept hanging (from several sites) - so I went with building from CVS. Same difference, right? And yes, all tests pass in AppFuse! ;-)

Posted in Java at Apr 12 2004, 02:51:02 PM MDT Add a Comment