Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Software design pattern
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== [[Creational patterns]] === {| class="wikitable" |- ! Name ! Description ! In ''[[Design Patterns]]'' ! In ''[[Code Complete]]''<ref name="McConnell2004">{{cite book | title = Code Complete | first = Steve | last = McConnell | author-link = Steve McConnell |date=June 2004 | publisher = [[Microsoft Press]] | isbn = 978-0-7356-1967-8 | chapter = Design in Construction | quote = Table 5.1 Popular Design Patterns | edition = 2nd | page = [https://archive.org/details/codecomplete0000mcco/page/104 104] | title-link = Code Complete }}</ref> ! Other |- | [[Abstract factory]] | Provide an interface for creating ''families'' of related or dependent objects without specifying their concrete classes. | {{yes}} | {{yes}} | {{n/a}} |- | [[Builder pattern|Builder]] | Separate the construction of a complex object from its representation, allowing the same construction process to create various representations. | {{yes}} | {{yes}} | {{n/a}} |- | [[Dependency Injection]] | A class accepts the objects it requires from an injector instead of creating the objects directly. | {{n/a}} | {{yes}} | {{n/a}} |- | [[Factory method]] | 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. | {{yes}} | {{yes}} | {{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|Proxy]] pattern. | {{yes}} | {{yes}} | {{yes|{{abbr|PoEAA|Patterns of Enterprise Application Architecture}}<ref name = "PoEAA"> {{cite book | first = Martin | last = Fowler | author-link = Martin Fowler (software engineer) | year = 2002 | title = Patterns of Enterprise Application Architecture | publisher = [[Addison-Wesley]] | isbn = 978-0-321-12742-6 | url = http://martinfowler.com/books.html#eaa }}</ref>}} |- | [[Multiton]] | Ensure a class has only named instances, and provide a global point of access to them. | {{yes}} | {{yes}} | {{yes}} |- | [[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. | {{yes}} | {{yes}} | {{yes}} |- | [[Prototype pattern|Prototype]] | 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. | {{yes}} | {{yes}} | {{yes}} |- | [[Resource acquisition is initialization]] (RAII) | Ensure that resources are properly released by tying them to the lifespan of suitable objects. | {{yes}} | {{yes}} | {{yes}} |- | [[Singleton pattern|Singleton]] | Ensure a class has only one instance, and provide a global point of access to it. | {{yes}} | {{yes}} | {{yes}} |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)