I had a question about big scale projects. what if the team decides to change a library and therefor the codes should be changed. for example what if the team wants to change the picasso library to glide so we should change the Picasso.get().load().into(); 100 times.how should we handle this situations?

  • use a proxy or facade to hide the implementation
    – Martin K
    Feb 12 '20 at 10:54
  • Your question is unclear. What do you mean by "Big scale" projects, and what specificially has this to do with changing a library? It seems you mean "3rd party" libraries exclusively? What do you mean by "change" - changing by making a public fork, a private fork, or a pull request? And you did not say one word about which problems you see, so its quite unclear what kind of answer you are expecting. Please edit your question and clarify, or don't be astonished if the community will downvote, close and delete it.
    – Doc Brown
    Feb 12 '20 at 11:51

As it is, there is nothing you can do except weigh the advantage of using a better library against the cost of adapting all calls to theold library in your code base.

In the future, it could be a good idea to buy "insurance" against dependency on third-party code by isolating all calls to it into one particular adapter module. That way, your business code would only contains statements of the sort load_image(), while the dependency on Picasso is confined to the implementation of load_image(). That way, when the third party provider changes, you have to change it in only one place rather than all over the place.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.