tailieunhanh - head first design patterns phần 6

Cách tốt nhất để bắt đầu tạo ra một trò chơi mới là gì? D. Chơi các trò chơi khác để gây ra một số cảm hứng. 2. Loại trò chơi đầy sáng tạo và công nghệ thú vị mà game thủ PC thường không chú ý? A. Bảng điều khiển trò chơi 3. Những gì cụm từ mô tả các tính năng bổ sung và các tính năng bổ sung trong một trò chơi? | the holly wood principle The Hollywood Principle We ve got another design principle for you it s called the Hollywood Principle You ve heard me say it before and ril say it again dont call me I ll call you The Hollywood Principle Don t call US we ll call you. Easy to remember right But what has it got to do with oo design The Hollywood principle gives US a way to prevent dcỊxmdcncy rot. Dependency rot happens when you have high-level components depending on low-level components depending on high-level components depending on sideways components depending on low-level components and so on. When rot sets in no one can easily understand the way a system is designed. 0 with the Hollywood Principle we allow low-level components to hook themselves into a system but the high-level components determine when they are needed and how. In other words the high-level components give the low-level components a don t call us we ll call you treatment. High-Level Component M the h h-k nb Control when and how Another low-level Component ỉú evd J exponent 296 Chapter 8 the template method pattern The Hollywood Principle and Template Method The connection between the Hollywood Principle and the Template Method Pattern is probably somewhat apparent when we design with the Template Method Pattern we re telling subclasses don t call US we ll call you. How Let s take another look at our CafleincBcvcrage design you are here 297 who does what DumlT uestions 0 How does the Hollywood Principle relate to the Dependency Inversion Principle that we learned a few chapters back z The Dependency Inversion Pnnciple teaches US to avoid the use of concrete classes and instead work as much as possible with abstractions. The Hollywood Principle is a technique for building frameworks or components so that lower-level components can be hooked into the computation but Without creating dependencies between the lower-level components and the higher-level layers. So they both have the goal of decoupling but .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.