Facade Pattern

Facades are all around us in the real world. Operating System are one such example - you don't see all the inner working of your computer, but the OS provides a simplified interface to use the machine. Buildings also have a facade - the exterior of the building. The people walking past the road can only see this glass face of the building. They do not know anything about it, the wiring, the pipes and other complexities. The face hides all the complexities of the building and displays a friendly face. So, in a netshell, a Facade aims to make things look cleaner and more appealling.

This is how facade pattern is used. It hides the complexities of the system and provides an interface to the client form where the client can access the system. In java, the interface JDBC can be called a facade. We as users or clients create connection using the "java.sql.Connection" interface, the implemention of which we are not concerned about. the implemention is left to the verdor of driver.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章