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.

What happened to Middlegen?

In AppGen (AppFuse's code generator), I recently integrated support for generating CRUD code (and tests!) from database tables thanks to APF-95 from Bobby Diaz. Previously, it was only possible to generate code from POJOs, but now both are supported. The "mapping files from tables" is done using Middlegen.

Unfortunately, Middlegen seems to be a dead project, especially since its main web site is missing (fixed!). I'd love to use another project that generates XDoclet tags in hbm.xml files, but I don't believe there is one. AFAIK, the Hibernate Tools project does not support XDoclet with its tools. Anyone know where the Middlegen documentation is located? All the documentation used to be on their site.

The good news is the solution I have works, and it works well. However, I definitely look forward to re-writing AppGen. XDoclet as a templating language sucks, and reading XDoclet tags to determine how to generate the UI seems pretty hackish. Hopefully we can use APT and FreeMarker (or Velocity) to process annotations and spit out code in a future release.

Update: The Middlegen website was lost, due some heavy server upgrades. The problem has been fixed and it's back up and running. Now I don't feel so bad about using Middlegen since the project appears to be alive and well. ;-)

Posted in Java at Apr 06 2006, 05:19:15 PM MDT 13 Comments
Comments:

Matt I have the version middlegen-2.1.zip in my mq, it is about 7.5 mb. Does it serve to you?

Posted by Gilberto on April 07, 2006 at 01:02 AM MDT #

Thanks for the offer Gilberto. I think I have everything I need in AppFuse. It's just wierd that the main website for this project is gone.

Posted by Matt Raible on April 07, 2006 at 01:25 AM MDT #

Xdoclet is a good idea,but I don't like the template. I am working on such a project myself these days , I use an ant task to read metadat info from db,generate a schema xml like torque generator does,and then another task read the xml as a modified XmlEasyBean,then generate the files I need with velocity. So, maybe I can give some help.

Posted by Kerry Wang on April 07, 2006 at 04:38 AM MDT #

The Middlegen website was lost, due some heavy server upgrades. Hopefully a new website will be back in a few days. Files and cvs is available on sourceforge: http://sourceforge.net/projects/middlegen/

Posted by Eivind Waaler on April 07, 2006 at 01:03 PM MDT #

The Middlegen site should be up now.. http://boss.bekk.no/boss/middlegen/

Posted by Eivind Waaler on April 07, 2006 at 03:54 PM MDT #

Excellent - good to see the site is back up. Thanks Eivind!

Posted by Matt Raible on April 07, 2006 at 05:21 PM MDT #

Matt, the other thing about XDoclet is that it seems to be on the way out, at least the old version 1 stuff, as I've noticed that the mail list is taperring off to almost nothing these days. Still, it is well used within Eclipse and the Web Tools Project, but I'm wondering if the whole code generation stuff needs to move to something different these days now that we have annotations in 1.5 and all. Just a thought.

Posted by Bruce Scharlau on April 07, 2006 at 06:41 PM MDT #

Bruce - I completely agree that there has to be a better solution. Hopefully we'll find one that works well with annotations.

Posted by Matt Raible on April 07, 2006 at 06:48 PM MDT #

Bruce/Matt - Maybe you guys missed the move to codehaus? xdoclet2 community seems to be alive - http://xdoclet.codehaus.org

Posted by Nils Döhring on April 18, 2006 at 03:41 PM MDT #

I have been trying to use the middlegen with appgen for the latest appfuse.When I run the middlegen.all I get prompted for a table, but no matter what I put in it always says 'The database doesn't have any table named ...... Please make sure the table exists. Also not that some databases are case sensitive.' The url and login information is correct. Appfuse itself used the same settings to correctly create the tables etc. I am using the SQLSERVER database as per the notes on the Appfuse wiki. Any idea what is going on? I tried 'SA', local user and even prefixed the table name. No luck. Troy

Posted by middlegen appgen trouble on May 21, 2006 at 09:56 PM MDT #

I don't know what the problem could be - maybe something with SQL Server. You might try asking this question on the AppFuse mailing list ([email protected]).

Posted by Matt Raible on May 21, 2006 at 10:09 PM MDT #

Please I need help installing Middlegen. I downloaded it four times already. First two it was corrupted, so I chose a different mirror from sourceforge and it was ok, but when I tried to run the jar file it said to be unable to load de main-class attribute from the manifest file. Then I modified the manifest and the error changed to not being able to find the main class in the package. Can someone help? tell where to download Middlegen other than Sourceforge, or give me a working manifest file, or tell what would be the correct entry point of the jar. I believe it to be Middlegen.class, but I'm not sure. Thanks

Posted by Miguelangel on April 22, 2007 at 04:13 AM MDT #

You might try using the Middlegen JARs from AppFuse 1.9.x.

Posted by Matt Raible on May 24, 2007 at 11:18 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed