Design mode (Patterns in java)

xiaoxiao2021-03-05  26

The design pattern of the bridge is the earliest system in domestic media (including books and websites). This series introduces the free spread (reproduced this station article, please keep the author and the URL), try to make a conciseness, popular Easy to understand, but it is inevitable that there is a discussion, please write or the forum discussions, continuous improvement.

Really mastering the design model needs to be studied and used in practice, and the design model can read the book "Java Practical System Development Guide" in the bridge in the design model. Eight instances in books are newly designed and realized from the system from the design mode, framework and other highly, which is the fundamental of the current software design and programming in the future.

1: Foreword learning the importance of the GOF design pattern and the difference in the model

2: GOF design mode A. Creation mode

Factory (factory model) in design mode Use the factory mode as frequent as New. 2002/10/9 Update Design Mode Prototype Specifies the type of object to create an object, and create new objects by copying these prototypes . The BUILDER car in the design pattern consists of many parts of the wheel steering wheel. At the same time, it is also a complicated work to assemble these parts into a car. The Builder mode is to separate these two situations. Design mode Singleton (Sample mode) guarantees that only one instance is only one instance, and provides a global access point 2002/10/9 update B. Structural mode

Facade scalable Using JDBC provides a flexible implementation for different database programming, FACADE provides a flexible implementation. The proxy of design mode uses JIVE as an example, analyzes the application design mode of the agent mode on the user-level authorization mechanism. Adapter use class Two ways of regeneration: Combination (New) and inheritance (Extends), this already mentioned in "Thinking in Java". Composite of design mode is a unit that combines class with tree structure. You introduce you to others. Is a unit, you are an element in the unit, others are doing buyers with you, which is equivalent to buying and selling in units. The JIVE is also analyzed in the article. Design mode DecoratorDecorator is a paint, giving your Dong's appearance brush a beautiful color. The bridges of the design model will separate the "Cowherd Wiranda" (this should be together, separate them, form two interfaces), build between them A bridge (dynamic combination) design mode Flyweight provides Java operating performance, lowered small and a large number of repetitive classes. C. behavioral mode

Design mode Template actually introduces you why you want to use Java abstraction class, which is simple, usan. Design mode MEMENTO is very simple, that is, reserved the copy of the original data in memory. Design mode OBSERVER Introduction How to use the Java API's ready-to-build OBServer design mode, the part of the class of the class, as if you can shoot the drum, of course, if you can do it, don't be admitted to the next. Design mode Command What is a behavior Package, Command is the best description. The State Status of Design Mode is an instance that is often encountered in the program. The status of the status, sets the status converter, and it can be easily switched in the state. Design mode Strategy Different algorithms respective packages, The user can choose the required algorithm. Design mode MediatorMediator is very like a traffic light in the crossroad, each vehicle can interact with traffic lights. Design mode interpreter is mainly used to analyze the language, the application is not much. Design mode Visitor visitors complete a series of substantive operations while visiting, and can also be extended. This mode of design mode has been integrated into the Java's Collection. There is no need to create an item in most occasions, as long as the object is loaded In the Collection, use Iterator to traverse it.

3: English

The author of Thinking in Patterns with Java Thinking in Java! CMSC491D Design Patterns in Java Overview of Design Patterns Precisely define all modes and their relationships Design Patterns Java Companion4: J2EE design mode

Design mode Apply in EJB This is the article in the "programmer" in the Phase 6 of the board. EJB Design Mode (English) Understanding EJB or J2EE from design patterns, I think it is a very effective way.

转载请注明原文地址:https://www.9cbs.com/read-34874.html

New Post(0)