S90-08 practice question 7 of 35

The Service Fa?ade pattern can be used to introduce a logic layer that resides between the ___________ and an underlying ___________.

Full set: 100 questions
Answer options
A: core service logic, database
B: core service logic, resource
C: core service logic, legacy system
D: All of the above. Correct answer
Correct Answer:
D. All of the above.
Explanation

The Service Façade design pattern is applied to introduce an abstraction layer that decouples the service contract from its underlying implementation. This pattern is intentionally versatile. The underlying implementation that the façade abstracts can be a complex legacy system with a non-standard API, a specific resource such as a database requiring complex queries, or any other collection of backend functions and data sources. The primary goal is to provide a simplified, unified service interface, thereby hiding the complexity of the underlying systems, whatever their nature. Therefore, all the listed options represent valid scenarios for applying this pattern.

Why Incorrect

A, B, C: These options are individually correct but incomplete. The Service Façade pattern is not limited to abstracting only databases, only generic resources, or only legacy systems; it can be used for all of them.

References

1. Erl, T. (2009). SOA Design Patterns. Prentice Hall. In Chapter 11, the Service Façade pattern is detailed. The problem description explicitly states, "How can a service best be designed to abstract the logic and technology of a backend environment?" (p. 298). The solution explains that the façade abstracts the "underlying implementation," which can include legacy systems, custom components, or various resources.

2. Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1994). Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley. The original Façade pattern, from which Service Façade is derived, is defined as providing "a unified interface to a set of interfaces in a subsystem" (p. 185). This subsystem can be composed of any number of complex components, including databases, legacy code, or other resources.

3. University of Waterloo, ECE 452: Software Design and Architectures Course Notes. The Façade pattern is described as a structural pattern used to simplify the interface to a complex subsystem. The notes illustrate that this "subsystem" can be a library, a framework, or a collection of legacy classes, which aligns with the options provided.

Scroll to Top