Nelz's Blog

Mah blogginess

Project Granularity Learnings

There is no "correct" answer.

As usual in the software engineering domain, the answer is "it depends".

I agree with Maven’s philosophy of "one (main) artifact per project". One thing that I realized is that I have quite a bit of control over what is considered a project.

I am going to talk about one of the projects at work. The DAO (Data Access Object) layer is a part of the web application project, but it get’s carved into a stand-alone library by ANT tasks. I fully believe that DAO library should be pulled out of the WAR project and made into its own project. However, on my first pass I had recommended that the DAO layer also be broken into individual "API" and "implementation" projects. I had originally advocated that split "just in case" we would want to swap out the underlying implementation technology. That "just in case" was a very expensive proposition as far as long-term maintenance is concerned. Truth be told, it is very unlikely that we would be changing out the implementation technology any time in the near future. In the meantime, I’ll be using tools like JDepend ensure the API and implementation packages don’t become too interdependent.