This Java development tool checks for architecture rules during build time to ensure code quality, ease of maintenance, and adherence to best practices.
One of Macker's fantastic features is that it's flexible and does not impose anybody else's rules on you. Instead, you have the freedom to write unique rules that fit perfectly with the project you're working on. Macker offers broad access rules that Java's native access modifiers can't provide.
With the current release, Macker allows users to set class and package-level access rules. For instance:
• Classes situated in the UI layer are forbidden from accessing the data object layer or using classes in java.sql.
• External systems are barred from accessing internal implementation classes (suffixed with 'Impl').
• One functional module can only access another through its API.
• Only classes that implement interfaces in javax.ejb and specific framework packages are permitted to use the EJB APIs.
The listed examples are just that – examples. Macker does not automatically check anything, so writing your rules to suit your project's needs is entirely up to you.
In the future, Macker plans to incorporate more sophisticated class matching, existence/nonexistence rules, and rules that apply to the method level as well. Some examples of those rules could include:
• Classes that implement the SessionBean interface must have the suffix 'EJB'.
• Methods must take and return Java collection interfaces, such as List, instead of concrete types like ArrayList.
• Objects that implement a particular interface must have static factory methods rather than public constructors.
All in all, Macker is a potent tool that can help keep your code clean, consistent, and easy to maintain. Anyone looking to streamline their development process should consider giving Macker a try.
Version 0.4.2: N/A