Web Service Facade Solution Architecture (Refer to Figure 2
below) provides an example for Facade design pattern. In this architectural
solution, instead of rewriting legacy applications or customizing those with
middleware to connect to other applications one by one, this solution helps
create a "facade" for the legacy application. Other applications are
easily "plugged into" this facade. By modeling a legacy application
into its basic functions of create, read, update, and delete and then exposing
these functions as Web methods, the Web service facade solution allows other
applications to access legacy data by making use of common Web services through
standardized protocols. In this way, Facade decouples layers so that they do
not depend on each other which can make it easier to develop, to use and to
promote code re-use.
Figure 2
The JIT (Just in-Time) compilers that we use everyday to
process the Dotnet code is a prime example of the facade pattern. JIT compiler
performs several lower level functions before converting MSIL into native code,
such as verifying whether Microsoft intermediate language (MSIL) code can
access the memory locations, checking MSIL code is correctly generated because incorrect
MSIL can lead to a violation of the type safety rules, etc.