Matt RaibleMatt Raible is a Java Champion and Developer Advocate at Okta.

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.


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.

Short and sweet contracts

This has been a good month for Raible Designs. Not only did I manage to land a new gig, but I've also had a couple of 1-day contracts. The first one was an architectural review (at the beginning of the month), and yesterday I delivered a presentation on TDD and Spring for a client. These short-n-sweet gigs are a lot of fun. It's a good way to get out and meet members of the Java Community and see what tools they're developing with. The first client is using Struts, Spring and Hibernate. The second client wanted to use Struts, but after my talk, they're thinking about Spring MVC. They plan on using Spring to make EJBs easier, and they're using TopLink on the backend.

The only bad part about yesterday's experience is I developed a full-body ache as soon as I left the client's site. I managed to catch a cold from Abbie this weekend, and that turned into a cold+fever last night. I've had the fever ever since and didn't go into work today. It's really shitty timing for getting sick - we have a deadline on Thursday and we're heading to Oregon to see my parents this weekend. Last I checked, my fever was at 102°F. Hopefully, I'll wake up tomorrow and it'll be gone.

Posted in Java at Jan 25 2005, 08:38:50 PM MST 6 Comments

As you mentioned based on your talk the client decided to go with Spring and diteched Struts. When you feel better could you please care to elaborate the pros and cons of using struts/spring when EJB is involved. I don't have any hands-on experience on spring but based on readings I feel that spring has a lot more hooks to use EJB. Could you please care to elaborate what are those *hooks* and from architectural and desing point of view what are the benefits of using Spring vs Struts in conjunction with EJB. I'm mainly interested in finding what was the tipping point for the client to decide in favor of Spring. Thanks. - Neeraj

Posted by Neeraj Kumar on January 26, 2005 at 09:24 AM MST #

What I find interesting is the decision to use Toplink coupled w/ Spring considering the existing (and very robust) hooks that Spring has into Hibernate. Granted Toplink is a more mature product and I can't speak to how good it is as an O/R tool, but I've been a part of several very successful Spring/Hibernate implementations now and can't imagine not choosing Hibernate as your O/R layer.

In terms of struts mvc vs. spring mvc, Spring can obviously do the session/entity bean lookup, populate a DAO automatically, and just return you an interface to the EJB. Within Struts, you're still responsible for getting the jndi context, doing the create, etc. Spring is *much* cleaner IMHO.

Posted by Michael Zucker on January 26, 2005 at 10:29 AM MST #

Neeraj - The main reason they're switching to Spring MVC instead of Struts was because they could re-use their domain objects in their view w/o creating ActionForms for everything. If you're using Spring for the middle-tier, you can easily expose your EJBs as Spring beans and you don't have to mess with the JNDI lookup. This simplifies accessing EJBs no matter what web framework you're using.

Michael - the main reason they're using TopLink is because they've been using it for a couple years with success and have no desire to change. They didn't sound interested in the TopLink+Spring integration because their existing code works for them.

FWIW, they're migrating off of WebLogic's Portal and PageFlows because PageFlows are too hard to test.

Posted by Matt Raible on January 27, 2005 at 05:08 PM MST #

Just a short question form a non native english speaker: what means 'gig' ?

Posted by thogau on January 29, 2005 at 02:23 AM MST #

From - "gig" is defined as "a job usually for a specified time; especially : an entertainer's engagement"

Posted by David Carter on January 29, 2005 at 01:33 PM MST #

There are dozens of other reasons why Spring MVC is a better choice thatn Struts, but Matt's comment about being able to reuse your domain objects where Struts forces you to create ActionForms for everything doesn't really do this part of the equation justice. Spring can bind complex, rich, nested form properties including data types other than strings (including standard collecton types and other arbitrary types using PropertyEditors), in the form xxxx.yyyy.zzz.whatever, giving you a nice descriptive error object back which is easy to use in the output view as to what fields are missing or invalid. In practice handling form binding concerns in Struts is hell compared to doing it in Spring, and doubly so once you know other frameworks (Spring, WebWork, Tapestry) can do it so much more easily...

Posted by Colin Sampaleanu on January 30, 2005 at 09:21 PM MST #

Post a Comment:
  • HTML Syntax: Allowed