We are planning to use an open source library in our App. What is the best way to decouple this external library from our application, so that in future we can use another library.
Thanks,
-Ramesh
-
Best way to decouple external library from the application (1 messages)
- Posted by: Ramesh Mandapati
- Posted on: April 14 2004 20:53 EDT
Threaded Messages (1)
- Best way to decouple external library from the application by stephen smithstone on April 15 2004 02:30 EDT
-
Best way to decouple external library from the application[ Go to top ]
- Posted by: stephen smithstone
- Posted on: April 15 2004 02:30 EDT
- in response to Ramesh Mandapati
Interfaces
create an interface that defines all the methods you want then create an implementaion of that interface and wrap the library methods in the implementation
and in your app use the interface instead of implementation and then you can add another implementation wrapping another libaray later , maybe then to control the types of implemenations use and framework like Spring / Hivemind