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:
- Design the API so that it follows REST principles
- Document the API using something like RAML/Swagger etc
- 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)
- Generate tests to query all permutations and so exercise as much as possible the underlying legacy service.
- 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.