Jump to content

Хэрэглэгч:Sodkhuudalaikhuu/Програм хангамж зохиох хэв загвар

Википедиа — Чөлөөт нэвтэрхий толь

Програм хангамжийн инженерчлэлд зохиомжийн хэв загвар гэж тухайн програм хангамжийн зохиомжийн дотор өгөгдсөн хам сэдвийн хүрээнд түгээмэл тохиолддог асуудлуудад зориулсан ерөнхий, дахин ашиглах боломжтой шийдлийг хэлдэг.

Ангилал, жагсаалт

[засварлах | кодоор засварлах]

Бүтээлтийн хэв загвар

[засварлах | кодоор засварлах]
Нэр
Тодорхойлолт
In Design Patterns In Code Complete Other
Хийсвэр үйлдвэр
Provide an interface for creating families of related or dependent objects without specifying their concrete classes. Тийм Тийм N/A
Өрөгч
Separate the construction of a complex object from its representation, allowing the same construction process to create various representations. Тийм Үгүй N/A
Dependency Injection A class accepts the objects it requires from an injector instead of creating the objects directly. Үгүй Үгүй N/A
Үйлдвэр арга
Define an interface for creating a single object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. Тийм Тийм N/A
Lazy initialization Tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed. This pattern appears in the GoF catalog as "virtual proxy", an implementation strategy for the Proxy pattern. Тийм Үгүй PoEAA[1]
Олон биет
Ensure a class has only named instances, and provide a global point of access to them. Үгүй Үгүй N/A
Object pool Avoid expensive acquisition and release of resources by recycling objects that are no longer in use. Can be considered a generalisation of connection pool and thread pool patterns. Үгүй Үгүй N/A
Анхны төрөл
Specify the kinds of objects to create using a prototypical instance, and create new objects from the 'skeleton' of an existing object, thus boosting performance and keeping memory footprints to a minimum. Тийм Үгүй N/A
Resource acquisition is initialization (RAII) Ensure that resources are properly released by tying them to the lifespan of suitable objects. Үгүй Үгүй N/A
Ганц биет
Ensure a class has only one instance, and provide a global point of access to it. Тийм Тийм N/A

Бүтцийн хэв загвар

[засварлах | кодоор засварлах]
Нэр Тодорхойлолт In Design Patterns In Code Complete Other
Тааруулагч, өлгий, эсвэл орчуулагч Convert the interface of a class into another interface clients expect. An adapter lets classes work together that could not otherwise because of incompatible interfaces. The enterprise integration pattern equivalent is the translator. Тийм Тийм N/A
Гүүр
Decouple an abstraction from its implementation allowing the two to vary independently. Тийм Тийм N/A
Composite Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. Тийм Тийм N/A
Чимэглэгч
Attach additional responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible alternative to subclassing for extending functionality. Тийм Тийм N/A
Extension object Adding functionality to a hierarchy without changing the hierarchy. Үгүй Үгүй Agile Software Development, Principles, Patterns, and Practices[2]
Фасад
Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. Тийм Тийм N/A
Хөнгөн жин
Use sharing to support large numbers of similar objects efficiently. Тийм Үгүй N/A
Front controller The pattern relates to the design of Web applications. It provides a centralized entry point for handling requests. Үгүй Үгүй J2EE Patterns[3]

PoEAA[4]

Marker Empty interface to associate metadata with a class. Үгүй Effective Java[5] N/A
Модуль
Group several related elements, such as classes, singletons, methods, globally used, into a single conceptual entity. Тийм Үгүй N/A
Итгэмжлэл
Provide a surrogate or placeholder for another object to control access to it. Тийм

"Twin – A Design Pattern for Modeling Multiple Inheritance" (PDF).

Үгүй
Twin Twin allows modeling of multiple inheritance in programming languages that do not support this feature. Үгүй Үгүй Үгүй

Зан үйлийн хэв загвар

[засварлах | кодоор засварлах]
Нэр Тодорхойлолт
In Design Patterns In Code Complete Other
Blackboard Artificial intelligence pattern for combining disparate sources of data (see blackboard system) Тийм Үгүй N/A
Chain of responsibility Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it. Тийм Үгүй N/A
Команд
Encapsulate a request as an object, thereby allowing for the parameterization of clients with different requests, and the queuing or logging of requests. It also allows for the support of undoable operations. Тийм Үгүй N/A
Хэлмэрч
Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language. Тийм Тийм N/A
Давтагч
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation. Тийм Үгүй N/A
Зууч
Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it allows their interaction to vary independently. Тийм Үгүй N/A
Санамж
Without violating encapsulation, capture and externalize an object's internal state allowing the object to be restored to this state later. Үгүй Үгүй N/A
Нойль объект
Avoid null references by providing a default object. Тийм Тийм N/A
Ажиглагч буюу  нийтлэх/захиалах Define a one-to-many dependency between objects where a state change in one object results in all its dependents being notified and updated automatically. Үгүй Үгүй N/A
Үйлчлэгч
Define common functionality for a group of classes. Үгүй Үгүй N/A
Specification Recombinable business logic in a Boolean fashion. Үгүй N/A Тийм
Төлөв
Allow an object to alter its behavior when its internal state changes. The object will appear to change its class. Тийм N/A Тийм
Стратеги
Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it. Тийм N/A Тийм
Темплейт арга
Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure. Үгүй N/A N/A
Зочин
Represent an operation to be performed on the elements of an object structure. Visitor lets a new operation be defined without changing the classes of the elements on which it operates.

Schmidt, Douglas C.; Stal, Michael; Rohnert, Hans; Buschmann, Frank (2000). Pattern-Oriented Software Architecture, Volume 2: Patterns for Concurrent and Networked Objects. John Wiley & Sons. ISBN 0-471-60695-2.

Үгүй N/A

Ашигласан материал

[засварлах | кодоор засварлах]

[[Ангилал:Програм хангамж зохиох хэв загвар]]

  1. Fowler, Martin (2002). Patterns of Enterprise Application Architecture. Addison-Wesley. ISBN 978-0-321-12742-6.
  2. C. Martin, Robert (2002). "28. Extension object". Agile Software Development, Principles, Patterns, and Practices. p. 408. ISBN 978-0135974445.
  3. Alur, Deepak; Crupi, John; Malks, Dan (2003). Core J2EE Patterns: Best Practices and Design Strategies. Prentice Hall. p. 166. ISBN 0-13-142246-4.
  4. Fowler, Martin (2002). Patterns of Enterprise Application Architecture. Addison-Wesley. p. 344. ISBN 978-0-321-12742-6.
  5. Bloch, Joshua (2008). "Item 37: Use marker interfaces to define types". Effective Java (Second edition). Addison-Wesley. p. 179. ISBN 978-0-321-35668-0.