Note that there are some explanatory texts on larger screens.

plurals
  1. POShould you wrap 3rd party libraries that you adopt into your project?
    primarykey
    data
    text
    <p>A discussion I had with a colleague today.</p> <p>He claims whenever you use a 3rd party library, you should always write for it a wrapper. So you can always change things later and accomodate things for your specific use.</p> <p>I disagree with the word <strong>always</strong>, the discussion arose regarding log4j and I claimed that log4j has well tested and time proven API and implementation, and everything thinkable can be configured a posteriori and there is nothing you should wrap. Even if you wanted to wrap there are proven wrappers like commons-logging and log5j.</p> <p>Another example that we touched in our discussion is Hibernate. I claimed that it has a very big API to be wrapped. Furthermore it has a layered API which lets you tweak its inside if you so need. My friend claimed that he still believes it should be wrapped but he didn't do it because of the size of the API (this co-worker is much veteran than me in our current project).</p> <p>I claimed <a href="https://stackoverflow.com/questions/406760/whats-your-most-controversial-programming-opinion/406775#406775">this</a>, and that wrapping should be done in specific cases:</p> <ul> <li>you are not sure how the library will fit your needs</li> <li>you will only use a small portion of a libary (in which case you may only expose a part of its API).</li> <li>you are not sure of the quality of the library's API or implementation.</li> </ul> <p>I also maintained that sometimes you can wrap your code instead of the library. For example, puting your database related code in a DAO layer, instead of preemptively wrapping all of hibernate.</p> <p>Well, in the end this is not really a question, but your insights, experiences and opinions are highly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload