DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Best Practices in Software Development: Interface Overuse

4 years ago dzone.com

Summary: This is a summary of an article originally published by the source. Read the full original article here →

Program to interface, not to implementation” doesn't mean you should pair each and every one of your domain classes with a more or less identical interface. In doing so, you are violating YAGNI, and lowering the readability and maintainability of your codebase.

Having one and only one class implementing an interface most of the time is an overuse of interfaces and it does more harm than good.

I’m only saying that interfaces that mirror one and only one class implementation are a waste. Here are some cases where interfaces may be useful: It is very likely that you are not using interfaces correctly if you are not structuring your project by domain.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com