Đang chuẩn bị liên kết để tải về tài liệu:
Lecture Java methods: Object-oriented programming and data structures (2nd AP edition): Chapter 27 - Maria Litvin, Gary Litvin
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Chapter 27 - Design patterns. After you have mastered the material in this chapter, you will be able to explore the concept of design pattern; get familiar with six introductory design patterns: Façade, strategy, singleton, decorator, composite, MVC (Model-View-Controller). | Design Patterns Copyright © 2011 by Maria Litvin, Gary Litvin, and Skylight Publishing. All rights reserved. Java Methods Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin 2nd AP edition with GridWorld 27- This is a brief introduction to patterns. Hundreds of design patterns have been described in books, at conferences, online, etc. Objectives: Explore the concept of design pattern Get familiar with six introductory design patterns: Façade Strategy Singleton Decorator Composite MVC (Model-View-Controller) 27- Being aware that OO design patterns exist helps you pay more attention to the design stage of your project before rushing to write code. Design Patterns Design patterns aim to provide ideas and recipes for sound OO software design. The origin of the idea can be traced to some influential books on architecture by Christopher Alexander (for example, The Timeless Way of Building, 1979). Hundreds of OO design patterns have been published since 1995 | Design Patterns Copyright © 2011 by Maria Litvin, Gary Litvin, and Skylight Publishing. All rights reserved. Java Methods Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin 2nd AP edition with GridWorld 27- This is a brief introduction to patterns. Hundreds of design patterns have been described in books, at conferences, online, etc. Objectives: Explore the concept of design pattern Get familiar with six introductory design patterns: Façade Strategy Singleton Decorator Composite MVC (Model-View-Controller) 27- Being aware that OO design patterns exist helps you pay more attention to the design stage of your project before rushing to write code. Design Patterns Design patterns aim to provide ideas and recipes for sound OO software design. The origin of the idea can be traced to some influential books on architecture by Christopher Alexander (for example, The Timeless Way of Building, 1979). Hundreds of OO design patterns have been published since 1995 in books, web sites, etc. 27- The Internet gives ready access to the “pattern” community. Just google “design patterns.” hillside.net is a good place to start. Design Patterns (cont’d) A typical description of a design pattern includes: name brief statement of purpose description the types of classes and objects involved structural diagram example(s) 27- Design patterns are not specific to Java. Code examples may or may not be given. Façade Design Pattern Serves to facilitate the use of a complicated subsystem or package of classes Replaces multiple complex interfaces to several classes with one simplified interface to the whole subsystem EasySound 27- If systems and frameworks were designed with the user in mind, they would include façade classes. Façade (cont’d) Can be used to encapsulate a process that involves several steps. For example: . Rectangle ocrArea = new Rectangle(200, 20, 120, 30); ImageEditor imageEditor = new ImageEditor(); image = imageEditor.cut(image, .