Paul Barry

Stripes Book from the Pragmatic Programmers

July 23, 2008

It’s really good to see a book being published by the Pragmatic Programmers on the Stripes, even if it is too little, too late. I wrote an article on Stripes a few years ago, and actually, I still like how Stripes handles mapping request parameters to an object graph, but since then I have discovered the benefits of dynamic languages like Ruby, so I would never consider using a framework like Stripes, just because it means programming in Java. When I was doing Java, I felt that Stripes was a much better framework than WebWork/Struts, but for some reason flew under the radar. In fact, this blog is built using Stripes. Stripes’ creator Tim Fennell always did an excellent job answering questions on the mailing list and deserved more recognition from the Java community as a whole.

It’s surprising to see this book coming out now. Frankly, straight Java as a web development language is yesterday’s technology, the Cobol of our generation. The JVM is still alive an well, with many great options, such as JRuby, Groovy, Scala and the best of them all, Clojure. I would love to see a Pragmatic Programmer book on Clojure, just to give some more attention to Clojure, because it is such a great language. Anyway, congrats to Tim Fennell, Frederic Daoud and the Stripes team on finally getting some acknowledgment for building a great framework and a great community.

Posted in Technology | Topics Stripes, Java, Clojure | 8 Comments



Well, a pragmatic book on Clojure is in the making 8)

Programming Clojure:

# Posted By Jeff Heon on Tuesday, October 28 2008 at 1:29 PM


Hi Paul,

Thanks for your congratulations. I wrote this book because I think that Stripes is an excellent framework which deserves more attention. What's nice is that I receiving very positive comments about the book, not only about Stripes, but also as a computer book in general.

Certainly, there are some nice things about Rails, Grails, and friends, but I still think there are certain things that Stripes does better. Furthermore, you *can* use Groovy, JRuby, Clojure, and so on with Stripes. I've used Groovy with Stripes myself with very nice results. On the other hand, unless I'm mistaken, you can't use Java with Rails or Grails.

To be clear, I'm not down on Rails/Grails/etc., not at all, they are excellent frameworks. But there is a HUGE Java web application base out there and Stripes certainly has its place. The transition to other JVM languages can be made more gradually in a context of a company that's not ready to change to Ruby or Groovy wholesale. And there are many contexts in which Java is still the best choice.

One of my favorite things about Stripes is that you can do pretty much anything you want with it.

By the way, keep blogging, you're interesting to read.

Frederic Daoud

# Posted By Frederic Daoud on Thursday, November 27 2008 at 9:45 PM



You can use Java with Rails via JRuby. Can you use Stripes with Groovy or JRuby? IIRC, Stripes uses annotations to define a lot of the metadata needed by the framework (which when using Java the language is probably the best way to do, rather than XML in Spring), but I don't think you can define a class in Groovy or JRuby and hang annotations off the class or methods in the class. If I'm wrong about that, let me know, it would be cool to see examples of Stripes Action Beans written in Groovy or Ruby.

As for Clojure, since it is a Functional language rather than an Object-Oriented language, it just won't be idiomatic to use a framework like Stripes due to the fact that Clojure focuses on using pre-defined immutable data structures rather user-defined mutable classes. In other words, you represent all your data in Clojure Maps, Vectors, Sets and Lists, rather than defining new Classes. You also have functions in namespaces, rather than methods on objects.

If you are using the Java the language to build web applications, I agree, Stripes is a great choice, better than the other frameworks I tried, like Struts/WebWork or Spring MVC. But if you are using a dynamic language such as Ruby, I think using a framework designed for that dynamic language makes the most sense.

# Posted By Paul Barry on Friday, November 28 2008 at 10:50 AM



I agree with what you said. To answer your question, yes you can use Groovy with Stripes. As I said in my previous comment, I've used Groovy with Stripes myself with very nice results. Groovy supports annotations, so it's not a problem. As I'm sure you know, using Groovy allows you to get things done with less code and more concise syntax.

I don't know if Stripes would work with JRuby, haven't tried that out yet.

# Posted By Frederic Daoud on Saturday, November 29 2008 at 11:41 AM

Comments Disabled