Consistent API - A Reuse Success Factor
Have you noticed how some application interfaces are consistently named and exhibit consistent behavior across components and services? This can be a critical success factor for systematic reuse. Reusable components are not isolated islands of functionality. Instead, they are meant to be leveraged in a variety of applications and business processes. Consistent interfaces provide several benefits:
- They reduce learning curve when a developer tries to understand and evaluate the asset for his/her need.
- Reduces technical debt – consistent API reduces the need to refactor code and reduces regression testing efforts as well.
- They increase the likelihood of predictable behavior across applications. This is critical for assets that get reused across business processes with an impact ultimately to end user experience (e.g. what if your customer can update address when opening accounts but won’t be able to do that when updating accounts?).
- Eases integration and testing efforts. Consistent behavior can simplify testing reusable assets. If an asset behaves consistently whether it is invoked by a web application or a backend process, knowledge about test data and integration behavior is applicable across multiple projects
- Makes documentation easier to follow: consistent interfaces can facilitate the use of templates for document generation as well where similar files/hyperlinks can be generated.
These aren’t the only benefits – feel free to suggest additional ones.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)