收录日期:2021/01/22 02:17:23 时间:2010-08-27 14:20:28 标签:java,ruby-on-rails,ruby,java-ee,playframework

Long time Java developer here, but I've spent more time working with Ruby over the past 3 years or so as far as web applications go. I really have enjoyed it, but there are concerns I've uncovered that I won't cover here.

Now that I've found the Play! framework, I'm thrilled about the prospect of having a Rails-like experience with Java's speed and reliability. Aside from what Play! provides out of the box, I'm looking for recommendations on "can't miss" libraries and tools for the Java developer used to pragmatic, dynamic experiences. I've found Project Lombok, which looks like a very intriguing way to eliminate a lot of the boiler plate, unnecessary Java noise. What else should I know about? I know Google has released quite a few libraries over the past three years that I've heard mentioned on the Java Posse, but I can't recall exactly what they are. I'm sure I've missed others in my absence.

So, what makes up your essential Java toolbox these days?

Thanks for your answers!

I'd say Guava is a MUST. You also might want to check out guice by google.

If you are interested in multi-threaded programming, then java.util.concurrent is a must...

There's been a lot going on with languages that run on the Java Virtual Machine, leverage the Java libraries, and interoperate with Java, but that are more expressive. Take a look at JRuby (which runs Rails), Groovy (and the Rails-like Grails), Clojure, Jython (a Python implementation), and even Javascript (see the Rhino interpreter, written in Java).

Particularly interesting is Scala, very elegant fusion of object-oriented programming and functional programming. Scala's nearly as fast as Java, has the best interoperability with Java, and is very expressive. Scala programs can be much shorter than Java programs. The Lift Framework is comparable to Rails in the Scala world.

I always have one eye on commons-lang . A lot of nasty stuff was encapsulated in the classes. It helps for example to write equals and hashcode. I'm comparison to projectlombok it does it at runtime via reflection, but with the possibility to exclude special attributes.

For concurrency you could have a look on Akka, which is available for Scala and Java. I never can tested it, but I heard a session on the JAX about it and it seems to be good.

Today, I found lambdaj which gives you a lot of nice groovy-like possibilities. I haven't any experience with it, but I think it's worth to have a closer look on it.

To make my non-web software "open" i always add (embeeded) Jetty and recently RESTEasy. Makes a "restfull" API a child's play.