MULE-101 practice question 13 of 15

During a planning session with the executive leadership, the development team director presents plans for a new API to expose the data in the company's order database. An earlier effort to build an API on top of this data failed, so the director is recommending a design-first approach.

Full set: 55 questions
Answer options
A: Developing a specification so consumers can test before the implementation is built Correct answer
B: Adding global policies to the API so all developers automatically secure the implementation before coding anything
C: Publishing the fully implemented API to Exchange so all developers can reuse the API
D: Building MUnit tests so administrators can confirm code coverage percentage during deployment
Correct Answer:
A. Developing a specification so consumers can test before the implementation is built
Explanation

The design-first approach prioritizes defining the API's contract before writing any implementation code. This is achieved by creating a detailed API specification (using RAML or OAS). This specification acts as a blueprint that allows API consumers to understand, provide feedback, and even begin testing against a mock service generated from the spec. This parallelizes development efforts and ensures the final API meets consumer requirements, which is the core principle of this methodology.

Why Incorrect

B. Adding global policies is an operational/management task performed after the API is implemented and deployed, not a part of the initial design phase.
C. Publishing a fully implemented API to Exchange is a distribution step that occurs after the design and development phases are complete.
D. Building MUnit tests is part of the implementation phase to validate the code, which happens after the API specification has been designed.

References

1. MuleSoft Documentation, "API design best practices": Under the section "Design-first approach to building APIs," the documentation states, "Before you write any code, you create an API specification. The specification is a contract between an API and its consumers... Consumers can provide feedback on the design before you invest in the implementation." This directly supports creating a specification for early consumer involvement.

2. MuleSoft Documentation, "The API lifecycle on Anypoint Platform": This document outlines the distinct stages of the lifecycle. "Design" is the first stage, where the API specification is created. "Implement," where MUnit tests are written, and "Deploy," where policies are applied, are subsequent, separate stages. This clarifies the incorrect placement of options B and D.

3. MuleSoft Documentation, "Introduction to Anypoint Platform", Section: "The API-Led Approach to Connectivity": This section emphasizes that the design-first approach involves "designing your API first, getting feedback, and then building it." It highlights the value of creating a contract that allows consumer-facing teams to build against the specification while the backend implementation is happening concurrently. This reinforces the core benefit described in option A.

Scroll to Top