-1

I have a cms with some modules, and now I working on big update for it with new api. And I feel sadness when write updates for every single module. Too many things changed at this time.

How can I avoid this in future?
There is any recommendations for good api design?

Google gives me advices only for making modules with api for concrete cms

3
  • 1
    This question might be too broad to answer in its current form. Can you describe more about the changes you needed to make? Some abbreviated code examples will help too. Commented Mar 30, 2017 at 11:41
  • @GregBurghardt Seems I don't know what I exactly want. I periodically write updates for this cms just to look at my current programming level. But this time I want to share result with others, and this requires a good foundation. I can't jump over head without any advices, even common. I know that someday api will change, not so radical as now, but modules (especially not my) can broke. I want somehow do big changes in api but minimize bad effect of it. Commented Mar 30, 2017 at 12:29
  • @GregBurghardt for example, I moved from custom request/response classes to psr-7 and this completely changed way to work with it Commented Mar 30, 2017 at 12:34

1 Answer 1

0

Follow the following working practices:

  • When designing your API make sure that you are thinking of the future
  • Add API new entry points and possibly deprecate existing ones between versions wherever possible rather than changing existing ones.
  • Consider one or both of backward compatibility mode or preview of the new API as a minor update with deprecation of the retiring API nodes for a few minor releases before the major.
  • Include API version information in your API so clients can check compatibility or negotiate API.
  • Where possible consider supplying API porting tools that will automatically map existing API calls into the new API aim for at least 90% success rate and clean failures

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.