The Concise Interface Implementation Pattern

A convenient pattern to always use interfaces where possible but to keep the code-footprint and complexity of relations small

The Concise Interface Implementation

public interface MyInterface {    void interfaceMethod1();

void interfaceMethod2();
final class Default implements MyInterface{ @Override
public void interfaceMethod1() {
//impl
}
@Override
public void interfaceMethod2() {
//impl
}
}
}
MyInterface m = new MyInterface.Default();

Future-proof

Avoid unnecessary Naming

TextTransformer t = new StringManager();

Avoid Codebase Clutter

Testable

Conclusion

Software Engineer currently working through the stack: JS frontend, Android Mobile, Java Backend. Security is my passion.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store