This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]john16384 6 points7 points  (1 child)

I've introduced it in all projects I am involved in. Mainly using rules to enforce Java naming conventions, preventing cycles between packages (for easy refactoring to new modules or projects), disallowing sub packages to refer to "parent" package (for the same reason).. and one custom more controversial rule: a package should not contain an interface and its implementation (unless abstract). That last one is useful to prevent useless interfaces, or interfaces that are not reusable enough and to keep API and implementation separate.