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.

AppFuse 2.0: JDK 5, Annotations and JSP 2.0

For the most part, I haven't used JDK 5 on any of my recent projects. You can compile and run AppFuse with JDK 5, but it doesn't use any JDK 5 features. After doing a code review at Bouvet last week and seeing how much cleaner their code is with Generics, Varargs and the Enhanced for Loop, I think it's time to dig in. I don't know how soon we'll start, but I think it's time to start creating a branch for AppFuse 2.0 - which will use these features. For AppFuse 2.0, I'd like to go whole hog, bleeding-edge and use all the stuff that's out there to make developer's lives easier. This includes JSP 2.0, Annotations (especially for Hibernate and Spring, as well as Tapestry) and all the JDK 5 features that seem useful.

Since most developers won't be able to deploy on a JDK 5-compliant server for quite some time, we'll continue to maintain the 1.x branch as JDK 1.4-compliant. I expect to release AppFuse 1.8.1 later this week (with mostly bug fixes + latest releases of Hibernate/Spring) and 1.9 in the next month or so. From there, we'll likely do 1.9.x releases with bug fixes and do all the major upgrades (i.e. Tapestry 4.0.x) in the new branch. Working with new features in JDK 5 should be a lot of fun.

I'm hopeful that we can get rid of XDoclet and we may even give Maven 2 a run for its money. Last week in Norway, I found that most Java developers were using Maven on their projects and I also discovered that many of the core Maven 2 developers are getting paid to work on it full time. There were even claims that Maven 2 is going to be twice as fast as Ant - which definitely intrigues me.

Later: I just realized the hardest part of this migration is going to be replacing AppGen. It currenly uses XDoclet templates for all the class templates - and we'll need a new solution based on annotations. Oh well, it's kind of ugly anyway, but it'll likely be difficult to figure out a new solution. Hopefully we can create some sort of tool that involves easy-to-customize templates and a GUI to drive it all.

Posted in Java at May 30 2005, 12:41:52 PM MDT 27 Comments

I am using Hibernate 3.0 and annotations for one of my current projects. It rocks! It saves a lot of time, especially when you are in the phase that the data model isn't stabilized yet. IMO one of the greatest JDK 5 features is the @deprecated annotation. Not dramatic. But very usefull.

Posted by Eelco on May 30, 2005 at 02:55 PM MDT #

Errrm. Ooops. I meant the @override annotation, not @deprecated!

Posted by Eelco on May 30, 2005 at 03:01 PM MDT #

Great news, Mr. Raible! Looks like Virtuas suites you pretty well indeed. Happy for you!

Posted by Vui Lo on May 30, 2005 at 04:15 PM MDT #

This is an interesting idea. I think there would be some merit to permanently maintaining two versions actually - the bleeding edge, and the mainstream using what the average developer has available to them. As features become more mainstream they could be ported/merged into the main tree This would allow you to easily see what difference a tech. change might have on practices. I would have found this all useful when I used to do web dev :)

On Maven 2... I'm curious what you mean by giving "Maven 2 a run for its money"? :)

So you must have met Trygve :) Glad to hear you had a good time in Norway - I'd love to get there myself one day.

We haven't done a great deal of benchmarking, but some simple tests (included in SVN) do show Maven2 to be consistently faster than Ant for the same tasks. While this is true of the core, you'd be hard pressed to get 2x improvements for anything other than a compile + JAR because the execution of tests and other such things beyond Maven or Ant's control will quickly dwarf the amount of time spent on the rest.

I also wanted to congratulate you on your new venture. They seem like some good guys to work with, and a great opportunity.

Posted by Brett Porter on May 30, 2005 at 04:43 PM MDT #

> It currenly uses XDoclet templates for all the class templates - and we'll need a new solution based on annotations. APT?

Posted by on May 30, 2005 at 09:39 PM MDT #

I wonder how are you going to manage XDoclet replacement, sounds intriguing.

I love the idea of a GUI, it should be moved higher in priorities (I guess), especially that it could aid more novice developers to adopt Appfuse with its best-practice design, tools and methodologies.

One more thing, as was requested by Nathan's Comment, a category other than "quick-start-web-app-framework-directory-structure-build-file" could help explaining Appfuse to managers :-)

Keep up the good work and thanks Matt.

Posted by Tamer Salama on May 30, 2005 at 09:55 PM MDT #

With a little effort I was able to port an appfuse based webapp to Annotations the other week (I don't use appgen). The results were very satisfactory once I'd found the JDK5 version of XJavaDoc. I love the type checking in Eclipse 3.1.

Posted by Caoilte O'Connor on May 31, 2005 at 12:19 AM MDT #

What are the main new features of JSP 2.0 and what is the main benefit above Struts or any other web framework?

Posted by -FoX- on May 31, 2005 at 03:48 AM MDT #

Matt, You're going to have a lot of fun with annotations when you start using them. Apt is a bit of a PITA, very awkward API to use, but it's worth it to get to use annotations. I built a little apt factory doodad to build my hibernate.cfg.xml since Spring can't autofind things since I switched to annotations. The Hibernate3 annotations rock, one of the coolest things there is the new domain validation stuff. I integrated it into Trails over the weekend and am very happy with the way it's turning out. As far as AppGen, any chance you would be interested in replacing it with something more dynamic (*cough* Trails *cough*)? ;)

Posted by Chris Nelson on May 31, 2005 at 06:59 AM MDT #

FoX - you can read about the main features of JSP 2.0 in this article. To me, the main things are: the ability to use ${...} w/o wrapping it with <c:out value="${...}"/>, having EL available for all JSP tag attributes, and the ability to use JSP Tag Files. Tag files would be primarily useful with Spring MVC to reduce the amount of code you need to write for a form fields.

Chris - we'll definitely look at (and hopefully use) Trails for the Tapestry version, but it won't help us with the Struts, Spring, WebWork or JSF versions. Hopefully we can come up with a similar meta-driven solution like Trails for the other frameworks.

Posted by Matt Raible on May 31, 2005 at 07:13 AM MDT #

Matt, Who needs frameworks other than Tapestry? ;) But seriously, I'd love to see Trails get ported to other frameworks, just hard to get time to do it. The metadata portion of Trails ought to be reusable, and I'd be happy to do anything I can to facilitate you reusing whatever from Trails make sense. To tell the truth if you were able to reuse Trails metadata services and then developed components in the other frameworks to consume it, you in effect would be most of the way towards a "port" of Trails.

Posted by Chris Nelson on May 31, 2005 at 01:14 PM MDT #

I would be interested in looking at how Trails & Wicket could work together. If you're interested, we could work together on that. I allready have some panels for generic JavaBean editing available, so my guess is that it wouldn't be too difficult to accomplish.

Posted by Eelco on May 31, 2005 at 01:31 PM MDT #

Hey Matt, Java 1.5 stuff is great - good timing I spent all day yesterday reading O'Reilly's "Java 1.5 Tiger: A Developer's Notebook" generics and the for loop rock, also enums, etc etc. makes code way cleaner and safer. Looks like you'll be giving a talk at the O'Reilly Open Source Convention in Portland in August. Great stuff! Regards, Phil

Posted by Phillip Hershkowitz on June 01, 2005 at 10:09 AM MDT #

Hi Matt, I am curious what books do you read about Java 1.5 Tiger. changing subjets, just as a thought maybe you could add as part of AppFuse 1.8.xx, code to start Portals using Appfuse + Liferay (professional ) using Spring framework. It would be great for a newbie portal developer to have an AppFuse portal version (like me :)) BTW: Felicidades for your new Job with Virtuas, the Open source training will be using your book right? is there going to be a virtual classroom in the future for developers who are not in the states? so everyone can enjoy learning from your classes? Thanks Matt for all the work you do.

Posted by Emm lopez on June 01, 2005 at 02:08 PM MDT #

Matt, I remember in post a while back that you mentioned at some point you would like to move appfuse to built around something like MyEclipse. I vaguely remember this. Maybe now would be a good opportunity to looking into something like MyEclipse or even the Eclipse Web Tools Project. Just a thought. Dan

Posted by Daniel Frey on June 02, 2005 at 05:01 AM MDT #

Emm, I haven't read any books about JDK 5, but I'll probably pick up one (or just use Google) when I start the migration.

As far as portals, I don't have any plans for this, but mostly because I haven't seen good (and easy to use) open-source portlet containers yet. Also, I haven't had a need for using a portlet container in any of my projects. Of course, if this changes, it's likely I'll create a portlet quickstart app.

The open source training will be using some things from Spring Live, but it'll also be going into more depth (if the client so desires). I've already created most of the course content, now I'm just refining it and getting input from other Virtuas Practice Leaders. As far as a virtual classroom - I believe we're planning on offering that, but probably not until 2006.

Posted by Matt Raible on June 02, 2005 at 08:04 AM MDT #

Daniel - doing a MyEclipse Tutorial is definitely in my future plans. I don't plan on re-inventing the wheel when developing a GUI to simplify AppFuse development, so I plan on leveraging existing open-source tools.

Posted by Matt Raible on June 02, 2005 at 08:08 AM MDT #

Matt, Thanks for answering my questions. I'm glad that I'm not the only one who haven't find an easy to use OS portlet container. Do you think portals dev will be use often. Technologies that I don't hear much from Java developers much are ; JDO, JavaHelp,Portals,J2ME,Lazlo. have you use them in one of your projects (except portals). I think you mention something related to Lazlo in your Theserverside video. (by the way cool video) in regards to the open source training,I will look forward for the virtual classroom.

Posted by Emmanuel Lopez on June 02, 2005 at 09:19 AM MDT #

Hi Matt, "Since most developers won't be able to deploy on a JDK 5-compliant server for quite some time" -- we have gone into production with a 300K line java 5 app on linux using sun's JDK. it works just fine. JAVA 5 is stable and performing just fine -- what makes you think that developers won't be able to deploy on JDK 5 compliant server ? Otherwise, there are 3 books that I would use for reference with java 5. a) Java in a Nutshell b) Tiger --- a deverloper's notebook c) beginning java 2 JDK 5 (a) has been out for a while now. b) came out recently and c) came out in Jan. BR, ~A

Posted by anjan bacchu on June 02, 2005 at 11:04 PM MDT #

Please don't require Maven for AppFuse. Lost of people really dislike Maven, and it is very intrusive. If you wire it into AppFuse, then it might be hard to take out. Like a spine transplant - sure, everyone can try, but the patient isn't likely to survive.

Posted by Mats Henricson on June 06, 2005 at 10:01 AM MDT #

I've been working on an AppGen-inspired tool for JDK 1.5 annotations, and glad to hear AppGen is moving in the same direction. JDK 1.5 annotations would give you a lot of value, because once you have the annotation metadata available at runtime for introspection, you don't need code generation anymore and the whole process becomes a lot simpler and easier to grok. Ideally you can have a single EditPojoAction, and have the same attribute affect column size in the DB and Struts validation from one place.

Annotations are a big win just with Hibernate3 alone, because Hibernate can leverage the one standard way to say "this is a Set of <Foo>."

Posted by Bill Schneider on August 03, 2005 at 08:52 PM MDT #

Have you considered or to generate JDK 1.4 compatible code?

Posted by on January 12, 2006 at 03:05 AM MST #

plz use annotation

Posted by jips on April 06, 2006 at 02:35 AM MDT #

When does appfuse2.0 released? i look forward for hereagerly!

Posted by George on August 15, 2006 at 12:32 AM MDT #

George - I can't promise anything because of developer's schedules and current commitments. My hope is we can have it done by the end of 2006.

Posted by Matt Raible on August 15, 2006 at 07:00 AM MDT #

what is the full complete code to create viryual classroom using JSP

Posted by sai on March 03, 2008 at 03:56 AM MST #

And while you're at it, please give me the source code of a planning tool. By next week is fine. ;-)

Posted by Eelco on March 03, 2008 at 05:05 AM MST #

Post a Comment:
  • HTML Syntax: Allowed