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.

Canoo WebTest vs. Selenium

From a message I sent earlier to the AppFuse user mailing list:

After getting Dojo's DropdownDatePicker working with both Struts and Spring MVC, I've run into a snag:

You can no longer use Canoo WebTest to enter dates in a form.

It doesn't find the form element because HtmlUnit (the underlying browser implementation for Canoo) doesn't understand/render Dojo's components.

For users, workarounds include:

1. Don't write tests for entering data on forms that have required dates.
2. Don't make dates required.

Either way, it seems logical to move to Selenium for UI testing.

What do you think? Are Dojo-based components the future of Ajax support in Java web frameworks? If so, I wish Dojo allowed more "progressive enhancement" features instead of the invalid HTML feature it seems to rely on now. I'm more than willing to support Dojo if that's what AppFuse users want. However, in my experience with Struts 2's datetimepicker, it seems pretty slow. Of course, if I could render my own input element and then add a datepicker next to it, I'd be much happier. AFAICT, the Struts' datetimepicker doesn't allow you to do this, but I could be wrong.

Of course, if Dojo 0.9 lives up to the hype and is much faster - maybe I should quit caring about Hijax and just start writing those Selenium tests?

For users of those "next-gen" Java frameworks (like Seam, Grails and Wicket), what do you use for UI testing? Does Canoo WebTest work for you when you have a lot of Ajax functionality? If not, do you use Selenium or leave UI testing up to the QA folks?

Update: I ended up using jscalendar for both Spring MVC and Struts 2's datepickers. It's simply the best tool for the job. Dojo is too bloated IMO (240K for a datepicker!) for such a small feature. This allows us to worry about getting AppFuse 2.0 out the door without migrating to Selenium first. We will eventually migrate to Selenium (it's a better tool for the job IMO), but probably not until 2.1. The only question is what's the best way to distribute Selenium tests?

Posted in Java at May 31 2007, 12:25:03 AM MDT 19 Comments

Live Coding for 4 Days Straight

Last week I had an interesting 4-day consulting gig for a client in Boulder. I was supposed to fly out to Connecticut to deliver a training course, but it got rescheduled due to the 45-day Vendor Approval Process I need to go through. The client in Boulder wanted me to come out and do an architectural assessment and provide recommendations. Topics they were interested in: web tier (specifically Spring MVC), Security, Ajax integration, build process, web services and localization. I've done this kind of before with Virtuas, but this time was different. With Virtuas, I'd do 5-days worth of presentations on just about anything the customer wanted. For example, checkout this agenda for a client in NY last year.

With the company in Boulder, I delivered zero presentations. Instead, everything we talked about and coded was hands-on. On Tuesday, we started out by discussing their application and some issues they were having. They'd done a lot of customization to Spring MVC and had managed to eliminate all the XML needed when adding new controllers and views. I spent 3-4 hours that day with 2 of their engineers finalizing and implementing their convention-over-configuration rules. On Wednesday, I helped them implement Acegi Security into their application. This was interesting because they didn't have any security mechanism and we had to implement Acegi from scratch and then tie it into their backend (using a custom AuthenticationProvider). We also integrated i18n so all messages were retrieved from their database.

On Thursday, we configured Ant to run their tests and wrote some tests for their controllers. As part of this process, I showed them how to use jMock and EasyMock and tried to explain the benefits of using Spring IoC (which they still aren't sold on). On Friday, we integrated Selenium into their build process and wrote a few tests using Selenium's Java support. In the afternoon, I showed them how they might use Scriptaculous and Prototype to Ajax-enable some features in their application.

Doing all the "live coding" on someone else's machine (with 5 developer's watching) was a bit nerve wracking. However, thanks to Cenqua's FishEye tool, I was able to search AppFuse and AppFuse Light's SVN repositories for code snippets and examples. While I knew how to do much of the stuff we covered, FishEye and Google bailed me out when I didn't. About halfway through, I realized that I don't keep a lot of my knowledge in my head. Instead, it's on this blog, or spread out on the web. I don't remember URLs anymore, all I remember are keywords. If I've read a blog post or article on the web, chances are I can find it again pretty easily with Google. Even though I store a lot of bookmarks in del.icio.us, I didn't use it all week. Remembering keywords is the new bookmark for me.

The whole week was an interesting exercise in "live coding." The whole team (6 or so) sat in a conference room all week and VNC'ed into the architect's box to do the work. We worked in Eclipse and used WTP to deploy/test things on Tomcat. The keyboard was passed around between developers at random and everyone got a chance to implement new features. I think the reason that everything worked so well was because the team was full of Senior Java Developers. Everyone learned from each other as they saw new shortcuts, keystrokes and ways or writing code. I don't know if this kind of thing will work in all development teams, but I'd encourage you to try it. It's a great way to share knowledge and educate the entire team on how a new module works.

Over the weekend, I received the following e-mail from one of the developers on the team:

Very nice to meet you this past week and get a chance to see firsthand the breadth and depth of your experience in web app frameworks and such. I believe due to your visit, we will be cranking happily along here very shortly. Everyone was quite happy with the results at the end of the day yesterday.

On a related note, if you're looking to hire an enthusiastic Web + Java Developer, please take a look at my resume or send me an e-mail. My current contract ends this month and I'm hoping to find something new to get me through the summer.

Posted in Java at May 24 2007, 01:50:30 PM MDT 1 Comment

The Security Annotation Framework

Spotted on the Acegi Security mailing list several weeks ago:

A few weeks ago, I started an open source project (Security Annotation Framework) which addresses annotation-based, instance-level access control for Spring applications. It is also based on Spring 2.0's extensible XML authoring features. You can find more info at

http://sourceforge.net/projects/safr and http://safr.sourceforge.net

The framework was created during a project in 2006 and is now available under the Apache 2.0 license. It's a generic framework focused on processing security annotations on Spring beans as well as domain objects (which typically aren't managed by a Spring application context) and can be used to enforce access decisions for domain object instances. It can be used with any authorization provider and is not specific to Acegi. However, I plan to include an example how to use the SAF with Acegi authorization soon. Furthermore, it supports inheritance of annotations from base classes and interfaces.

What do you think about SAF? Are annotations a better way of implementing ACLs on domain objects?

Posted in Java at May 24 2007, 12:42:35 PM MDT 1 Comment

A couple of good blog posts

Here's a couple of good blog entries I've enjoyed reading over the past few days - in case you missed them:

Warner is spot on when it comes to Tapestry's biggest problem. Let's hope Tapestry 5 is the end-all-be-all that Howard thinks it will be. As for Gavin's post, I like it because it's mostly true and the f-bomb makes it enjoyable to read. ;-)

Posted in Java at May 24 2007, 09:50:37 AM MDT 5 Comments

AppFuse 2.0 M5 Released - now with CRUD generation and XFire support

The AppFuse Team is pleased to announce the release of AppFuse 2.0 M5! This release marks a milestone in the features of AppFuse 2.x. This release adds CRUD code generation, full source support (just like 1.x) and XFire integration. In addition, we've fixed all the issues related to switching persistence frameworks, and you should now be able to easily switch from using Hibernate to to iBATIS or JPA. The videos have been updated for M5. The Easy CRUD with Struts 2 video shows how code generation currently works.

AppFuse 2.0 is available as a Maven archetype. For information on creating a new project using this release, please see the QuickStart Guide or the Hello World video.

If you've used AppFuse 1.x, but not 2.x, you'll want to read the FAQ and join the user mailing list if you have any questions. The Maven Reference Guide has a map of Ant » Maven commands. Maven for Newbies might also be useful if you've never used Maven before. There is some support for Ant in this release.

For more information, please see the 2.0 M5 Release Notes. If you'd like to use AppFuse offline (or download everything at once), you may want to grab the dependencies and extract them into your ~/.m2/repository directory.

The 2.0 series of AppFuse has a minumum requirement of the following specification versions:

  • Java Servlet 2.4 and JavaServer Pages (JSP) 2.0
  • Java 5 for Development (Java 1.4 for deployment using the Retrotranslator Plugin)

Comments and issues should be posted to the mailing list.

We appreciate the time and effort everyone has put toward contributing code and documentation, posting to the mailing lists, and logging issues. We also greatly appreciate the help from our sponsors, particularly Atlassian, Cenqua, Contegix, JetBrains, Java.net and KGBInternet. Without them, working on this project wouldn't be nearly as much fun.

Update: The videos are much lower quality than the ones I originally recorded (13 MB vs. 70 MB). If you want to view the high quality videos (they're much clearer), you can download them from java.net. If someone has a better way to compress these (I just used QuickTime's Export feature), please let me know.

Also, this release contains the first release of the AppFuse Maven Plugin. This plugin is largely based on Hibernate Tools. We modified many of the FreeMarker templates from Hibernate Tools to default to certain annotations, as well as clean up the formatting. These templates are currently available in AppFuse's SVN. Hopefully making them available is enough to satisfy Hibernate's LGPL license.

Posted in Java at May 23 2007, 05:49:10 PM MDT 16 Comments

Thanks Erik!

From Erik's Weblog:

After 7 years, It's time to put my linkblog to rest.

I've been struggling in the last few months to find good content... what used to take 30 minutes, now takes hours. Moreover, places like DZone are doing a better job than I ever could.

I took a few weeks off last summer hoping it would help with my frustrations, but it didn't. In a way it made things worse. It is no longer fun and I can't shake the feeling that I could do something more productive with my time.

Thanks to all my regular (and not so regular) readers. It has been fun.

Thanks for the memories.

I'm definitely bummed to see Erik's Linkblog go, but I understand time commitments and priorities. Erik's Linkblog was one of the first Java blogs I started reading and I've enjoyed it thoroughly all these years. Thanks for all the hard work you've put in over the years Erik. Your linkblog will be missed.

Posted in Java at May 14 2007, 09:40:33 PM MDT 1 Comment

ApacheCon EU: Comparing Java Web Frameworks Presentation

I said I'd post my presentation after my talk this morning, so here it is:

Download Comparing Java Web Frameworks Presentation (1.1 MB)

I went a bit long on the presentation, but the crowd (standing room only) seemed to enjoy it. Thanks to all who attended!

Posted in Java at May 04 2007, 02:45:55 AM MDT 23 Comments

Java Web Framework Tools: How many are there?

How many tools are there for the various open source web frameworks in Java? Here's my count:

So where did I get these numbers?

Struts 2's number (4) is based on tmjee's comment on a recent post. Spring MVC consists of Spring IDE, Gaijun Studio and IDEA (which supports Spring XML code-completion). There's no Stripes tools that I know of. JSF's number (12) is from research I did in October 2005 (if you have a definitive list, let me know). Tapestry has Spindle (which only supports 3.0) and 4.0 has an IDEA Plugin. Wicket has NetBeans support (which also exists for JSF (+Facelets), Tapestry and WebWork).

Please let me know if you have any corrections to these numbers. You can also download my presentation if you'd like to refute anything before tomorrow morning. It's noon in Amsterdam right now, so you have 18 hours or so.

Update: I've updated the graphs based on comments. Thanks for your input!

Posted in Java at May 03 2007, 02:17:28 AM MDT 19 Comments

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

The JA-SIG Summer Conference

In June, I'll be doing a keynote at the The JA-SIG Summer Conference. This should be interesting because 1) I've never done a Keynote and 2) the other Keynote speakers are Phil Windley and Matt Asay. I've never met either one, but I've heard Matt's name a fair amount. As for Phil, I already like him from reading his blog:

Adobe Open-sources Flex

Yawn...

I'm not sure what the excitement is all about.

I'll be doing my Comparing Java Web Frameworks talk. They gave me the option to talk on whatever I wanted. I chose the CJWF talk because then I didn't need to do any extra work. ;-) I'm beginning to look like a one-trick pony, but that's OK - at least it's a fun talk to deliver. I'll be delivering it at OSCON as well. Yesterday, I submitted proposals for Acegi + SSO + Roller, AppFuse 2.0 and CJWF to CSS and JavaZone. I'll also be flying down to Dallas on June 13th to talk about AppFuse 2.0.

For those of you who don't know, the purpose of JA-SIG and the conference is to develop a global academic community providing education and research in the applied use of open technology architectures and systems in higher education. It sounds like a good conference - I'm looking forward to all the talks on CAS, uPortal and Ajax.

Posted in Java at Apr 26 2007, 01:33:30 PM MDT Add a Comment