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.

Pennies in the Radio

Julie took her car in to the stereo shop today b/c the radio was cutting out every once in a while. Actually, it was better than that - it'd quit working when she'd drive over a bump, and then start working again when she hit the next bump. The stereo shop called a few minutes ago to tell us what the problem was: someone has stuffed pennies into the radio, and they'd somehow fallen down and were shorting out the wiring below. I wonder who that someone was?

Our Little Cowgirl

If you have a good "my life as a parent" story, I'd love to hear it.

Posted in General at Oct 22 2005, 03:20:32 PM MDT 16 Comments

What's a good DVI KVM?

I'm looking to get a KVM Switch for my home office. I used to have one when I had 2 19" Dell Monitors and it worked quite well. However, since I got a 23" Cinema Display, I haven't had one. This means that if I ever work on my PowerBook, I don't get to enjoy the comfort of a keyboard, mouse and huge monitor. This needs to change.

I bought a DVI KVM switch when I first got the monitor a year ago, and it didn't work. Apple's DVI connector was too big and didn't fit in the switch. So now I'm looking again - do you know of any that work well with a Cinema Display?

Posted in Mac OS X at Oct 20 2005, 08:56:21 AM MDT 7 Comments

MySQLDialect vs. MySQLInnoDBDialect

I've used Hibernate's MySQLDialect ever since I started using Hibernate and MySQL. However, I noticed with Hibernate 3 there's a couple of new MySQL Dialects in town: MySQLInnoDBDialect and MySQLMyISAMDialect. Using MySQLDialect still seems to work fine for me - and it handles transaction rollbacks when I'm using InnoDB types.

What's the point of these fine-grained dialects? Should they be used when possible, or does MySQLDialect default to one of these based on MySQL metadata? IMO, Hibernate's javadocs could stand to have a little more "doc" action. Maybe I'm just not looking in the right place for the answer to this question.

Posted in Java at Oct 19 2005, 08:53:16 AM MDT 5 Comments

What's the best way to integrate Ajax into a Java webapp?

I received an e-mail over the weekend asking how to integrating Ajax into into the various web frameworks covered in my Java Web Framework Comparison Whitepaper. Below is my reply:

The best thing that I've seen is to use DWR, Prototype and Scriptaculous.
These will work with all web frameworks, and if you're using Spring on the backend -
DWR makes it easy to expose your beans as JavaScript objects.

Also, there's a number of tag library solutions that greatly simplify things:

  http://javawebparts.sf.net
  http://ajaxanywhere.sf.net
  http://ajaxtags.sf.net

I haven't used the first one, but I have used AjaxAnywhere and saw a demo of
AjaxTags from its developers.  They both look like they could be very useful.

For those of you using Ajax in your Java webapps - what's your advice? Do you use these same libraries or other ones?

This post was partially motivated by my desire to reiterate things that are so obvious. ;-)

Posted in Java at Oct 17 2005, 10:50:00 AM MDT 12 Comments

Roller gets some respect

From A Baggins Under the Hill (nice looking theme BTW):

There's a surprising (or perhaps not so surprising) number of PHP programs, intricate ones at that, that have developers who didn't bother to abstract away the database layer, and wrote DB-vendor-dependent queries. That's a pretty horrible thing to do, since it ties you quite firmly down to one DB (in many cases MySQL). The SQL code is often very tightly integrate with the display code; it's bad enough in the business layer, but the view layer as well? Good gods.
...
Roller, on the other hand, uses things like Hibernate to abstract away queries from the underlying DB implementations, and Velocity to separate out the display logic from the business logic. And blogging software does have business logic, or a model; blog entries and categories and tags and authentication and the manipulation thereof are not simple. As a result, I see features being added to Roller that I'm surprised to see happening so quickly.

As far as solving the issue with Tomcat 5.5, that's just a matter of updating your $CATALINA_HOME/conf/Catalina/localhost/roller.xml file. Here's what I use for Roller on PostgreSQL:

<Context path="/roller" docBase="roller" debug="99" reloadable="false"
    antiJARLocking="true" antiResourceLocking="false">

    <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
          driverName="org.postgresql.Driver"
       connectionURL="jdbc:postgresql://localhost/roller"
      connectionName="postgres" connectionPassword="postgres"
           userTable="rolleruser" userNameCol="username" userCredCol="passphrase"
       userRoleTable="userrole" roleNameCol="rolename" />

    <Resource name="jdbc/rollerdb" auth="Container" type="javax.sql.DataSource"
              maxActive="20" maxIdle="10" maxWait="100"
              driverClassName="org.postgresql.Driver"
              username="postgres" password="postgres"
              url="jdbc:postgresql://localhost/roller"/>

    <Resource name="mail/Session" auth="Container" type="javax.mail.Session"
              mail.smtp.host="localhost" />
</Context>

Posted in Roller at Oct 16 2005, 01:03:54 PM MDT Add a Comment

The Bus Project Begins

About 2 months ago, I sat down and started calling local body shops to see about starting my "Daddy's Bus" project. I called about 5 of them, left messages, and waited. A week later no one had returned my call. Then I got a call from Mike Lopez of Twins Auto Body and Paint. He told me to bring my bus in and he'd take a look at it. I drove to his shop in North Denver the next day.

The first 1/2 hour with Mike was somewhat mesmerizing - we talked about the bus, how I got it, what I wanted to do, etc. The whole time, he was running his hands all over it - almost caressing it in a sense. Mike and I had a great conversation and it ended with him saying it was in great shape and he'd love to work on it. I asked him how much - and he gave me a quote of $4800 - $5500. I thought this was just for the body work, and it sounded pretty reasonable. He then proceeded to tell me that this was for the whole ball of wax: body work and paint. I was expecting to spend 5K on body, 5K on paint, and 5 on interior, so this was music to my ears.

At this point, I got bold. "How much for show quality?", I asked. 8-9K was his answer. I was very excited at this point because he was telling me the prices I wanted to hear. The major difference b/w "show quality" and "regular" is that they do everything for show quality - including smoothing/painting the interior and bottom of the rig. Mike had me sold at this point, but I still didn't trust that he might be the guy to help me restore the bus. At that point, he invited me into his shop, where my gaze fell upon a plethora of beautiful VWs: a Carman Gia, 3 Bugs and an old Bus (same year as mine) with a truck bed. All were in various stages of restoration, but it was obvious that Mike knew what he was doing. We discussed getting my bus ready, and our conversation ended with me saying I'd call him when I had it stripped and ready for sandblasting.

It's been hard finding time and motivation to start working on the bus - but I managed to do it today. I started by ripping out the interior, and managed to get most of it done. I still need to drop the engine and remove all the windows - but I think I can do both of those in a couple of days. With any luck, I'll have the bus in Mike's shop by December. Estimated time to complete body work and paint: 6 months to a year. Once he's done with the body work and paint, I expect it'll take me another year to finish the interior, mechanical and electrical. With any luck, I'll have a brand new '66 bus before the New Bus is available.

Here's a bunch of before and after pictures from what I did today.

Before



After Interior Removal

Posted in The Bus at Oct 15 2005, 06:34:28 PM MDT 5 Comments

Family Picture at Disney

It's been a while since I posted a family picture - here's one from last week at Disney.

Mickey

Posted in General at Oct 15 2005, 06:05:32 PM MDT 2 Comments

Integrating Axis into AppFuse

Via Technorati, I found Integrate Axis and Appfuse Part1. Good stuff - I'm looking forward to Part 2.

Posted in Java at Oct 15 2005, 02:28:46 PM MDT 2 Comments

Maven 2's Transitive Dependencies

I spent a few hours this week integrating Maven 2's Ant tasks into Equinox. Here's a things I discovered in the process.

  • The JAR you need to include to use the Maven Tasks is quite large, weighing in at a hefty 833K. Regardless, it's easier to include a ~1MB JAR in CVS than it is 10MB of JARs. Equinox (w/o the extras directory) weighs in at 10.2MB before, 1.3MB after.
  • The transitive dependencies feature needs to be cleaned up a fair bit. There are a *lot* of unnecessary dependencies downloaded for many libraries. For example, Hibernate downloads a bunch of JBoss JARs and the Display Tag downloads all the various web framework JARs. I found myself excluding almost as many dependencies as I added.
  • Using in-line dependencies (where you specify each one in your build.xml) is cleaner and requires less XML (b/c of attributes vs. elements). I went this route at first and it worked well, but to allow greater flexibility (for those who might want to use Maven 2), I ended up creating a pom.xml. 48 lines in build.xml turned into 195 lines in pom.xml.
  • The Maven Developer team provides fantastic support - both on the mailing list and IRC. Thanks Brett!
  • Maven 2.0 RC was released today.
  • I need to figure out a way to "install" the persistence/web framework options in Equinox. The easiest way from a maintenance perspective is to parse pom.xml to add new dependencies. Entity includes might make the project more extensible though - and easier to upgrade.
  • Once you have pom.xml in place, it's pretty easy to make the build/test/package process M2 friendly.
  • Maven 2 is faster than Ant.

Overall, it was a pretty frustrating experience, with lots of trail-and-error. In the end, I got it all figured out and the only "hack" I had to do was delete servlet-api-2.4.jar after copying dependencies into my WAR. This is b/c Ant is not smart enough to know that dependencies with a "provided" scope shouldn't be copied. I could probably have a 4th dependencies path to solve this, but deleting sounded easier at the time.

I'm not going to check anything in yet b/c I still have to modify all the installers to specify their dependencies. The main advantage I can see in using a download-dependencies feature is easier upgrading of dependencies. It'll also make a lot more sense in AppFuse b/c certain parts of project (i.e. appfuse-dao.jar) can be published as re-usable modules.

In the meantime, if you'd like to try out Equinox with this feature (works with both Maven 2 or Ant), you can integrate it into a CVS version with the following steps:

That's it! I'm sure some things can be improved - please let me know if you find any issues.

Posted in Java at Oct 15 2005, 12:57:39 PM MDT 7 Comments

Starting from scratch on OS X and Windows

Last night I began my quest to get rid of "OS Rot" on both my PowerBook and my Windows box. I bought new hard drives for both, so I wouldn't have to worry about losing any data. For the Mac, I bought a Lacie d2 (250GB) and for Windows, I bought an internal Maxtor 120GB. Thanks to everyone who suggested the Lacie.

To start, I cloned my PowerBook's drive to the Lacie drive using the free version of SuperDuper. It took about two hours and worked flawlessly. I then proceeded to format the PowerBook drive and install OS X. For the most part, I just copied a bunch of files back into place. I've been trying to restore my settings by copying individual folders from ~/Library to the fresh install - but it's not working so well. I'm thinking of just restoring my whole home directory (cruft in ~/Library and all).

The Windows install wasn't nearly as easy. Rather than backing up to an empty drive, I just installed the new disk as the primary and old one as a slave. I tried installing Windows on the new one twice (once w/ the slave installed, once w/o). After installing, when I boot up, it just sits there will a dark grey screen. So I gave up and put my old hard drive in as the primary. I think the disk might be bad. Regardless, I'm going to try again tonight. This time I'm going to use a ghosting/cloning program to backup to the new hard drive - and essentially go through the same steps I did on the Mac. I'll probably use Norton Ghost or PartitionMagic - but I'm open to other suggestions.

Posted in Mac OS X at Oct 13 2005, 09:01:57 AM MDT 8 Comments