-3

I have been given a task to take on a legacy application (which has a very poor API in terms of user experience, is undocumented largely, and performs slowly) and build a new API and SDK to improve the user experience. I have access to the source code of this legacy application and I can see only one endpoint which does everything.

I would like to know the best way to wrap a new API that improves user experience for a legacy application. These are some of things I have thought about:

  1. Design the API so that it follows REST principles
  2. Document the API using something like RAML/Swagger etc
  3. Improve the user experience of the API so that they can enter query data much more easier such as specifying it in a JSON payload rather than as query parameters in the URL (as is with the legacy application)
  4. Generate tests to query all permutations and so exercise as much as possible the underlying legacy service.
  5. Some sort of regression testing framework to make sure the new API does not break the legacy app by working outside it's constraints.

One thing which troubles me is how to best communicate with the legacy webservice? I would have to translate the JSON from my webservice to a query which the legacy API accepts. What are the best practices around that?

Any other suggestions which I have missed would be appreciated.

  • why is this downvoted? did I write something wrong? – Mojo Feb 23 '20 at 14:38
1

Before that

  • Add analytics to legacy api (or analyze web logs which should be easy given it is based on parameters)

  • Look for most popular use cases and suboptimal methods (if clients do very often two identical operations one after another maybe they should be bundled)

  • Look for popular queries and check which should/can be cached

  • Sit to designing new API around this findings.

Also sometimes compnies want to build special solutions to use their legacy system with new one, but they forgot that it is sometimes easier and/or more future proof to just access legacy solution’s DB directly by a completly new solution.

  • Yeah I will experiment with the legacy service to see how it is behaving and functioning – Mojo Feb 23 '20 at 14:40

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.