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.

XDoclet for Hibernate

A nice community-enhancing developer (I don't know who) has posted an XDoclet for Hibernate tutorial on Hibernate's Wiki. Good stuff. Since the XDoclet doco is kinda cryptic, it'd be awesome if someone did this for Struts. Maybe in my spare time. Oh wait, I have none of that - at least not this week.

I think XDoclet and Hibernate work well together when creating a database schema from scratch. However, I've found that Hibernate's Reverse Engineering Tool works much better for me. It generates the .java and .hbm.xml files for me and I'm done. Hook up a DAO and a DAOTest and I'm done! I might look at Middlegen's recently added Hibernate support in my next class-generation cycle. To my knowledge, it creates an XDoclet-enabled .java file that can then generate the .hbm.xml. However, I'm using a lot of composite-id stuff and XDoclet doesn't seem to support that. From the above XDoclet for Hibernate article:

Note that XDoclet will not be able to support the new composite features.

Posted in Java at Feb 13 2003, 05:22:44 AM MST 1 Comment
Comments:

Thanks for the friendly title. I wrote the article specifically because there is very little "walk-through" documentation for XDoclet, let alone specifics to Hibernate. XDoclet is 95% effort to setup, and 5% effort to use. I agree that if your tables already exists the reverse engineering tool to be quite useful. For me, however, this isn't really too useful as I tend to strongly separate my Hibernate implementations from the business objects beans. I guess out of paranoia that for some reason I find something better than Hibernate. I tie my business objects to the Hibernate clode either by interface implementation or inheritence. I also tend to duplicate my getter and setter methods by providing specific methods for Hibernate to use on the implementation. For example get/setName on the bean now has a get/setHbmName on the Hibernate implementation. Sure it's more work, but I can know hook update calls into the setName method and I have an almost transparent, persistable business object. I was thinking of writing up another tutorial based on this design idea. I would be interested in bulletproofing the idea and identifing flaws that I'm sure are there.

Posted by Martin on February 21, 2003 at 09:08 PM MST #

Post a Comment:
  • HTML Syntax: Allowed