ADT_Frontend
ADT_Frontend copied to clipboard
consider versioning
backend vs frontend
How to handle new/changed features in ADT_Frontend vs ADT_Backend
This is handled by versioned request and response content types.
In ADT, the general rule is:
- There is always one latest client version compatible with all supported backend versions.
- A newer backend version can trigger a client update.
This is achieved by content negotiation:
- The backend exposes content types it supports in the discovery document. This allows the client to see directly if it is able to produce request content with those types.
- The backend checks the
Content-Type:header of the request and responds with415 UNSUPPORTED MEDIA TYPE, if it cannot consume it. - The backend checks the
Accept:header, which the client sends and responds with406 NOT ACCEPTABLE, if it cannot produce an appropriate response.
All these cases will trigger an OutDatedClientException on the client.
Example of versioned content types:
POST /sap/bc/adt/abapgit/externalrepoinfo
Content-Type: application/abapgit.adt.repo.info.ext.request.v1+xml
Accept: application/abapgit.adt.repo.info.ext.response.v2+xml, application/abapgit.adt.repo.info.ext.response.v1+xml;q=0.9
What I would like to avoid is the following code, it raises complexity, the users can upgrade both backend and frontend without influencing the rest of the system, so it should be no problem helping the users to run the latest versions
