rc3.org Rafe Colburn on software development (and other topics)

Posts Tagged ‘Java’

It’s a Maven world

Dave Johnson on why he’s migrating his build scripts for Roller from Ant to Maven:

I was a Maven hater and resisted it for a long time but over the years Maven has gotten much better, it’s well supported in IDEs and as far as I can tell, Maven has replaced Ant as the de facto build system for Java projects. If you want new developers be able to easily build, debug and run your code via command or their favorite IDE then Maven is the way to go, and that’s especially true for open source projects like Roller.

This is my impression as well. I started to create a new, open source Java application the other day, and it occurred to me that for the build script, I should use Maven because it seems like that’s the way everybody is handling dependency management these days. Dave’s post is one more indication that I was probably right about that.

Why do Ruby developers test?

Giant Robots asks the question, Why Do Rubyists Test So Completely? It’s a good question. Developers on other platforms would benefit greatly from the culture of testing that has been established among Rubyists (and especially Rails developers). They have their own list, and I agree with all of the items on it. I have one reason that I’m surprised they didn’t list.

Rails makes it really easy to start testing. When you generate a new Rails application, it gives you a place to put your tests. When you generate controllers and models, it creates skeletal tests for them. Nobody has to sit and wonder, “What should I be testing.” The framework tells you. So the next step is just to fill in the blanks. Then when you want to run your tests, you just type “rake” in your application directory.

Java has JUnit and all of the IDEs have test runners, but beyond that, you’re on your own. What do you test? How do you organize your tests into suites? How do you run the suites? These are all questions you have to answer before you build a testing regime. Individual unit tests are easy to write, but getting it together to really make a habit of testing is a lot more work than it is with Rails.

And in the PHP world, things are even worse. I have never seen a PHP application with a robust unit test suite, although I’m sure they exist.

The Rails approach makes the biggest difference with people who aren’t already committed to unit testing. If you know the value of testing, you’ll jump through the hoops to set up tests, even if it’s a pain. If you’re not yet convinced, then the extra work required to set up unit testing with other platforms prevents people from getting started. It’s very much the deliberate choices the creators of Rails made to encourage and facilitate testing that explain in large part why testing is such a part of the culture.

Links from March 23rd

There are a whole ton of links in the backlog today.

Links from January 23rd

I’m going back to packaging up my del.icio.us bookmarks daily and posting them here.

Links from March 16th and 17th

Spring is a more desirable skill than EJB

The Spring Team blog announces that the Spring framework is now a more commonly requested skill for developers than EJB. About four years ago, I started building applications using Spring and Hibernate, even though much of the industry focus was still on EJB. I thought that the approach that I and a number of other people had started taking was correct, I was a little bit scared about neglecting a skill that so many employers were seeking.

So I went out and bought the book Mastering EJB and read it cover to cover, just to make sure I wasn’t missing something. After reading it, I realized that while I could see that some projects would require EJB, they would not have made writing any application I’d ever worked on easier, nor would they have improved the functionality of any of those applications. So I promptly forgot everything I’d read and continued to use the lightweight libraries.

It’s nice to look back and find myself completely vindicated.

After →