Design Pattern Explain 讀書筆記二—— Facade 模式,patternfacade

來源:互聯網
上載者:User

Design Pattern Explain 讀書筆記二—— Facade 模式,patternfacade
what?

Provide a unified interface to a set of interfaces in a sub- system.
Facade defines a higher-level interface that makes the subsystem
easier to use. ——GOF

給子系統中的一堆介面提供一個統一,標準的介面——更高層次的介面——這樣使得子系統更便於使用。

Facade模式的特點:

對應的譯文:

意圖:         希望簡化原有系統的使用方式。需要定義自己的介面。問題(應用情境):       只需要使用某個複雜系統的子集,或者,需要以一種特殊的方式與系統互動。解決方案:     Facade 為原有系統的客戶提供了一個新的介面。參與者與共同作業者:     為客戶提供的一個簡化介面,使系統更容易使用。效果:         Facade 模式簡化了對所需子系統的使用過程。但是,由於Facade 並不完整,因此客戶可能無法使用某些功能。實現: 定義一個(或多個)具備所需介面的新類。讓新的類使用原有的系統。

where?

待續

why?

待續

how?

待續

disadvantages?

待續

明晚待續………………

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.