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.

Sending POJOs to the UI instead of ActionForms

I'm starting to think that my Struts-based apps could be simplified if I didn't convert POJOs to Action Forms when retrieving them from the database. By this, I mean to say that I'd like to retrieve and display POJOs on the UI, and then capture their information (as Action Forms) when saving the form. The reason I want to do this is because of Hibernate's Lazy Loading feature and formatting Dates. Basically, Hibernate allows you to load children of an object lazily (i.e. resumes of a User), when the getResumes() method is called. I've created [a page|POJOsToForms] on my wiki to explain further and continue this discussion. Of course, you can always leave comments here if you'd rather - they cross-reference each other. The [RollingWiki|http://www.rollerweblogger.org/wiki/Wiki.jsp?page=RollerWikiPlugin] rocks!

Posted in Java at Jun 19 2003, 01:52:23 PM MDT 3 Comments
Comments:

Matt, when are you finally going to leave Struts and switch to OpenSymphony Webwork (version 2)? Using a model driven actions, you do not need any 'ActionForms' (or whatever containers), you just get and set directly on your action class, which contains an empty model (Hibernate POJO managed by a persistence manager). Sooooo much easier and cleaner. Plus you can write very nice unit tests for your actions. If you want, I can send you some IRL code.

Posted by Mathias Bogaert on June 19, 2003 at 09:18 PM MDT #

I've been a Struts fan and developer for so long - I feel that if I switch to WebWork, I'll end up taking half the camp with me. If Raible switched, why don't we? ;-) I'd love to see code, as code samples are always neat to look at. I unit test my Struts Actions though - so I don't see how WW offers <em>that much</em> of an advantage in this area. I'm sure someday there will be a WW version of AppFuse, I just don't have the motivation, or the need right now. If I were asked to write a book or an application using WW, the need would quickly arise. :D

Posted by Matt Raible on June 19, 2003 at 09:26 PM MDT #

Or... start nesting and get all this type of fun for free! You won't have to leave Struts, have all the object reuse you want. For quick apps I throw DAO objects an all sorts of things into my form, and it all happens by magic when you get back to the Action, as you simply tell the persistence mechanism to go play, and it does. Sweet, sweet, RAD. And one thing that makes nesting a breeze is the nested tags. funny that. IMHO, nesting rocks. :P

Posted by Arron Bates on June 21, 2003 at 11:29 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed