I need to remove a framework(vertx, to be specific) from a project(lib) which is the base for other projects as well. What would be the best approach to remove all dependencies on the framework from the project. I am new to this and I do not have enough understanding of the project yet. They are thinking to replace it with Spring Cloud.

  • Why do you need to remove it? Do you just need to ensure the clients of your lib aren’t directly accessing an internal dependency or does it need to be removed entirely? What research of your own have you done? – RubberDuck Sep 3 '18 at 13:27
  • Do you have a replacement for the framework to be removed? – SyntaxRules Sep 3 '18 at 13:37
  • @SyntaxRules, yes, We are thinking about Spring Cloud. – KumarAnkit Sep 3 '18 at 13:48
  • @RubberDuck, I don't know what they were thinking at the time of taking this decision. We need to remove it entirely and intend to replace it with Spring Cloud. – KumarAnkit Sep 3 '18 at 13:50
  • You probably should edit that ^ into your question. – RubberDuck Sep 3 '18 at 13:52

Per the comments, and with a few assumptions I would take the following approach.

First, Make sure the current framework (vertx) is as decoupled as possible. This will make replacing whole or parts of the framework easier in the long run.

Second, Option 1: You can do this in one giant change, as suggested in the comments remove all libs and wait fr compile errors. Then start to fix it.

Second, Option 2: If you are a little more hesitant about the change, refactor one part (or module) of the application, test it, repeat.

Whatever you choose, make sure you have amazing tests that pass before the changes and after the changes. This will save you from feature regressions.

  • 1
    I am sensing a trade-off here. Working on compilation errors could truly remove all dependencies but would be time-inefficient and even after putting in efforts, there could possibly be cyclic dependencies somewhere. Approach 2 might take relatively less time and efforts but it demands robust and complete test suites. – KumarAnkit Sep 4 '18 at 7:41

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.