1 min read

How to add customisations for the BFC API

In this section we are going to explain how to introduce customisations on different API levels. Getting back to our diagram from What is inside the BFC API? section we know what is inside generic BFC API:

BFC API structure
BFC API structure

To recap the motivation behind the diagram: when a Client needs specific customisation it needs to be introduced somewhere, and obviously not on the SDK level as it is a reusable package shared across multiple clients. As a result depending on what level this customisation needs to happen Custom services are being introduced within the API either on Mid or Low level. As an important point to note we introduced “extension points” to SDK services itself, therefore for most of the common customisation scenarios you will only need to customize and inject small sub service rather than full Mid level service.

As a result possible customisation points are:

  1. High Level services
  2. Custom Sub services for SDK Mid Level services
  3. Custom Mid Level services
We tend not to customize services from the Low Level as they are usually covering 3rd party APIs according to specification and are mutated when corresponding specification is updated. However in case there are any inconsistencies, do not hesitate to reach out to have it updated. That said, if you need a brand new integration not covered by any of the SDKs, you will need to add corresponding Low Level code directly into the API solution.
We utilize composition over inheritance principle in our code designs. From a practical point of view this means that whatever service customisation you do - you will need to provide full service interface implementation rather than subclassing an existing service, as existing services are closed for inheritance based modifications and are open for composition based ones.
We are going to omit Custom Mid Level services customisation example as this kind of customisation happens very rarely. This will however follow the same pattern as Custom Sub Service customisation.

See next

  1. High Level customisation example
  2. Custom Sub service customisation example