Don't use internal APIs while integrating 3rd party Libraries

While coding in a hurry, you sometimes use internal API’s either willingly –since you don’t want to spend more time– or unwillingly instead of public equivalents. I am saying don’t use them because they meant to change, as the name implies they are for internal use.
Just today, I spent three hours just to replace these kind of codes after upgrading Alfresco to 3.3 from 3.2 for a project I am working on. Those who know Alfresco will understand me. Alfresco is full of internal and public APIs, there is no clear distinction, just an annotation that specifies that a service is public. –and it is enough for decent developers, I agree :)–
However we had used a helper class somehow and we had used it extensively. It is called DictionaryHelper, it contains utility methods for querying information about your data model. There are also two other services which are public and provide the same functionality collaboratively named; DictionaryHelper and NamespaceResolverService.
Anyway, shit happens we had used it somehow and I spent the last three hours just to replace them with proper code. I am not saying that using internal API’s is prohibited sometimes you can use them intentionally, even in that case, be clever enough put an abstraction on top. This way it is much more easy to change the code when the internal API changes.
But at least even coding in the quickest fashion, we are always writing tests –we are right? :)– and it becomes easier to update the existing code and be sure that everything works as supposed to.

Read More Post

STAY CONNECTED

Most Popular

Manifesting Your Dream Career: Finding Your Passion And Purpose
01 Aug

Manifesting Your Dream Career: Finding Your Passion And Purpose

Are you passionate about finding your dream career? Manifesting can help you align your career with your passions and purpose.

Revolutionizing Your Ride: Expert Auto Service At Carolina Auto Service
27 Feb

Revolutionizing Your Ride: Expert Auto Service At Carolina Auto Service

Finding a reliable auto service provider is paramount in the bustling world of vehicle maintenance and repair. That's where Carolina

Floratam: The Robust Grass Solution From Council Growers SOD
25 Jan

Floratam: The Robust Grass Solution From Council Growers SOD

Floratam grass, a popular St. Augustine variety, has become a go-to choice for homeowners and landscapers seeking a lush, durable

Carolina Mobile Autoservice: Your Go-To For Expert Brake Service Repair
25 Jan

Carolina Mobile Autoservice: Your Go-To For Expert Brake Service Repair

For vehicle owners, the braking system is among the most critical components for safety and performance. Carolina Mobile Autoservice, a

Safeguarding Your Property: Expert Water Damage Services By MBC Capital
24 Jan

Safeguarding Your Property: Expert Water Damage Services By MBC Capital

Water damage can significantly impact homes and businesses, often leaving a trail of destruction and disruption in its wake. Understanding

Revanesse Lip Filler: The Secret To A Perfect Pout – Discover America’s New Favorite At Beauty From Ashes Aesthetics
19 Jan

Revanesse Lip Filler: The Secret To A Perfect Pout – Discover America’s New Favorite At Beauty From Ashes Aesthetics

In the ever-evolving world of cosmetic enhancements, there's a constant quest for the next big thing. The latest darling in