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.

Help me help you (market your web framework)

Rather than trolling through google searches, mailing list archives and Amazon book searches, I'd like to try something new. For those projects represented in my Comparing Java Web Frameworks talks (MyFaces, Spring MVC, Stripes, Struts 2, Tapestry and Wicket), would you be interested in helping me gather statistics? I think by allowing projects to gather their own statistics, we'll get a more accurate number of their statistics. Here's the questions I need you to answer:

  1. How many tools (i.e. IDE plugins) are available for your web framework?
  2. How many jobs are available for your framework on Dice.com? What about Indeed.com?
  3. How many messages where posted to your user mailing list (or forum) in March 2007?
  4. How many books are available for your framework?

Of course, if you don't have time, I'll be more than happy to gather these statistics myself. However, those that do answer might get some extra marketing love during my talk. Answering in a comment or sending me an e-mail are the best ways to provide your findings. Thanks!

Update: Alastair asks for further clarification. Here goes:

> If you have lots of IDE tooling available, it probably means the configuration for the framework is overly complex and unmanageable without tooling.

While this may be true, if your framework is hot or uber productive, people want tools. Especially new developers. Remember there's a plethora of new Java developers every year and a lot of them prefer tool-based solutions. Good or bad, IDEs are nice and people like to use them. I've had many clients dismiss frameworks simply because no tools were available.

> The framework with the largest number of jobs available is probably Struts 1. Enough said.

Yes, you're definitely right. However, Struts 1 is not in this comparison - I dropped it because I don't want to recommend it to anyone.

> People only post to user lists when they are stuck. If the framework is hard to use, there will be lots of e-mails. If it has a steep learning curve, and/or the documentation is poor, this will be particularly so. On the other hand, an active list might point to a large active user base. Who knows which is which from a raw figure?

What about community? Mailing lists and their activity is a sign of an active community. Even though SiteMesh is a mature and good solution, its community sucks. There's little support, no new features, no bug fixes. An open source project w/o a community is tough for a company to adopt. Also, the best communities do a lot more than answer questions on mailing lists. They develop their applications, get advice, offer advice and sometimes even hang out. The Struts list used to have threads 30-50 messages long about development philosophies. When you joined the mailing list, you felt like you were a part of something, not just a user of a product.

> If your framework is fairly stable, and someone has written a fabulous tome on it that is universally acknowledged as "the bible", few people would bother writing another book for it.

I don't agree - this just means there's no market for other books because not that many people are using it. Look at Grails, Groovy, GWT and Rails - there's been quite a few books on each and no slowdown in sight. Then again, there weren't many Ant books and that was/is hugely popular. I'm willing to change this question to "How many good does your framework have?", but that's up to everyone's own interpretation. Again, lots of books means there's an active community outside the immediate mailing list - it's a sign the general "market" is interested and the framework fills a need.

Of course, I am interested in asking the questions that developers want to see answered. Do you have suggestions for replacement (or new) questions? Remember, people like hard facts, not wishy washy statements about how productive and OO your framework is. Every framework can be uber productive if you have the right developer(s) and they're genuinely interested in getting stuff done.

Posted in Java at Apr 26 2007, 01:58:30 PM MDT 15 Comments

What web framework are you using with AppFuse?

As part of my upcoming Comparing Java Web Frameworks talk, I'd like to show some statistics of web framework usage in AppFuse. Please vote for the one you're using by clicking on the link below. I'm mostly looking for current AppFuse users. By that, I mean folks that have used 1.x or 2.x on a project in the last 6 months, or plan on using it in the next month or two.

You'll need to create an account and login to vote. To do this, go to View > Account > Sign Up (after clicking on the link below).

I'll compile the results of this poll on Friday morning (April 27th), so you have until then for your vote to be counted!

On a related note, if anyone knows how to get the monthly posting statistics from Spring MVC's forums, I'd love to hear about it. My "mailing list traffic" slide has excluded them for the past couple of years because I've been unable to get a count of monthly postings.

NOTE: If you vote by adding a comment to this entry, it won't be counted.

Update: Thanks to the 64 of you that voted. Here's the results of the poll:

AppFuse Web Framework Usage

As I said last time, I find the results interesting because AppFuse lowers the barriers and reduces the learning curve for all of these frameworks.

Posted in Java at Apr 25 2007, 11:05:04 AM MDT 6 Comments

Equinox (a.k.a. AppFuse Light) 1.7.1 Released!

Equinox 1.7.1 contains a number of dependency updates, and not much else. This will be the last release with the Equinox name. This project is changing its name to AppFuse Light and will be referred to by that name going forward. The project will be moving its source code to http://appfuse-light.dev.java.net. The equinox.dev.java.net project will remain because Cool URIs don't change. In addition to the name change, I'd like to try to merge the AppFuse and Equinox user communities. Since the technologies are so similar, and AppFuse 2.x will use some of Equinox's Ant scripts, it makes sense to bring these projects closer together.

In AppFuse Light 1.8, I plan on adding support for Stripes and Wicket as well as integrating the CSS Framework (like AppFuse uses).

50 possible combinations are available for download:

  • Web Frameworks: JSF (MyFaces), Spring MVC (with Ajax, Acegi Security, JSP, FreeMarker or Velocity), Struts 1.x, Struts 2.x, Tapestry, WebWork
  • Persistence Frameworks: Hibernate, iBATIS, JDO (JPOX), OJB, Spring JDBC

All of the frameworks used in Equinox, as well as most of its build/test system is explained in Spring Live. Going forward, documentation will be put on the AppFuse site.

A summary of the changes in this release are below:

  • Removed custom JavaScript and CSS for MyFaces Tomahawk's
  • Dependent packages upgraded:
    • Ajax4JSF 1.0.6
    • Cargo 0.9
    • Commons Collections 3.2
    • Commons DBCP 1.2.2
    • Commons Lang 2.3
    • Commons Validator 1.3.1
    • DWR 2.0 RC2
    • FreeMarker 2.3.9
    • JPOX 1.1.7
    • JUnit 3.8.2
    • Hibernate 3.2.1
    • iBATIS 2.3.0
    • MyFaces and Tomahawk 1.1.5
    • Spring 2.0.4
    • Spring Modules Validation 0.8
    • Struts 2.0.6
    • Tapestry 4.1.1
    • Velocity 1.5
    • Velocity Tools 1.3
    • WebWork 2.2.5

For more information about installing the various options, see the README.txt file. Live demos (thanks to Contegix!) are available at:

If you have any questions, please read the comments from the 1.7 release or ask them on the AppFuse mailing list.

Posted in Java at Apr 21 2007, 05:27:33 PM MDT 2 Comments

Spring Web Flow and JSF

Keith Donald has a nice and long writeup on Spring Web Flow 1.0.3's stellar support for JSF:

One important area where our integration is growing is with the Java Server Faces (JSF) community. Beginning with Spring Web Flow 1.0.3, our JSF integration is on-par with what the Spring community expects, and delivers what JSF developers in the trenches need most. This blog will illustrate the integration enhancements to show you the difference Spring Web Flow is making for JSF developers.

One of the most interesting parts of the post is a few paragraphs down:

Basically, Web Flow solves every problem this pour soul experienced with JSF's basic navigation capabilities. As one of our leading users noted, Web Flow can be used as a complete replacement for JSF's default "forward-centric" navigation model.

It's also interesting to note that ideas from SWF could be incorporated into JSF 2.0:

I'd also like to take this opportunity to encourage those already using Spring Web Flow in a JSF environment to speak out about your experience?send me an email, leave a comment here, write an article on JSF central, tell leaders in the JSF community about your experience. Your real world experience can help influence the direction of the JSF 2.0 specification in a time where the specification lead has asked for community feedback. Interface21 has been extended an invitation from Ed Burns, the JSF specification lead, to be a part of the JSF 2.0 expert group, which is a recognition of Web Flow's contribution as an innovative JSF extension. We have accepted that invitation and are excited about helping channel whats proven to work in the area of navigation and state management on a general basis back into JSF 2.0, while continuing to chart new territory and remaining usable in any environment.

Are you using SWF with JSF? If so, have your experiences been good or bad? I'm sure Keith would love to hear about them either way.

I think it's interesting to note that both Interface21 and JBoss are doing a lot to build solutions to JSF's problems. Is there money to be made from supporting JSF? In reality, you have to like what both companies are doing: they're building solutions to overcome the shortcomings of JSF and they're contributing those solutions back to the community for free. Even cooler is the fact that both companies are trying to get their solutions into the next version of JSF. This benefits everyone as far as I'm concerned.

What about those of you using Spring Web Flow with Spring MVC or Struts? How is it working for you?

I recently integrated Spring Web Flow into my current project using the Spring Webflow Plugin. In the past, I've used SWF with Spring MVC and JSF, so the Struts 2 Plugin seemed a bit odd. I guess I'll know more once I start using it more.

This brings up a good question - do you think it's better to create a page flow (i.e. a shopping cart) without Spring Web Flow first, and then refactor? Or do you think it's easier to use SWF from the beginning? My gut feeling is to start w/o it because you may not need it. Then if you do need it, you'll understand the problems it solves. What are your thoughts?

Posted in Java at Apr 21 2007, 10:22:32 AM MDT 8 Comments

Comparing Java Web Frameworks: Proposed Outline

I'm just now starting to create my Comparing Java Web Frameworks presentation for ApacheCon Europe. According to Dave, I'm way late on submitting my presentation. However, I haven't received any late notifications from ApacheCon's organizing committee, so I don't feel too bad.

I think it's interesting how most conferences don't spend much time organizing from a speaker's perspective. The Colorado Software Summit and NFJS are two exceptions. As a speaker, you always know exactly what's going on, what the deadlines are and where you're supposed to be when. With ApacheCon, I feel like I'm in the dark on almost everything - including if I have a hotel room or not. I guess that's the difference between a volunteer organization and conferences where the organizers make money.

Luckily, I've done this presentation quite a few times in the past, so it's mostly an update rather than a rewrite. The biggest changes: dropping Struts 1 and adding Stripes and Wicket. Of course, I could keep Struts 1 since it's not much additional work, but since I only have 50 minutes for the talk (10 minutes for QA), it makes sense to drop it. And yes, I know many of you'd like to see Grails, Seam, GWT, RIFE and Click added to this presentation - but no one wants to sit through a presentation on 11 web frameworks in 45 minutes.

Here's the abstract for the session:

One of the most difficult things to do (in Java web development) today is pick which web framework to use when development an application. The Apache Software foundation hosts most of the popular Java web frameworks: Struts, MyFaces, Tapestry and Wicket. This session will compare these different web frameworks, as well as Spring MVC and Stripes. It will briefly explain how each works and the strengths and weaknesses of each. Tips, tricks and gotcha's will be plentiful. Lastly, it will provide attendees with a sample application that utilizes all 6 frameworks, so they can compare line-by-line how the frameworks are different. This sample application will include the following features: sortable/pageable list, client and server-side validation, success and error messages as well as some Ajax functionality. The frameworks will be rated on how easy they make it to implement these features.

Without further ado, here's my proposed outline:

  • Introductions (5 minutes)
  • Pros and Cons (15 minutes, ~2 minutes for each)
  • Sweetspots (10 minutes)
  • Smackdown - evaluation criteria includes (15 minutes)
    • Ajax support
    • Bookmark-ability
    • Validation (including client-side)
    • Testability (esp. out-of-container)
    • Post and redirect
    • Internationalization
    • Page decoration
    • Community and Support
    • Tools
    • Marketability of skills (can it help you get a job)
    • Job count (is there a demand for skills on Dice)
  • Conclusion (5 minutes)
  • Q and A (10 minutes)

During the Pros and Cons, I won't be showing any code like I usually do - there's just not enough time. I'm also adding in a discussion on these frameworks' sweetspots. The Pros and Cons section is largely my opinion, and I think it's important to hear the framework authors' opinions as well.

In evaluation criteria, I'm dropping List screens and Spring Integration. All these frameworks have good Spring support and most support some sort of page-able/sortable list. I can add either of those back in based on your suggestions.

Any feedback is greatly appreciated.

Posted in Java at Apr 17 2007, 09:13:22 AM MDT 8 Comments

Apache Struts 2 from Square One

Ted Husted has put together an impressive training course together for Struts 2 called Apache Struts 2 from Square One. He's released an initial version of the 127-page PDF on SourceForge.

Thanks Ted! The fact that you're contributing this hard work to the community (for free!) is amazing.

I'm teaching a 3-day training course in May that covers Spring, Hibernate, Maven 2, Ajax and AppFuse. I'm not sure if the client wants Struts 2 or Spring MVC for their web framework. If they want Struts 2, you can be sure I'll checkout Ted's course as a starting point.

Posted in Java at Mar 24 2007, 08:48:44 PM MDT Add a Comment

Zero Configuration in Struts 2

Struts 2 has a nifty zero configuration feature. However, it's only useful for registering actions, not for automatically registering results. In other words, you still have to use an @Result annotation to tell your action what page to dispatch to. To use default view names instead of requiring @Result, you can use the Codebehind Plugin. Also, did you know Struts 2 will autowire your Spring dependencies? It's pretty slick.

What does this all mean? It means you can write your Struts 2 application without writing any XML. Of course, you can still use XML to tweak behavior, but with these plugins enabled, you won't have to.

IMO, these plugins should be combined into a single zero configuration feature.

Here's how you can enable Struts 2's Zero Configuration feature in AppFuse 2.0:

  1. Add a packageNames parameter to the "struts" filter in your web.xml:
    <filter>
        <filter-name>struts</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
        <init-param>
            <param-name>actionPackages</param-name>
            <param-value>com.company.newapp.webapp.action</param-value>
        </init-param>
    </filter>
    
  2. Add the Codebehind Plugin as a dependency in your pom.xml:
    <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-codebehind-plugin</artifactId>
        <version>2.0.6</version>
    </dependency>
    
  3. Add a struts.codebehind.pathPrefix constant in struts.xml for your default pages directory:
    <constant name="struts.codebehind.pathPrefix" value="/WEB-INF/pages/"/>
    

That's it - now you can code away without configuring anything!

How does this compare to other web frameworks in AppFuse? Tapestry has a similar feature, but Spring MVC and JSF don't. Spring MVC still requires you create a bean definition for Controllers and JSF requires you write a chunk of XML for each managed bean. Of course, if you know how to do something similar with Spring MVC or JSF, please let me know.

Posted in Java at Mar 07 2007, 05:19:18 PM MST 9 Comments