SlideShare a Scribd company logo
1 of 15
Design Pattern Prototype
Author:
Vladislav Akulich
QA automation
Coherent Solutions
Minsk 2014
1
Overview
Prototype is a creational pattern.
This pattern encapsulate the knowledge
about which classes a system users, but
they hide the details of how the instances
of these classes are created and put
together.
2
Intent
Specify the kind of objects to create using
a prototypical instance, and create new objects
by copying this prototype.
3
Applicability
4
• When the classes to instance are
specified at run-time, for example, by
dynamic loading
• To avoid building a class hierarchy of
factories that parallels the class
hierarchy of products
• When instance of a class can have one
of only a few different combinations of
state.
UML Diagram
5
Participant
• Prototype
–Declares an interface for cloning itself
• Concrete Prototype
–Implements an operation for cloning itself
• Client
–Creates a new object by asking a prototype
to clone itself
6
Consequences
• Adding and removing products at run-time
• Specifying new objects by varying values
• Specifying new objects by varying structure
• Reduced subclassing
• Configuring an application with classes
dynamically
7
Copy options
• Deep Copy (implementation in user
code), but in some languages exist
functions which do it
• Simple object clone (standard
function MemberwiseClone())
8
Simple Copy
• C#
• Ruby
9
Deep Copy
C# Ruby
10
Related Patterns
Prototype and Abstract Factory are
competing patterns. They can also be used
together, however. An Abstract Factory might
store a set prototypes from which to clone and
return product objects.
Designs that make heavy use of the
Composite and Decorator patterns often can
benefit from Prototype as well.
11
Code example
Simple projects on:
• C#
• Ruby
12
Useful books
• C# 3.0 Design Patterns
• Gang of Four Design Patterns 4.0
• Code Complete Second Edition By Steve
Mcconnell
13
Useful links
• Ruby Best Practices:
http://blog.rubybestpractices.com/posts/gregory/059-
issue-25-creational-design-patterns.html
• Prototype design pattern C++ example:
http://www.ccplusplus.com/2012/01/prototype-design-
pattern-c-example.html
• Wikipedia:
http://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%BE%D1
%82%D0%BE%D1%82%D0%B8%D0%BF_(%D1%88%D0%B0
%D0%B1%D0%BB%D0%BE%D0%BD_%D0%BF%D1%80%D0
%BE%D0%B5%D0%BA%D1%82%D0%B8%D1%80%D0%BE%
D0%B2%D0%B0%D0%BD%D0%B8%D1%8F)
14
Thanks
Vladislav Akulich
ISsoft QA Engineer
VladislavAkulich@coherentsolutions.com
ISsoft Solutions
www.issoft.by

More Related Content

What's hot

Software Engineering - Spiral Model
Software Engineering - Spiral ModelSoftware Engineering - Spiral Model
Software Engineering - Spiral ModelBenedictArpon
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagramsbarney92
 
Designing applications with multimedia capabilities
Designing applications with multimedia capabilitiesDesigning applications with multimedia capabilities
Designing applications with multimedia capabilitiesK Senthil Kumar
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologiesAmith Tiwari
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns pptAman Jain
 
Object-Oriented Paradigm
Object-Oriented Paradigm Object-Oriented Paradigm
Object-Oriented Paradigm tamigayle
 
Reconstructing Software Architecture
Reconstructing Software ArchitectureReconstructing Software Architecture
Reconstructing Software ArchitectureHimanshu
 
Architecture design in software engineering
Architecture design in software engineeringArchitecture design in software engineering
Architecture design in software engineeringPreeti Mishra
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMd. Tanvir Hossain
 
Object Oriented Analysis (Coad-Yourdon)
Object Oriented Analysis (Coad-Yourdon)Object Oriented Analysis (Coad-Yourdon)
Object Oriented Analysis (Coad-Yourdon)Subash Khatiwada
 
Reusibility vs Extensibility in OOAD
Reusibility vs Extensibility in OOADReusibility vs Extensibility in OOAD
Reusibility vs Extensibility in OOADShivani Kapoor
 
Software Prototyping
Software PrototypingSoftware Prototyping
Software Prototypingdrjms
 
UML Architecture and Views
UML Architecture and ViewsUML Architecture and Views
UML Architecture and ViewsKumar
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design PatternsAnton Keks
 

What's hot (20)

Software Engineering - Spiral Model
Software Engineering - Spiral ModelSoftware Engineering - Spiral Model
Software Engineering - Spiral Model
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Designing applications with multimedia capabilities
Designing applications with multimedia capabilitiesDesigning applications with multimedia capabilities
Designing applications with multimedia capabilities
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
 
Object-Oriented Paradigm
Object-Oriented Paradigm Object-Oriented Paradigm
Object-Oriented Paradigm
 
Reconstructing Software Architecture
Reconstructing Software ArchitectureReconstructing Software Architecture
Reconstructing Software Architecture
 
Deployment Diagram
Deployment DiagramDeployment Diagram
Deployment Diagram
 
Architecture design in software engineering
Architecture design in software engineeringArchitecture design in software engineering
Architecture design in software engineering
 
Slides chapters 26-27
Slides chapters 26-27Slides chapters 26-27
Slides chapters 26-27
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Low Level Design
Low Level DesignLow Level Design
Low Level Design
 
CS3391 OOP UT-I T3 FEATURES OF OBJECT ORIENTED PROGRAMMING
CS3391 OOP UT-I T3 FEATURES OF OBJECT ORIENTED PROGRAMMINGCS3391 OOP UT-I T3 FEATURES OF OBJECT ORIENTED PROGRAMMING
CS3391 OOP UT-I T3 FEATURES OF OBJECT ORIENTED PROGRAMMING
 
Object Oriented Analysis (Coad-Yourdon)
Object Oriented Analysis (Coad-Yourdon)Object Oriented Analysis (Coad-Yourdon)
Object Oriented Analysis (Coad-Yourdon)
 
Reusibility vs Extensibility in OOAD
Reusibility vs Extensibility in OOADReusibility vs Extensibility in OOAD
Reusibility vs Extensibility in OOAD
 
Software Prototyping
Software PrototypingSoftware Prototyping
Software Prototyping
 
Grasp
GraspGrasp
Grasp
 
UML Architecture and Views
UML Architecture and ViewsUML Architecture and Views
UML Architecture and Views
 
Slides chapters 13-14
Slides chapters 13-14Slides chapters 13-14
Slides chapters 13-14
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design Patterns
 

Viewers also liked

Prototype Pattern
Prototype PatternPrototype Pattern
Prototype PatternIder Zheng
 
Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder paramisoft
 
Developing and Marketing a new business idea
Developing and Marketing a new business ideaDeveloping and Marketing a new business idea
Developing and Marketing a new business ideaSummitup Marketing
 
New Business Idea
New Business IdeaNew Business Idea
New Business IdeaLana
 
Turning Your Idea Into A Business
Turning Your Idea Into A BusinessTurning Your Idea Into A Business
Turning Your Idea Into A Businessnzangels
 
How to pitch a startup
How to pitch a startup How to pitch a startup
How to pitch a startup James Kennedy
 
New business idea(oorja)
New business idea(oorja)New business idea(oorja)
New business idea(oorja)Tanya Chaudhary
 
CSS Lessons Learned the Hard Way (ConvergeSE)
CSS Lessons Learned the Hard Way (ConvergeSE)CSS Lessons Learned the Hard Way (ConvergeSE)
CSS Lessons Learned the Hard Way (ConvergeSE)Zoe Gillenwater
 
Custom Post Type and Taxonomies in WordPress 3.x
Custom Post Type and Taxonomies in WordPress 3.xCustom Post Type and Taxonomies in WordPress 3.x
Custom Post Type and Taxonomies in WordPress 3.xAmit Kumar Singh
 
Css part2
Css part2Css part2
Css part2ISsoft
 
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"Yandex
 
Верстка_Лекция1
Верстка_Лекция1Верстка_Лекция1
Верстка_Лекция1itc73
 
Uwe usability evaluation
Uwe usability evaluationUwe usability evaluation
Uwe usability evaluationLon Barfield
 
WordPress as Rapid Prototyping Tool
WordPress as Rapid Prototyping ToolWordPress as Rapid Prototyping Tool
WordPress as Rapid Prototyping ToolAmit Kumar Singh
 
Joomla Request To Response
Joomla Request To ResponseJoomla Request To Response
Joomla Request To ResponseAmit Kumar Singh
 

Viewers also liked (20)

Prototype Pattern
Prototype PatternPrototype Pattern
Prototype Pattern
 
Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder Desing pattern prototype-Factory Method, Prototype and Builder
Desing pattern prototype-Factory Method, Prototype and Builder
 
Design Patterns and Usage
Design Patterns and UsageDesign Patterns and Usage
Design Patterns and Usage
 
Developing and Marketing a new business idea
Developing and Marketing a new business ideaDeveloping and Marketing a new business idea
Developing and Marketing a new business idea
 
New Business Idea
New Business IdeaNew Business Idea
New Business Idea
 
An idea for food lover
An idea for food lover An idea for food lover
An idea for food lover
 
Turning Your Idea Into A Business
Turning Your Idea Into A BusinessTurning Your Idea Into A Business
Turning Your Idea Into A Business
 
How to pitch a startup
How to pitch a startup How to pitch a startup
How to pitch a startup
 
Virtual box
Virtual boxVirtual box
Virtual box
 
New business idea(oorja)
New business idea(oorja)New business idea(oorja)
New business idea(oorja)
 
CSS Lessons Learned the Hard Way (ConvergeSE)
CSS Lessons Learned the Hard Way (ConvergeSE)CSS Lessons Learned the Hard Way (ConvergeSE)
CSS Lessons Learned the Hard Way (ConvergeSE)
 
Custom Post Type and Taxonomies in WordPress 3.x
Custom Post Type and Taxonomies in WordPress 3.xCustom Post Type and Taxonomies in WordPress 3.x
Custom Post Type and Taxonomies in WordPress 3.x
 
How Joomla Works
How Joomla WorksHow Joomla Works
How Joomla Works
 
Css part2
Css part2Css part2
Css part2
 
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
 
Верстка_Лекция1
Верстка_Лекция1Верстка_Лекция1
Верстка_Лекция1
 
Uwe usability evaluation
Uwe usability evaluationUwe usability evaluation
Uwe usability evaluation
 
WordPress as Rapid Prototyping Tool
WordPress as Rapid Prototyping ToolWordPress as Rapid Prototyping Tool
WordPress as Rapid Prototyping Tool
 
Php Security
Php SecurityPhp Security
Php Security
 
Joomla Request To Response
Joomla Request To ResponseJoomla Request To Response
Joomla Request To Response
 

Similar to Prototype presentation

Creational Design Patterns.pptx
Creational Design Patterns.pptxCreational Design Patterns.pptx
Creational Design Patterns.pptxSachin Patidar
 
Design patterns
Design patternsDesign patterns
Design patternsAlok Guha
 
Desing Patterns Summary - by Jim Fawcett
Desing Patterns Summary - by Jim FawcettDesing Patterns Summary - by Jim Fawcett
Desing Patterns Summary - by Jim FawcettDareen Alhiyari
 
Effective java
Effective javaEffective java
Effective javaEmprovise
 
Object Oriented Prograring(OOP) java
Object Oriented Prograring(OOP) javaObject Oriented Prograring(OOP) java
Object Oriented Prograring(OOP) javaGaddafiAdamu1
 
Creational Patterns
Creational PatternsCreational Patterns
Creational PatternsAsma CHERIF
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)stanbridge
 
P Training Presentation
P Training PresentationP Training Presentation
P Training PresentationGaurav Tyagi
 
Creating and destroying objects
Creating and destroying objectsCreating and destroying objects
Creating and destroying objectsSandeep Chawla
 
Design pattern and their application
Design pattern and their applicationDesign pattern and their application
Design pattern and their applicationHiệp Tiến
 
Nodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design PatternNodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design PatternTalentica Software
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2Julie Iskander
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxanguraju1
 
PresentationPatterns_v2
PresentationPatterns_v2PresentationPatterns_v2
PresentationPatterns_v2Maksym Tolstik
 
06 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_0806 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_08Niit Care
 

Similar to Prototype presentation (20)

Creational Design Patterns.pptx
Creational Design Patterns.pptxCreational Design Patterns.pptx
Creational Design Patterns.pptx
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Desing Patterns Summary - by Jim Fawcett
Desing Patterns Summary - by Jim FawcettDesing Patterns Summary - by Jim Fawcett
Desing Patterns Summary - by Jim Fawcett
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
Effective java
Effective javaEffective java
Effective java
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Object Oriented Prograring(OOP) java
Object Oriented Prograring(OOP) javaObject Oriented Prograring(OOP) java
Object Oriented Prograring(OOP) java
 
Creational Patterns
Creational PatternsCreational Patterns
Creational Patterns
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)
 
P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
AngularJS
AngularJSAngularJS
AngularJS
 
Creating and destroying objects
Creating and destroying objectsCreating and destroying objects
Creating and destroying objects
 
Design Patterns - GOF
Design Patterns - GOFDesign Patterns - GOF
Design Patterns - GOF
 
Design pattern and their application
Design pattern and their applicationDesign pattern and their application
Design pattern and their application
 
Nodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design PatternNodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design Pattern
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
 
PresentationPatterns_v2
PresentationPatterns_v2PresentationPatterns_v2
PresentationPatterns_v2
 
06 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_0806 iec t1_s1_oo_ps_session_08
06 iec t1_s1_oo_ps_session_08
 
Design_Patterns_Dr.CM.ppt
Design_Patterns_Dr.CM.pptDesign_Patterns_Dr.CM.ppt
Design_Patterns_Dr.CM.ppt
 

More from ISsoft

Sql инъекции в тестировании
Sql инъекции в тестированииSql инъекции в тестировании
Sql инъекции в тестированииISsoft
 
введение в практическую разработку по в Is soft 4-1 and 4-2 clients and commu...
введение в практическую разработку по в Is soft 4-1 and 4-2 clients and commu...введение в практическую разработку по в Is soft 4-1 and 4-2 clients and commu...
введение в практическую разработку по в Is soft 4-1 and 4-2 clients and commu...ISsoft
 
Testing of mobile apps
Testing of mobile appsTesting of mobile apps
Testing of mobile appsISsoft
 
Testing, qa, qc. what the difference
Testing, qa, qc. what the differenceTesting, qa, qc. what the difference
Testing, qa, qc. what the differenceISsoft
 
Ranorex presentation
Ranorex presentationRanorex presentation
Ranorex presentationISsoft
 
Bdd j behave or cucumber jvm plus appium for efficient cross platform mobile ...
Bdd j behave or cucumber jvm plus appium for efficient cross platform mobile ...Bdd j behave or cucumber jvm plus appium for efficient cross platform mobile ...
Bdd j behave or cucumber jvm plus appium for efficient cross platform mobile ...ISsoft
 
Bdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проектеBdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проектеISsoft
 
Тестирование требований
Тестирование требованийТестирование требований
Тестирование требованийISsoft
 
Тестирование требований
Тестирование требованийТестирование требований
Тестирование требованийISsoft
 
Sql practise for beginners
Sql practise for beginnersSql practise for beginners
Sql practise for beginnersISsoft
 
Отдел юзабилити
Отдел юзабилитиОтдел юзабилити
Отдел юзабилитиISsoft
 
ToDoList
ToDoListToDoList
ToDoListISsoft
 
решение основной проблемы Agile (scrum) проектов в контексте ba
решение основной проблемы Agile (scrum) проектов в контексте baрешение основной проблемы Agile (scrum) проектов в контексте ba
решение основной проблемы Agile (scrum) проектов в контексте baISsoft
 
решение одной из ключевых проблем компетенции Ba специалистов
решение одной из ключевых проблем компетенции Ba специалистоврешение одной из ключевых проблем компетенции Ba специалистов
решение одной из ключевых проблем компетенции Ba специалистовISsoft
 
Development of automated tests for ext js based web sites
Development of automated tests for ext js based web sitesDevelopment of automated tests for ext js based web sites
Development of automated tests for ext js based web sitesISsoft
 
Bdd or dsl как способ построения коммуникации на проекте
Bdd or dsl как способ построения коммуникации на проектеBdd or dsl как способ построения коммуникации на проекте
Bdd or dsl как способ построения коммуникации на проектеISsoft
 
инфотекс автоматизация тестирования
инфотекс   автоматизация тестированияинфотекс   автоматизация тестирования
инфотекс автоматизация тестированияISsoft
 
Sikuli script
Sikuli scriptSikuli script
Sikuli scriptISsoft
 

More from ISsoft (20)

Sql инъекции в тестировании
Sql инъекции в тестированииSql инъекции в тестировании
Sql инъекции в тестировании
 
введение в практическую разработку по в Is soft 4-1 and 4-2 clients and commu...
введение в практическую разработку по в Is soft 4-1 and 4-2 clients and commu...введение в практическую разработку по в Is soft 4-1 and 4-2 clients and commu...
введение в практическую разработку по в Is soft 4-1 and 4-2 clients and commu...
 
Testing of mobile apps
Testing of mobile appsTesting of mobile apps
Testing of mobile apps
 
Testing, qa, qc. what the difference
Testing, qa, qc. what the differenceTesting, qa, qc. what the difference
Testing, qa, qc. what the difference
 
Ranorex presentation
Ranorex presentationRanorex presentation
Ranorex presentation
 
Bugs
BugsBugs
Bugs
 
Bdd j behave or cucumber jvm plus appium for efficient cross platform mobile ...
Bdd j behave or cucumber jvm plus appium for efficient cross platform mobile ...Bdd j behave or cucumber jvm plus appium for efficient cross platform mobile ...
Bdd j behave or cucumber jvm plus appium for efficient cross platform mobile ...
 
Bdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проектеBdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проекте
 
Тестирование требований
Тестирование требованийТестирование требований
Тестирование требований
 
Тестирование требований
Тестирование требованийТестирование требований
Тестирование требований
 
Sql practise for beginners
Sql practise for beginnersSql practise for beginners
Sql practise for beginners
 
Отдел юзабилити
Отдел юзабилитиОтдел юзабилити
Отдел юзабилити
 
ToDoList
ToDoListToDoList
ToDoList
 
ISTQB
ISTQBISTQB
ISTQB
 
решение основной проблемы Agile (scrum) проектов в контексте ba
решение основной проблемы Agile (scrum) проектов в контексте baрешение основной проблемы Agile (scrum) проектов в контексте ba
решение основной проблемы Agile (scrum) проектов в контексте ba
 
решение одной из ключевых проблем компетенции Ba специалистов
решение одной из ключевых проблем компетенции Ba специалистоврешение одной из ключевых проблем компетенции Ba специалистов
решение одной из ключевых проблем компетенции Ba специалистов
 
Development of automated tests for ext js based web sites
Development of automated tests for ext js based web sitesDevelopment of automated tests for ext js based web sites
Development of automated tests for ext js based web sites
 
Bdd or dsl как способ построения коммуникации на проекте
Bdd or dsl как способ построения коммуникации на проектеBdd or dsl как способ построения коммуникации на проекте
Bdd or dsl как способ построения коммуникации на проекте
 
инфотекс автоматизация тестирования
инфотекс   автоматизация тестированияинфотекс   автоматизация тестирования
инфотекс автоматизация тестирования
 
Sikuli script
Sikuli scriptSikuli script
Sikuli script
 

Recently uploaded

H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 

Recently uploaded (20)

H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 

Prototype presentation

  • 1. Design Pattern Prototype Author: Vladislav Akulich QA automation Coherent Solutions Minsk 2014 1
  • 2. Overview Prototype is a creational pattern. This pattern encapsulate the knowledge about which classes a system users, but they hide the details of how the instances of these classes are created and put together. 2
  • 3. Intent Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype. 3
  • 4. Applicability 4 • When the classes to instance are specified at run-time, for example, by dynamic loading • To avoid building a class hierarchy of factories that parallels the class hierarchy of products • When instance of a class can have one of only a few different combinations of state.
  • 6. Participant • Prototype –Declares an interface for cloning itself • Concrete Prototype –Implements an operation for cloning itself • Client –Creates a new object by asking a prototype to clone itself 6
  • 7. Consequences • Adding and removing products at run-time • Specifying new objects by varying values • Specifying new objects by varying structure • Reduced subclassing • Configuring an application with classes dynamically 7
  • 8. Copy options • Deep Copy (implementation in user code), but in some languages exist functions which do it • Simple object clone (standard function MemberwiseClone()) 8
  • 11. Related Patterns Prototype and Abstract Factory are competing patterns. They can also be used together, however. An Abstract Factory might store a set prototypes from which to clone and return product objects. Designs that make heavy use of the Composite and Decorator patterns often can benefit from Prototype as well. 11
  • 12. Code example Simple projects on: • C# • Ruby 12
  • 13. Useful books • C# 3.0 Design Patterns • Gang of Four Design Patterns 4.0 • Code Complete Second Edition By Steve Mcconnell 13
  • 14. Useful links • Ruby Best Practices: http://blog.rubybestpractices.com/posts/gregory/059- issue-25-creational-design-patterns.html • Prototype design pattern C++ example: http://www.ccplusplus.com/2012/01/prototype-design- pattern-c-example.html • Wikipedia: http://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%BE%D1 %82%D0%BE%D1%82%D0%B8%D0%BF_(%D1%88%D0%B0 %D0%B1%D0%BB%D0%BE%D0%BD_%D0%BF%D1%80%D0 %BE%D0%B5%D0%BA%D1%82%D0%B8%D1%80%D0%BE% D0%B2%D0%B0%D0%BD%D0%B8%D1%8F) 14
  • 15. Thanks Vladislav Akulich ISsoft QA Engineer VladislavAkulich@coherentsolutions.com ISsoft Solutions www.issoft.by