课程: JavaScript: Patterns

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Facade pattern

Facade pattern

- [Instructor] What is a facade? It is basically the pattern of hiding complexity away by creating a facade for the complex code. So if you are thinking, wait, what? That's absolutely normal. If you're a React developer, or building components, you've been using facades every day. When you're building your component in any framework, you code the complexity of this component into a module, or file, and then leverage a simple line to render this component into your code. Well, this is what the facade pattern is. Grab the code from the React folder into the exercise files, and let's go through the components quickly so the facade pattern you have been using all this time makes a lot more sense. So let's open this folder, and in the resources you have a React application. Simply drag and drop it inside of Visual Studio Code, and I'm going to maximize this, and you have facades everywhere in React code, or Anguler, or any…

内容