Matt RaibleMatt Raible is a writer with a passion for software. 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 "java". 1,588 entries found.

You can also try this same search on Google.

Better JUnit Assertions

Joe Walnes has an interesting post on Flexible JUnit assertions with assertThat(). In this post, he shows the power of using some of jMock's features. Since jMock is included in AppFuse (sample test), using Joe's assertThat() is certainly a possibility. Let me know if adding this is something you'd like to see. The nice thing is adding it won't take any features away - it'll only add new ones.

Posted in Java at May 13 2005, 12:26:30 PM MDT 2 Comments

Spring Training in Norway

A week from today, I'm heading to Norway to do some training on Spring. It's going to be a good trip and I have my work cut out for me. I'll be talking about Spring, Hibernate, AppFuse, Acegi Security as well as Ajax and Spring Web Flow. I'll also be presenting at the two JUGs in Norway:

  • Stavanger JUG, May 25th: Test-Driven Developing with Spring and Hibernate. I also plan on talking about Spring Web Flow for a good portion of this meeting.
  • Oslo JUG, May 26th: Advanced Spring MVC, Spring Web Flow and Acegi Security.

I'll try to post outlines for my presentations in the next week or so.

Posted in Java at May 13 2005, 10:48:47 AM MDT Add a Comment

Tutorial: Date Handling with AppFuse and Struts

An AppFuse user known as "thogau" has taken the time to create a very nice looking tutorial titled Handling dates with AppFuse and Struts. Great stuff thogau!

Posted in Java at May 13 2005, 10:40:35 AM MDT Add a Comment

[Colorado Software Summit] Spring and Comparing Web Frameworks

I'm pleased to announce that I'll be speaking at the Colorado Software Summit in October. I'll be doing a presentation on Spring and one on Comparing Web Frameworks. The abstracts are on my very own speaker page. I've never been to this conference, so I'm definitely looking forward to it - especially since it's only an hour away from my house. The only downside to the conference (for speakers) is you have to deliver each presentation 3 times. Of course, this is great if you're an attendee. Now I just need to figure out a way to get SourceBeat to sponsor my condo for the week. ;-)

I originally did my Web Frameworks Comparison (PDF) last year at ApacheCon. I'm looking to revamp it this year - so please let me know if have any suggestions for improvements.

Colorado Software Summit

Posted in Java at May 08 2005, 01:12:17 PM MDT 13 Comments

[OSCON] AppFuse Tutorial and Spring MVC vs. WebWork

AppFuse Home Now that the OSCON 2005 site is up, I might as well advertise the two things I'm doing: an AppFuse Tutorial and a session titled WebWork vs. Spring MVC Smackdown with Matthew Porter. I wasn't planning on doing the AppFuse Tutorial, but I was asked to do it - so what the heck. The title has "Struts" in it, but I'm willing to do whichever one (JSF, Struts, Spring MVC, Tapestry or WebWork) the audience chooses. If we're good, maybe we'll have an Eclipse Plugin done by this conference to simplify the new project and code generation process.

OSCON 2005

Posted in Java at May 07 2005, 08:45:40 PM MDT 2 Comments

AppFuse Videos

I know I said I'd never do an AppFuse video, but after having many requests - I decided to go ahead and make a couple. The first one is a demo of creating a new project and then installing and browsing that project in your browser - to see all the out-of-the-box features.

The 2nd one basically all the stuff that's done in the tutorials - using Spring MVC for the web framework. I create a Person.java object and then use AppGen to generate all the code for it. In this one, I make a number of mistakes (but solve them all). I thought about going fully happy-path, but then decided it was important to show some gotchas that might occur.

I used the trial version of Camtasia Studio to create these videos. Thanks to Keith at KGB Internet for hosting the demo site for AppFuse. If you need Tomcat hosting, Keith offers an excellent service at a very good price.

Update: You can also download these videos for off-line use.

Update 2: I updated these videos for AppFuse 1.9.3.

Posted in Java at May 04 2005, 09:48:40 AM MDT 32 Comments

Keeping development and production databases in synch

We're getting ready to put the app I developed into production and we're facing an interesting issue. This app is designed to be a simple interface for mapping an "attribute value" from one system to another system. Currently, we do this with SQL in our dev database, and then copy these tables' data to production when we deploy.

However, with this application, we now have the ability to push out the "mapping responsibility" to our users. The problem is that if our users enter the data in production, we have to figure out a way to synch between dev and prod. We constantly need to enter our own mappings in while we're developing - so there's always going to be data entered in both dev and prod databases.

Is it possible to share the same sequence tables b/w Oracle instances and use triggers to do a second insert into dev when someone does something in prod (or vise versa)? I suppose a manual solution is possible - where we make sure and enter values into prod when we enter them into dev, but that's just ugly.

Update: TheServerSide has additional coverage of this topic.

Posted in Java at May 03 2005, 02:38:53 PM MDT 14 Comments

AppFuse Demos moved to demo.appfuse.org

I bought the appfuse.org domain name sometime last year. I haven't done anything with it for the most part and I've just pointed it to this site. It's amazing how many people actually use it - it's my 4th largest referrer! The demo site I have at Kattare (demo.raibledesigns.com) has a whole slew of demos installed on it, so I contacted Keith (at kgbinternet.com) to set me up a new domain for AppFuse-only demos. These can now be found at http://demo.appfuse.org or by clicking on of the URLs below. The site is currently running AppFuse 1.8 with JDK 5 and Tomcat 5.5.7.

The "Issues" link on this site won't work yet - I'm in the process of setting up JIRA at http://issues.appfuse.org. Hopefully we'll have it done sometime this week. Contegix has been gracious enough to offer free hosting of AppFuse's JIRA instance.

Update: AppFuse's JIRA is now up. Thanks again to Atlassian for a great product and to Contegix for hosting it. The quick installation and support from Contegix has been outstanding.

Posted in Java at May 03 2005, 09:54:30 AM MDT 10 Comments

[ANN] AppFuse 1.8 Released!

This release of AppFuse replaces Container Managed Authentication (CMA) with Acegi Security. Other major features include numerous bug fixes to AppGen and a refactoring of build.xml to use Ant 1.6 features. Eclipse and IDEA project files were also improved so you can easily run tests from within your IDE. A MyJavaPack all-in-one installer was also added so you can download everything you need for AppFuse at once. Eclipse and its plugins were not included in the initial release, but may be in a future release.

If you find any issues, let us know.

Update: You can now see Demos and Videos.

Posted in Java at Apr 29 2005, 08:51:08 AM MDT 11 Comments

Using DWR with Spring and Hibernate

For the past few weeks, I've been developing an application using Struts, Spring, Hibernate and the DWR project for my XmlHttpRequest framework. As you might remember, I used JSON-RPC for Ajax stuff on my last project. I found DWR to be much more full-featured and easier to use. This post is meant to capture some issues I encountered so others won't have to jump the hurdles that I did. For those of you that get bored quickly, here's a movie (QuickTime) of the app's Ajax features.

I've been using version 0.4 of DWR, and I haven't had a chance to try out version 0.5. When I first started using it, I ran into a ThreadDeath problem that was easily resolved by changing a log.debug message to System.out.println. I tried to reproduce this issue yesterday and couldn't, so who knows what that was all about. As far as configuring DWR in your webapp, that's pretty easy to do, and well documented. See the project's documentation or this Spring MVC HowTo.

Here are a few things I remember from my development experience.

  • The examples are great, especially how to dynamically edit a table.
  • When developing, make sure to set the "debug" init-param to "true". This allows you to go to http://location:8080/yourapp/dwr and see a screen that allows you to call methods on your exposed classes.
  • In WEB-INF/dwr.xml, you need to specify a converter for each POJO you want to expose to your UI via JavaScript. I started out by converting a whole package, but found this to be *extremely* slow (we have a package of around 50 DTOs). So I changed it to be only the DTOs I was using. This turned out to take about 30 seconds to do the conversion, and was again unacceptable. The problem turned out to be that the converter was invoking all the lazy-loaded children for each DTO. My final solution was to create a NameValue object and only convert that. Then in my Spring bean, I populate it from DAOs and DTOs. I'm using Spring's OSIVF for Hibernate to ensure that DWR doesn't invoke lazy-loading.
  • I had to override a few of DWR's JavaScript functions in util.js b/c they didn't work for me. I changed showById() and toggleDisplay() to use style.display='' instead of style.display='block' b/c this is what I've always used and block doesn't work that well. I also changed useLoadingMessage() to have a cleaner-looking load message.
  • I used the Fade Anything Technique in this project and found that IE likes to have full 6-digit hex values for colors in CSS rules. The shorter 3-digit hex values simply don't work in IE.
  • Using "test" buttons that only showed up for my username proved to be a great way to test the UI and the Ajax stuff. These buttons called a number of JavaScript functions to drive the UI and wait between invoking different functions using window.setTimeout.

All in all, using DWR was a great experience and I definitely plan to use it more in my projects. The client loves the app - especially since it's wicked fast and seems to work like a desktop app.

Posted in Java at Apr 28 2005, 02:10:26 PM MDT 31 Comments