1 / 18

Construction and Cloning

Construction and Cloning. Kirk Scott. Adonis From Wikipedia, the free encyclopedia Jump to: navigation , search For the Syrian poet, see Adunis . For other uses, see Adonis (disambiguation) .

yasuo
Download Presentation

Construction and Cloning

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Construction and Cloning Kirk Scott

  2. Adonis • From Wikipedia, the free encyclopedia • Jump to: navigation, search • For the Syrian poet, see Adunis. • For other uses, see Adonis (disambiguation).

  3. Adonis, in Greek mythology, is the god of beauty and desire, and is a central figure in various mystery religions. His religion belonged to women: the dying of Adonis was fully developed in the circle of young girls around the poet Sappho from the island of Lesbos, about 600 BC, as revealed in a fragment of Sappho's surviving poetry.[1]

  4. Adonis is one of the most complex figures in classical times. He has had multiple roles, and there has been much scholarship over the centuries concerning his meaning and purpose in Greek religious beliefs. He is an annually-renewed, ever-youthful vegetation god, a life-death-rebirth deity whose nature is tied to the calendar. His name is often applied in modern times to handsome youths, of whom he is the archetype. Adonis is often referred to as the mortal god of Beauty.

  5. Kylix (6th century BC) depicting Dionysus among the sailors transformed to dolphins after attempting to kidnap him

  6. This is an introductory unit. • These are the units/chapters belonging to this section of the course: • Unit 3, Singleton, book chapter 8. • Unit 4, Prototype, book chapter 18. • Unit 5, Builder, book chapter 15. • Unit 6, Proxy, book chapter 11.

  7. What will be given next is an extremely brief overview of these topics. • The idea is to show that according to the organizational scheme for the course, they can be treated as belonging together, even though the book’s organizational scheme put them into chapters that were separated from each other.

  8. Singleton • Book definition: • The intent of the Singleton pattern is to ensure that a class has only one instance and to provide a global point of access to it. • Comment mode on: • In other words, the singleton design pattern puts a constraint on the construction of objects.

  9. Prototype • Book definition: • The intent of the Prototype pattern is to provide new objects by copying an example rather than by bringing forth new, uninitialized instances of a class. • Comment mode on: • In other words, the prototype design pattern bases the construction of a new object on an already existing object.

  10. Builder • Book definition: • The intent of the Builder pattern is to move the construction logic for an object outside the class to be instantiated. • Comment mode on: • In other words, the builder design pattern moves the logic and code of construction into another class which becomes responsible for generating instances of a given class.

  11. Proxy • Book definition: • The intent of the Proxy pattern is to control access to an object by providing a surrogate, or placeholder, for it. • Comment mode on: • In other words, the proxy design pattern provides a stand-in for a desired object

  12. Client code has access to the stand-in while a reference to the desired object is being obtained, for example, whether through construction or from an external source. • Even after a reference to the desired object is obtained, client code may continue to use the proxy as the “interface” to that object

  13. In summary: • Singleton puts a constraint on construction. • Prototype basically means making a copy method and is closely related to cloning. • Builder puts the responsibility for construction into an outside class. • Proxy substitutes one object for another, desired object.

  14. In one way or another, these patterns all have something to do with cloning or construction • More specifically, they have to do with replacing simple construction with something else which also provides a reference to an object meeting the needs of the code.

  15. These are concise mnemonic devices for these design patterns: • Singleton: One to a customer. • Prototype: Partial copy. • Builder: Offload and delay construction. • Proxy: Placeholder or stand-in.

  16. The End

More Related