MuleSoft Certified Platform Architect – Level 1 — Question 45
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?
Answer options
- 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.
- B. Work with the API data types of the Product API directly when implementing the integration logic of the Order API such that the Order API uses the same (unchanged) data types as the Product API.
- 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.
- D. Start an organization-wide data modeling initiative that will result in an Enterprise Data Model that will then be used in both the Product API and the Order API.
Correct answer: C
Explanation
The correct answer is C because implementing an anti-corruption layer allows the Order API to interface with the Product API without being tightly coupled to its data model, thus protecting the integrity of the Order API's internal logic. Option A is incorrect as it requires the Product API to change its data model, which is impractical given its widespread use. Option B is wrong because using the Product API's data types directly could lead to issues if changes occur in the Product API. Option D is not feasible as it suggests a large-scale initiative that may not address the immediate integration needs.