2

I am building an ASP.NET web application that uses a workflow engine, and have decided to use SOLID principles to build a third party library abstraction layer.

I guess it would be similar to a data abstraction layer. Does anyone have any advice on the most common approach for building an third party library abstraction layer?

Community
  • 1
  • 1

1 Answers1

3

YAGNI is the answer to question. Reasons

  • Abstracting a single component/library would reduce the functionality of that component/library because you will have subset of functionalities after abstraction
  • Other components/libraries will not fit in to the abstraction since you have abstracted single component/library.
  • Waste of time
Eranga
  • 32,181
  • 5
  • 97
  • 96
  • I want to at least centralize all the third party library code. Any suggestions for doing that? – stephen cao Feb 13 '12 at 01:54
  • @stephencao what do you mean by **centralize all the third party library code**? – Eranga Feb 13 '12 at 03:12
  • if I use the third party library directly in my business object layer, changes to the third party library would require making changes to all my third party library code in the business layer. I would like to place all my third party library code in one module for ease of maintenance. – stephen cao Feb 13 '12 at 14:44
  • @stephencao One solution would be to create sub classes of the framework classes and use them. Usually library APIs are too general for the task at hand. Adding helper classes and extension methods help in these cases to reduce code duplication. – Eranga Feb 13 '12 at 15:57