CODERU enforces structural software quality

Description

CODERU is a java code quality tool to enforce design quality in respect to packages and therefore modules dependencies.

Java language is lacking a module concept. CODERU is an approach to close the gap.

CODERU is an achronym and stands for Common Dependency Rules. The CODERU-rules rely on reserved package names and the allowed dependency rules between them expressed in a general way.

Unlike other tools forcing you to define allowed or disallowed individual package dependencies CODERU is based on a fixed set of general rules. The dependencies between packages need not be defined explicitly.

As an integral part of CODERU there is a tool checking your code for rules conformance.

Motivation

CODERU was invented to ensure structural code quality in a complex and rapidly growing project. Project size: >2K classes.

There was no time for expensive up front desing. The code was so good as the experience of the developer that has written it. Of course there were Findbugs and other "code-metric" tools in place, but they mostly force quality on algorithm and class methods level.

In order to improve structural quality on classes and packages level the component oriented design approach was introduced. The components should interact with each anothers only over they API and hide own implementation. The component bordes were defined over package naming convention ("api","impl").

So far so good. That was the step in the right direction. But because of the complexity it was not possible for the developers to grasp all dependencies in the given piece of code and follow the rules. The motivation to folow the rules suffered under schedule pressure too :).

According to the motto "You Can't Manage What You Don't Measure" the tool was written to check the code for rules conformance automatically.
CODERU was born.

Better design quality

  • CODERU supports/constrains a developer with a simple rule set, but prevents arising of complex design problems.
    The developers are requested to be concerned about design quality throughout the project on each abstraction level.
  • CODERU forces layered and component oriented design and leads to better design quality;
  • higher cohesion because constrained dependencies force the dependent classes to be close to each other;
  • lower coupling because the access to other components is resticted to "COMMON" and "API";

Better maintainability

  • because the same rules are applied throughout the project the package organization and the design gets more consistent;
  • because of common understanding of the rules it is easier for teem members to understand dependencies between the components based on the package organization;
  • in case of extension it gets easier to find the right place and it gets more unlikely to break established component dependencies by chance;
  • because the rules are generic they need not any up-front configuration;
  • because the rules are generic they are easier to understand than the dozens of explicit rules;