The best way to use a third-party library in your code is to introduce an abstraction class/layer between your code and the third-party library. This has the advantage that you can make clear which functionality you use from the third-party library (you seldom use everything from a third-party library), and also that the classes and types of the third-party library do not leak into your code. That way, you are still in control with your own code. In his book "Clean Code", Robert Martin writes about this in chapter 8, "Boundaries". He also gives a trick to 'test' the third library, which comes in handy when the third-party library releases an update or upgrade.