今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Chain of responsibility
- [Instructor] Think about ordering a sandwich from your favorite sub shop. The first thing that you might be asked to select is the bread. Then you might have to select the meat. Followed by the cheeses. Followed by the vegetables. And finally to the condiments. You're sandwich gets made on an assembly line. The steps that go into making that sandwich are ordered. And you can claim the sandwich at any point in the process. If you only want meats and cheeses, then the sandwich doesn't need to complete the rest of the steps on line. You can just take it and eat it. This analogy is similar to the Chain of Responsibility design pattern. This pattern allows us to chain together objects to handle a request. A request is sent to an object to handle it and then that handler could process the request and return a result, or it could pass the request on to the next handler. Which could return a result or pass the request…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
(已锁定)
Chain of responsibility4 分钟 42 秒
-
(已锁定)
Implementing the storage class6 分钟 22 秒
-
(已锁定)
The Command pattern4 分钟 47 秒
-
(已锁定)
Implementing commands4 分钟 59 秒
-
(已锁定)
Improving the conductor6 分钟 38 秒
-
(已锁定)
The Iterator pattern4 分钟 5 秒
-
(已锁定)
Implementing iterators4 分钟 59 秒
-
(已锁定)
The Observer pattern4 分钟 19 秒
-
(已锁定)
Implementing observers2 分钟 48 秒
-
(已锁定)
The Strategy pattern4 分钟 25 秒
-
(已锁定)
Implementing strategies9 分钟 36 秒
-
(已锁定)
-