Exam MCPA - Level 1 All QuestionsBrowse all questions from this exam
Question 46

An Order API must be designed that contains significant amounts of integration logic and involves the invocation of the Product API.

The power relationship between Order API and Product API is one of `Customer/Supplier`, because the Product API is used heavily throughout the organization and is developed by a dedicated development team located in the office of the CTO.

What strategy should be used to deal with the API data model of the Product API within the Order API?

    Correct Answer: C

    When designing an Order API that involves significant integration with a heavily-used, widely-adopted Product API under a Customer/Supplier relationship, it is critical to ensure minimal disruption and maintain consistency. Implementing an anti-corruption layer within the Order API allows the Order API to transform and adapt the data model of the Product API into its own internal data model. This approach ensures that the Order API can use its own data types while interacting effectively with the Product API, avoiding potential conflicts and disruptions that could arise from direct changes to the Product API's data model.

Discussion
FreedoxOption: C

Option C, implementing an anti-corruption layer, is the best solution as it allows for the integration logic of the Order API to work with its own internal data model while still being able to interact with the Product API. This layer would be responsible for transforming the data model of the Product API into the internal data types of the Order API, thus ensuring that the two APIs can communicate effectively without any issues caused by differences in data models.

AniL1488Option: C

Implement an anti-corruption layer in the Order API that transforms the Product API data model into internal data types of the Order API.

calazansOption: A

Convince the development team of the Product API to adopt the API data model of the Order API such that the integration logic of the Order API can work with one consistent internal data model

jmayOption: C

"Product API is used heavily throughout the organization" - making changes to the API definition will likely to break a lit of existing application or at least cause a regression test havok. It is much practical to transform it on the fly to suit Order API's need.

Outdoor25Option: A

Should be A. Key is the power relationship Consumer/Supplier. Since product api is supplier, and order is consumer, product api will have to accommodate orders requirements.

AB317Option: A

Answer: A