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.

Recovering

Yesterday I got inspired to get myself out of this funk and go to a local VW Show with the fam. I woke up, took a shower and almost passed out. Probably from standing up more than I'm used to - or the dizziness that constantly surrounds me. After resting awhile and popping a pain killer, we jumped in the car and headed out to Golden. The show was awesome and I saw lots of nice buses and bugs - and even joined the Colorado VW Bus Club. I felt dizzy most of the time, still no appetite - but nevertheless - I was active. It felt great. I spent the rest of the day on the couch with passing fevers.

This morning I woke up determined to go to work. After waking up, I headed into the living room with breakfast. Julie took my temperature and said it was around 101. So I popped some Tylenol and decided to rest for an hour before heading into the office. After resting and taking a cold shower - I got dressed and headed into the office (40 minutes North). I was sweating so bad - I guess from the fever breaking - that I had to take a towel with me for the trip. Anyway, to make a long story longer - I made it to the office and worked most of the day w/o any issues. I also managed to submit my two weeks notice to my current client. He wasn't surprised and said he'd been expecting it sooner or later.

So where am I off to? EJB Solutions - the inventors of Out-of-the-Box - for a 3-month contract. I grew to love Out-of-the-Box after my last Linux install and I'm very excited about working on a product I love. Here's the best part. I asked them what I might be working on for the first month. Here is their response:

...updating sample applications, especially those using Hibernate, XDoclet, and Struts to bring them up to date with the latest versions, recommended idioms, beef them up, etc.

Sounds like fun, eh? I'm pumped and can't wait to start in two weeks! Another intriguing factor for me was I can ride my bike into the office (when I do go in) and it's shorts and t-shirts all summer. Denver summers + riding bike to work + shorts and t-shirts allowed at work = a very happy Java Developer. The contract is scheduled to end when Raible #2 is born (Labor Day Weekend - September 3rd). After that, I'm taking a month off to be a good Dad and hopefully I'll be able to find another contract starting in October.

As far as my illness and contributing to open source, I've come to realize that my body is capable of amazing feats. Sleeping 2-3 hours a night, coding 20-some hours per day. But it's no life for me. However, it was a life I was planning on living all the way until Spring Live is finished in late June (right before JavaOne). I'd still like to finish the book by then, but it's going to take a serious shift in priorities. Which basically means, drop everything and work on the book.

I'll probably still try to get AppFuse 1.5 documented and released by the end of the month - but then I really need to virtually abandon all my open source contributions. It's just the only way I can see to pump out 150 pages of Spring stuff in 1 week off + a bunch of late nights. I still plan on blogging a lot b/c when I'm busy I tend to blog more. I think AppFuse could use the lack-of-development for awhile - it wouldn't hurt to stabilize the code-base over the summer.

Posted in General at May 17 2004, 08:56:54 PM MDT 6 Comments

What the hell is wrong with me?

Ever since last Tuesday, I've felt like shit. My sickness has mostly been body aches and dizziness. Body aches like you get when you sleep too much. Dizziness like when you stand up too fast. It started shortly after I finished work on Tuesday and resulted in a 7:00 p.m. bedtime for me that night. The next day, I felt good enough to wake up at 4:00 a.m. and knock out a bunch of code. When I went on a bike ride on Wednesday afternoon, the dizziness started again - fading in and out every few minutes. I was still able to climb the mountain, but I was pretty damn slow. Over the next few days, the dizziness has increased from being prevalent in the evenings to disrupting my whole day.

Yesterday, for Mother's Day, we went out to a nice brunch and I downed a few Mimosas. By the time the meal was over, I was holding my stomach in pain. I cured the pain with an afternoon nap - but woke up with a fever. The fever hung around for a few hours, but eventually broke. Today was more of the same: dizziness, pain in my stomach, body pains and loss of appetite. We figured it was about time I went to a Doctor. We had suspicions - everything from an ulcer to colon cancer. Yeah, Julie kept giggling with the though of a Barium Enema for yours truly.

Unfortunately, the doctor did not have a quick and simple diagnosis of my affliction. He said that I have all the symptoms of West Nile, but it's too early and I haven't seen any mosquitos. He came to the conclusion that its some kind of virus and hopefully I'll be better in a week or so. They extracted my fluids for testing - so hopefully they'll have some more information for me tomorrow. In the meantime, I remain slightly feverish, a little dizzy and my body is engulfed in a dull pain. It's not a crippling illness, just annoying - annoying enough to keep me de-motivated for many computer-related activities. Too bad I have two clients that want releases this week, as well as AppFuse 1.5 final.

If you don't hear from me in the next few days, its likely gotten worse.

Update: The doctor called this morning (the day after the above post) and said all my fluids came back normal. Therefore, they just think it's a virus of some sort. Thanks to all who commented - I wish it was just exhaustion. Unfortunately, it seems to be much worse than that since I tend to recover from exhaustion in a couple of days. Now I'm just hoping that I'll recover before Denver's NFJS.

Posted in General at May 10 2004, 06:23:50 PM MDT 26 Comments

Struts Contract position in DTC

If you're an independent contractor, live in Denver, and know Struts - you might want to checkout this position. Requires: Struts, Tiles, JavaScript, DHTML. Sounds like a fun gig - contact me if you're interested and I'll give you the rate.

In a related note, I might have a contract opportunity for a local developer familiar with AppFuse and its technologies (most important: Struts, Hibernate, Spring and JUnit).

Posted in Java at May 05 2004, 09:11:46 AM MDT Add a Comment

[ANN] AppFuse 1.5 Beta Released!

This release has lots of modifications that I've been meaning to make for quite some time. Specifically (1) removing the dependency on j2ee.jar and (2) removing Struts from the services layer. I also made improvements to Spring and its context file loading so you should be able to run unit tests from your IDE.

Other notables include full i18n support (with translations in Dutch, Brazilian and Chinese), improved setup-tomcat target (no additional JARs needed now), and an option to use Spring's MVC framework instead of Struts. If you'd like, you can read more about my conversion from Struts to Spring. Enjoy!

BTW, this upload was a little hefty for java.net at 12.5 MB - because of the iBATIS and Spring MVC option. My browsers (Mozilla and IE) kept timing out and I was getting a "Not enough space" error. To fix this, I had to increase the timeout on Mozilla. Here's the steps I went through:

  • Type "about:config" in the address bar.
  • Type "timeout" in the filter field and hit Enter.
  • Change "network.http.keep-alive.timeout" to 600 (10 minutes). The default is 300.

Posted in Java at May 04 2004, 03:57:41 PM MDT 10 Comments

Creating column indexes with Hibernate

One of the best ways to speed up your application's performance is to create or optimize indexes in your database. On my current project, when we created our database on the AS/400 last week, the DBA noticed that there weren't any indexed created. I expected this and said I'd do some research on creating indexes with Hibernate. Thanks to Gavin, it turns out to be quite simple. Let's say you have an XDoclet tag on a column you want to index. Currently it is:

@hibernate.property column="username" not-null="true"

If you're using Hibernate's <schemaexport> task, you can add an index on this column to your mapping file and it'll create the index when creating the database. To add an index, it's as simple as changing the above XDoclet tag to:

@hibernate.property
@hibernate.column name="username" not-null="true" index="index_name"

Now the hard part comes. Which columns should you put indexes on? From what I've heard, it's the ones that you use in where clauses of your queries. I expect one or two per table is sufficient (??). One thing I'm not sure of is: should id columns contain an index?

Posted in Java at May 03 2004, 12:06:44 PM MDT 11 Comments

Mapping buttons to methods

In AppFuse, I use Struts' LookupDispatchAction to map submit buttons to methods in my Actions. It's caused quite a headache for i18n, but Jaap provided a workaround and now everything works fine. However, as I did the Spring MVC implementation this weekend, I didn't have to do any complicated "button value -> method name" mapping. Part of it was because I didn't need to, but also because I discovered that you can easily just check if the button's name was passed in. Explaining this with code is probably easier. Let's say you have three buttons on a page:

The HTML code for the above buttons is:

<input type="submit" name="save" value="Save" />
<input type="submit" name="delete" value="Delete" />
<input type="submit" name="cancel" value="Cancel" />

Using the name as your key, you can easily check in your Action/Controller/etc. to see which button was clicked:

if (request.getParameter("save") != null) { 
    // do something
}

The nice thing about this is that it doesn't care what value you put on your button - just what you name it. It seems like all frameworks should use something like this, rather than a single parameter name (i.e. "method") that requires JavaScript on a button to change the method invoked. About a month ago, Rick Hightower mentioned that he uses a ButtonNameDispatcher for Struts. Rick, if you're reading this - I'm ready for that bad boy!

Posted in Java at May 03 2004, 09:27:52 AM MDT 12 Comments

Converting AppFuse to use Spring for MVC

It's been a long and painful week - with 3 or 4 nights where I was up to 4 or 5 in the morning. Last night I was up until 4:30 and Abbie woke me up promptly at 7:30. Ugh, sleeping more is probably a good idea. I started on the Spring MVC layer for AppFuse on Thursday night and it took me almost 2 days to convert everything. There's still a few kinks and workarounds - but if you're running it through a browser, everything works the same as it did with the Struts version. The hardest part about it was writing the unit tests. With Struts, it's rather easy b/c I use StrutsTestCase, which provides a very simple API for testing Actions. I'm sure Spring will soon have this same capability with its Servlet API Mocks, but I was definitely banging my head against the wall a few times. I did manage to convert the LabelTag to recognize required fields and error messages. The JSP conversion was a slight pain - but mostly because you have to type a lot more for input fields than you do for Struts. I'm looking forward to WebWork which requires one line to do the whole table row. It has Velocity templates for its tags and they write the <tr>, <label> and the <input>. Pretty slick IMO - less typing is always attractive to me.

I'd like to write-up a detailed entry on "migrating from Struts to Spring" on JRoller, but it's been flakey over there for a few days now - so I might just do it here. We'll see - the lack of sleep is draining my motivation to write. I hope to do the Ant-based installation for Spring in the next couple of days - then I'll release 1.5 beta. My main reason for the beta is because the Spring stuff can probably be cleaned up a lot, as well as it gives me time to write documentation before the final release.

Posted in Java at May 02 2004, 09:17:54 AM MDT 5 Comments

Populate your drop-downs with listeners and allow for refreshing

Most webapps have drop-downs (a.k.a. pick lists) that users select from when filling in forms. Spring has a nice referenceData method on its Controllers that you can use to populate these, but I prefer a different way. In AppFuse, I populate these using a ServletContextListener. However, one of the problems with using this is that your drop-downs won't get refreshed unless you have admins screens or a way to reload the attributes set in the listener.

In short, I think it's a good idea to load drop-down options in a listener and also have an action or servlet to refresh these options. For examples, see StartupListener.java and ReloadAction.java. Got a better way? I'm interested...

Posted in Java at Apr 29 2004, 04:50:55 PM MDT 4 Comments

Why Hibernate Rocks - easy database switching

The app I've been developing over the last 6 months is going live next week. As part of that process, my client decided they wanted to put the production database on their AS400, rather than their JDE/WebSphere/DB2 Server. Hibernate and AppFuse made this super-easy. Add the JDBC Driver, specify a new dialect/jdbc url/driver name, and voila - we're talking to DB2400! After creating the initial tables using Ant we noticed that the table names were too long since the 400 has a limit of 10 characters. To fix this, I simply modified my XDoclet @hibernate.class table="..." to have shorter table names. After that, I simply had to re-arrange a few tables in my sample-data.xml file (for DBUnit) to avoid referential integrity issues. All-in-all, we migrated from MySQL to DB2 on an AS400 in a little under an hour this morning. Hibernate makes my development life soooo much easier.

Posted in Java at Apr 28 2004, 11:53:43 AM MDT 7 Comments

Setting the heap size on your JVM

Cameron has posted a comment on my Performance Tuning MySQL article. The reason I'm highlighting this because it's something I wasn't are of:

From the article:

    -Xms128m -Xmx256m

The Sun JVM will run significantly faster with the following config instead:

    -Xms256m -Xmx256m

That's because the Sun implementation acquires and releases memory from / to the OS way too aggresively if the "ms != mx". Furthermore, either your server has the 256MB available or it doesn't. If you don't have it available, don't set the max that high. If you do have it available, you gain nothing from setting the min lower. This isn't a desktop system, it's a server -- make sure you have the necessary resources and if you do then use them!

Time to change all my heap size setting since I've been using the first setting (128/256) for quite some time. Thanks Cameron! The real question is: will changing "-Xms256m -Xmx512m" to "-Xms512m -Xmx512m" speed up my slow-ass PowerBook? ;-)

Posted in Java at Apr 28 2004, 09:16:00 AM MDT 7 Comments