SlideShare a Scribd company logo
1 of 18
DESIGN PATTERN
DESIGN PATTERN
• A design pattern is “a generalized solution to a commonly occurring
problem.”
• A design pattern is away of organizing a design that improves the
optimality of a design with respect to one or a small set of design
criteria, such as qualities of service(QoS).
• A design pattern always has a focused purpose–which is to take one or
a small set of these QoS properties and optimize them at the expense
of the others. Each pattern optimizes some aspect of a system at the
cost of deoptimizing some other aspects. These constitute a set of pros
and cons.
BASIC STRUCTURE OF DESIGN PATTERNS
• Name: The name provides a “handle” or means to reference the
pattern.
• Purpose: The purpose provides the problem context and the QoS
aspects the pattern seeks to optimize. The purpose identifies the kinds
of problem contexts where the pattern might be particularly
appropriate.
• Solution: The solution is the pattern itself.
• Consequences: The consequences are the set of pros and cons of the
use of the pattern.
NAME
• The pattern name brings us two things. First, it allows us to reference
the pattern in a clear, unambiguous way, with the details present, but
unstated.
• Secondly, it gives us a more abstract vocabulary to speak about our
designs.
• The statement “The system uses a Homogeneous Channel redundant
architecture with Cyclic Executive Concurrency distributed across a
set of processors with a Proxy Pattern” has a lot of information about
the overall structure of the system because we can discuss the
architecture in terms of these patterns.
PURPOSE
• The statement “The system uses a Homogeneous Channel redundant
architecture with Cyclic Executive Concurrency distributed across a
set of processors with a Proxy Pattern” has a lot of information about
the overall structure of the system because we can discuss the
architecture in terms of these patterns.
SOLUTION
• The solution specifies the structure and behavior of the pattern itself. It
identifies the elements of the pattern and their roles in the context of
the pattern.
• This pattern solution is integrated into your design in a process known
as pattern instantiation.
CONSEQUENCES
• The consequences are important because we always make trade offs
when we select one pattern over another.
• We must understand the pros and cons of the pattern to apply it
effectively.
• The pros and cons are usually couched in terms of improvement or
degradation of some design properties, as well as a possible
elaboration of problem contexts in which these consequences apply.
WHAT TO DO WHEN YOU’RE FACING DESIGN
PROBLEMS?
PATTERN HATCHING–LOCATING THE RIGHT
PATTERNS
• Familiarize yourself with the patterns: Before starting your design,
familiarize yourself with the patterns literature. Once you have increased
your vocabulary to include patterns likely to be relevant to your
application domain, you have more intellectual ammunition to face your
design challenges.
• Identify design criteria: In parallel with reading about potential design
alternatives, you must identify design criteria. This step identifies the
design optimizations that are important for this particular system in its
operational and development contexts.
• Rank design criteria: Not all optimizations are equally important.
For this reason, the design criteria must be ranked to enable good trade
off decisions to be made.
PATTERN HATCHING–LOCATING THE RIGHT
PATTERNS
• Identify potential design alternatives: This step finds patterns that
optimize the design criteria of importance at a cost that seems
reasonable. While it is possible to add a single pattern at a time in this
way and repeat the work flow, it is also common to consider a set of
compatible patterns together as a single design alternative.
• Evaluate the design alternatives: Using the trade study approach
suggested earlier, this step compares the design alternatives (consisting
of one or more design patterns) against each other on the basis of their
effectiveness against the design criteria, weighted with the relative
importance of each.
PATTERN HATCHING–LOCATING THE RIGHT
PATTERNS
• Select and apply design alternative: Once a design alternative is
selected, the patterns are usually added to the collaboration one at a
time, including verification of the efficacy of the solution.
• Verify design functionality: The collaboration of software elements
worked before applying the design patterns. This task ensures that it
still does.
• Verify design goals are met: Once the design functionality is verified,
we must also ensure that the optimization goals of the design decisions
result in the right trade offs. If we’ve optimized the code for memory
usage, the usage should be measured as the software runs.
PATTERN HATCHING–LOCATING THE RIGHT
PATTERNS
PATTERN MINING-ROLLING YOUR OWN
PATTERNS
• Creating your own pattern is
useful, especially when you have
a depth of experience to
understand the optimization
issues in a particular area, and
sufficient breadth to understand
the general properties of the
solutions enough to abstract them
in to a generalized solution.
• This is called pattern mining.
PATTERN INSTANTIATION–APPLYING
PATTERNS IN YOUR DESIGNS
• Pattern instantiation is the opposite of
pattern mining. It is applying the pattern to
a particular collaboration to gain the
benefits of the pattern.
• Patterns are normally applied to a
collaboration of software elements, such as
classes, types, functions, and/or variables.
• The application or instantiation of a pattern
in your design is a matter of identifying the
elements in your collaboration that fulfill
the pattern parameter roles.
AN EXAMPLE: DEBOUNCING PATTERN
• Abstract: Push buttons, toggle switches, and electromechanical relays are
input devices for digital systems that share a common problem–as metal
connections make contact, the metal deforms or “bounces”, producing
intermittent connections during switch open or closure. This pattern
addresses this concern by reducing the multiple signals into a single one
by waiting a period of time after the initial signal and then checking the
state.
• Problem: As the metal in input devices, used for embedded systems,
moves into contact, physical deformation occurs resulting in an
intermittent bouncing contact until the vibrations dampen down.
AN EXAMPLE: DEBOUNCING PATTERN
• Pattern Structure: The basic solution is to accept the initial event, wait
for the vibrations to dampen out, and then sample the data source for its
state.
AN EXAMPLE: DEBOUNCING PATTERN
• Collaboration Roles:
1. Application Client: This element is the ultimate recipient of the debounced
event. Its operation deviceEventReceive() is only activated when the event is
real (i.e., results in a changed device state).
2. Bouncing Device: The Bouncing Device represents the hardware for the device
itself. The most common implementation of this device is completely in
hardware.
3. Debouncer: The Debouncer is the software element that processes the
incoming event, debounces it, and makes sure that it represents an actual device
state change.
4. Debouncing Timer: This timer provides an on busy wait via its delay() service.
This is often done with an OS call but might be done with specialty timer
hardware as well.
AN EXAMPLE: DEBOUNCING PATTERN
• Consequences: This pattern is not necessary for hardware that debounces before
announcing events. In my experience, however, it often falls on the software to
perform this task. This is a simple pattern that performs the debouncing so that the
application need only concern itself with true events resulting from a change in
device state.
• Implementation Strategies: It is common for the device to use an interrupt
vector to contact its client. It is common for the Bouncing Device to be entirely
implemented in hardware so that when the event occurs, a hardware interrupt is
created, and the device state must be verified by reading a memory location or
portaddress. When the event interface is via an interrupt, the address of the
DeviceClient::eventReceive() operation must be installed in the proper location in
the interrupt vector table when the DeviceClient is initiated.
AN EXAMPLE: DEBOUNCING PATTERN
EXAMPLE:

More Related Content

Similar to DESIGN PATTERN.pptx

Generic Software Process Models
Generic Software Process ModelsGeneric Software Process Models
Generic Software Process ModelsEducation Front
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentnikhil sreeni
 
Requirement analysis and specification, software engineering
Requirement analysis and specification, software engineeringRequirement analysis and specification, software engineering
Requirement analysis and specification, software engineeringRupesh Vaishnav
 
UNIT-4design-concepts-se-pressman-ppt.PPT
UNIT-4design-concepts-se-pressman-ppt.PPTUNIT-4design-concepts-se-pressman-ppt.PPT
UNIT-4design-concepts-se-pressman-ppt.PPTmalathijanapati1
 
Unified modeling language basics and slides
Unified modeling language basics and slidesUnified modeling language basics and slides
Unified modeling language basics and slidesvenkatasubramanianSr5
 
'A critique of testing' UK TMF forum January 2015
'A critique of testing' UK TMF forum January 2015 'A critique of testing' UK TMF forum January 2015
'A critique of testing' UK TMF forum January 2015 Georgina Tilby
 
Aspect Oriented Programming - AOP/AOSD
Aspect Oriented Programming - AOP/AOSDAspect Oriented Programming - AOP/AOSD
Aspect Oriented Programming - AOP/AOSDCan R. PAHALI
 
Process model rup
Process model rupProcess model rup
Process model rupAryan Ajmer
 
software Engineering process
software Engineering processsoftware Engineering process
software Engineering processRaheel Aslam
 
Design Principlesfrom Don Norman’s Design of Everyday Thing.docx
Design Principlesfrom Don Norman’s Design of Everyday Thing.docxDesign Principlesfrom Don Norman’s Design of Everyday Thing.docx
Design Principlesfrom Don Norman’s Design of Everyday Thing.docxtheodorelove43763
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptRushikeshChikane1
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptRushikeshChikane2
 
Design Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxKarthigaiSelviS3
 

Similar to DESIGN PATTERN.pptx (20)

Software Design Concepts
Software Design ConceptsSoftware Design Concepts
Software Design Concepts
 
Generic Software Process Models
Generic Software Process ModelsGeneric Software Process Models
Generic Software Process Models
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Requirement analysis and specification, software engineering
Requirement analysis and specification, software engineeringRequirement analysis and specification, software engineering
Requirement analysis and specification, software engineering
 
UNIT-4design-concepts-se-pressman-ppt.PPT
UNIT-4design-concepts-se-pressman-ppt.PPTUNIT-4design-concepts-se-pressman-ppt.PPT
UNIT-4design-concepts-se-pressman-ppt.PPT
 
Development Guideline
Development GuidelineDevelopment Guideline
Development Guideline
 
Pawan111
Pawan111Pawan111
Pawan111
 
Unified modeling language basics and slides
Unified modeling language basics and slidesUnified modeling language basics and slides
Unified modeling language basics and slides
 
Chapter 6 design
Chapter 6 designChapter 6 design
Chapter 6 design
 
Requirements analysis lecture
Requirements analysis lectureRequirements analysis lecture
Requirements analysis lecture
 
'A critique of testing' UK TMF forum January 2015
'A critique of testing' UK TMF forum January 2015 'A critique of testing' UK TMF forum January 2015
'A critique of testing' UK TMF forum January 2015
 
Aspect Oriented Programming - AOP/AOSD
Aspect Oriented Programming - AOP/AOSDAspect Oriented Programming - AOP/AOSD
Aspect Oriented Programming - AOP/AOSD
 
Process model rup
Process model rupProcess model rup
Process model rup
 
software Engineering process
software Engineering processsoftware Engineering process
software Engineering process
 
Design Principlesfrom Don Norman’s Design of Everyday Thing.docx
Design Principlesfrom Don Norman’s Design of Everyday Thing.docxDesign Principlesfrom Don Norman’s Design of Everyday Thing.docx
Design Principlesfrom Don Norman’s Design of Everyday Thing.docx
 
module 1.pptx
module 1.pptxmodule 1.pptx
module 1.pptx
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.ppt
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.ppt
 
Design Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptx
 
SW Project Process.pptx
SW Project Process.pptxSW Project Process.pptx
SW Project Process.pptx
 

More from SKUP1

serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptxSKUP1
 
INTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxINTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxSKUP1
 
DATA STRUCTURES AND LINKED LISTS IN C.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptxDATA STRUCTURES AND LINKED LISTS IN C.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptxSKUP1
 
C-Programming File-handling-C.pptx
C-Programming  File-handling-C.pptxC-Programming  File-handling-C.pptx
C-Programming File-handling-C.pptxSKUP1
 
Processes, Threads.pptx
Processes, Threads.pptxProcesses, Threads.pptx
Processes, Threads.pptxSKUP1
 
C-Programming Control statements.pptx
C-Programming Control statements.pptxC-Programming Control statements.pptx
C-Programming Control statements.pptxSKUP1
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptxSKUP1
 
FUNCTIONS IN C.pptx
FUNCTIONS IN C.pptxFUNCTIONS IN C.pptx
FUNCTIONS IN C.pptxSKUP1
 
cprogramming strings.pptx
cprogramming strings.pptxcprogramming strings.pptx
cprogramming strings.pptxSKUP1
 
UNIONS IN C.pptx
UNIONS IN C.pptxUNIONS IN C.pptx
UNIONS IN C.pptxSKUP1
 
OPERATORS IN C.pptx
OPERATORS IN C.pptxOPERATORS IN C.pptx
OPERATORS IN C.pptxSKUP1
 
cprogramming Structures.pptx
cprogramming Structures.pptxcprogramming Structures.pptx
cprogramming Structures.pptxSKUP1
 
C-Programming Function pointers.pptx
C-Programming  Function pointers.pptxC-Programming  Function pointers.pptx
C-Programming Function pointers.pptxSKUP1
 
POINTERS.pptx
POINTERS.pptxPOINTERS.pptx
POINTERS.pptxSKUP1
 
STACKS AND QUEUES.pptx
STACKS AND QUEUES.pptxSTACKS AND QUEUES.pptx
STACKS AND QUEUES.pptxSKUP1
 
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptx
C-Programming  C LIBRARIES AND USER DEFINED LIBRARIES.pptxC-Programming  C LIBRARIES AND USER DEFINED LIBRARIES.pptx
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptxSKUP1
 
C MEMORY MODEL​.pptx
C MEMORY MODEL​.pptxC MEMORY MODEL​.pptx
C MEMORY MODEL​.pptxSKUP1
 
DATATYPES,KEYWORDS,FORMATSPECS[1].pptx
DATATYPES,KEYWORDS,FORMATSPECS[1].pptxDATATYPES,KEYWORDS,FORMATSPECS[1].pptx
DATATYPES,KEYWORDS,FORMATSPECS[1].pptxSKUP1
 
DYNAMIC MEMORY ALLOCATION.pptx
DYNAMIC MEMORY ALLOCATION.pptxDYNAMIC MEMORY ALLOCATION.pptx
DYNAMIC MEMORY ALLOCATION.pptxSKUP1
 
COMPILATION PROCESS IN C.pptx
COMPILATION PROCESS IN C.pptxCOMPILATION PROCESS IN C.pptx
COMPILATION PROCESS IN C.pptxSKUP1
 

More from SKUP1 (20)

serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptx
 
INTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxINTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptx
 
DATA STRUCTURES AND LINKED LISTS IN C.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptxDATA STRUCTURES AND LINKED LISTS IN C.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptx
 
C-Programming File-handling-C.pptx
C-Programming  File-handling-C.pptxC-Programming  File-handling-C.pptx
C-Programming File-handling-C.pptx
 
Processes, Threads.pptx
Processes, Threads.pptxProcesses, Threads.pptx
Processes, Threads.pptx
 
C-Programming Control statements.pptx
C-Programming Control statements.pptxC-Programming Control statements.pptx
C-Programming Control statements.pptx
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptx
 
FUNCTIONS IN C.pptx
FUNCTIONS IN C.pptxFUNCTIONS IN C.pptx
FUNCTIONS IN C.pptx
 
cprogramming strings.pptx
cprogramming strings.pptxcprogramming strings.pptx
cprogramming strings.pptx
 
UNIONS IN C.pptx
UNIONS IN C.pptxUNIONS IN C.pptx
UNIONS IN C.pptx
 
OPERATORS IN C.pptx
OPERATORS IN C.pptxOPERATORS IN C.pptx
OPERATORS IN C.pptx
 
cprogramming Structures.pptx
cprogramming Structures.pptxcprogramming Structures.pptx
cprogramming Structures.pptx
 
C-Programming Function pointers.pptx
C-Programming  Function pointers.pptxC-Programming  Function pointers.pptx
C-Programming Function pointers.pptx
 
POINTERS.pptx
POINTERS.pptxPOINTERS.pptx
POINTERS.pptx
 
STACKS AND QUEUES.pptx
STACKS AND QUEUES.pptxSTACKS AND QUEUES.pptx
STACKS AND QUEUES.pptx
 
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptx
C-Programming  C LIBRARIES AND USER DEFINED LIBRARIES.pptxC-Programming  C LIBRARIES AND USER DEFINED LIBRARIES.pptx
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptx
 
C MEMORY MODEL​.pptx
C MEMORY MODEL​.pptxC MEMORY MODEL​.pptx
C MEMORY MODEL​.pptx
 
DATATYPES,KEYWORDS,FORMATSPECS[1].pptx
DATATYPES,KEYWORDS,FORMATSPECS[1].pptxDATATYPES,KEYWORDS,FORMATSPECS[1].pptx
DATATYPES,KEYWORDS,FORMATSPECS[1].pptx
 
DYNAMIC MEMORY ALLOCATION.pptx
DYNAMIC MEMORY ALLOCATION.pptxDYNAMIC MEMORY ALLOCATION.pptx
DYNAMIC MEMORY ALLOCATION.pptx
 
COMPILATION PROCESS IN C.pptx
COMPILATION PROCESS IN C.pptxCOMPILATION PROCESS IN C.pptx
COMPILATION PROCESS IN C.pptx
 

Recently uploaded

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 

Recently uploaded (20)

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 

DESIGN PATTERN.pptx

  • 2. DESIGN PATTERN • A design pattern is “a generalized solution to a commonly occurring problem.” • A design pattern is away of organizing a design that improves the optimality of a design with respect to one or a small set of design criteria, such as qualities of service(QoS). • A design pattern always has a focused purpose–which is to take one or a small set of these QoS properties and optimize them at the expense of the others. Each pattern optimizes some aspect of a system at the cost of deoptimizing some other aspects. These constitute a set of pros and cons.
  • 3. BASIC STRUCTURE OF DESIGN PATTERNS • Name: The name provides a “handle” or means to reference the pattern. • Purpose: The purpose provides the problem context and the QoS aspects the pattern seeks to optimize. The purpose identifies the kinds of problem contexts where the pattern might be particularly appropriate. • Solution: The solution is the pattern itself. • Consequences: The consequences are the set of pros and cons of the use of the pattern.
  • 4. NAME • The pattern name brings us two things. First, it allows us to reference the pattern in a clear, unambiguous way, with the details present, but unstated. • Secondly, it gives us a more abstract vocabulary to speak about our designs. • The statement “The system uses a Homogeneous Channel redundant architecture with Cyclic Executive Concurrency distributed across a set of processors with a Proxy Pattern” has a lot of information about the overall structure of the system because we can discuss the architecture in terms of these patterns.
  • 5. PURPOSE • The statement “The system uses a Homogeneous Channel redundant architecture with Cyclic Executive Concurrency distributed across a set of processors with a Proxy Pattern” has a lot of information about the overall structure of the system because we can discuss the architecture in terms of these patterns. SOLUTION • The solution specifies the structure and behavior of the pattern itself. It identifies the elements of the pattern and their roles in the context of the pattern. • This pattern solution is integrated into your design in a process known as pattern instantiation.
  • 6. CONSEQUENCES • The consequences are important because we always make trade offs when we select one pattern over another. • We must understand the pros and cons of the pattern to apply it effectively. • The pros and cons are usually couched in terms of improvement or degradation of some design properties, as well as a possible elaboration of problem contexts in which these consequences apply.
  • 7. WHAT TO DO WHEN YOU’RE FACING DESIGN PROBLEMS?
  • 8. PATTERN HATCHING–LOCATING THE RIGHT PATTERNS • Familiarize yourself with the patterns: Before starting your design, familiarize yourself with the patterns literature. Once you have increased your vocabulary to include patterns likely to be relevant to your application domain, you have more intellectual ammunition to face your design challenges. • Identify design criteria: In parallel with reading about potential design alternatives, you must identify design criteria. This step identifies the design optimizations that are important for this particular system in its operational and development contexts. • Rank design criteria: Not all optimizations are equally important. For this reason, the design criteria must be ranked to enable good trade off decisions to be made.
  • 9. PATTERN HATCHING–LOCATING THE RIGHT PATTERNS • Identify potential design alternatives: This step finds patterns that optimize the design criteria of importance at a cost that seems reasonable. While it is possible to add a single pattern at a time in this way and repeat the work flow, it is also common to consider a set of compatible patterns together as a single design alternative. • Evaluate the design alternatives: Using the trade study approach suggested earlier, this step compares the design alternatives (consisting of one or more design patterns) against each other on the basis of their effectiveness against the design criteria, weighted with the relative importance of each.
  • 10. PATTERN HATCHING–LOCATING THE RIGHT PATTERNS • Select and apply design alternative: Once a design alternative is selected, the patterns are usually added to the collaboration one at a time, including verification of the efficacy of the solution. • Verify design functionality: The collaboration of software elements worked before applying the design patterns. This task ensures that it still does. • Verify design goals are met: Once the design functionality is verified, we must also ensure that the optimization goals of the design decisions result in the right trade offs. If we’ve optimized the code for memory usage, the usage should be measured as the software runs.
  • 12. PATTERN MINING-ROLLING YOUR OWN PATTERNS • Creating your own pattern is useful, especially when you have a depth of experience to understand the optimization issues in a particular area, and sufficient breadth to understand the general properties of the solutions enough to abstract them in to a generalized solution. • This is called pattern mining.
  • 13. PATTERN INSTANTIATION–APPLYING PATTERNS IN YOUR DESIGNS • Pattern instantiation is the opposite of pattern mining. It is applying the pattern to a particular collaboration to gain the benefits of the pattern. • Patterns are normally applied to a collaboration of software elements, such as classes, types, functions, and/or variables. • The application or instantiation of a pattern in your design is a matter of identifying the elements in your collaboration that fulfill the pattern parameter roles.
  • 14. AN EXAMPLE: DEBOUNCING PATTERN • Abstract: Push buttons, toggle switches, and electromechanical relays are input devices for digital systems that share a common problem–as metal connections make contact, the metal deforms or “bounces”, producing intermittent connections during switch open or closure. This pattern addresses this concern by reducing the multiple signals into a single one by waiting a period of time after the initial signal and then checking the state. • Problem: As the metal in input devices, used for embedded systems, moves into contact, physical deformation occurs resulting in an intermittent bouncing contact until the vibrations dampen down.
  • 15. AN EXAMPLE: DEBOUNCING PATTERN • Pattern Structure: The basic solution is to accept the initial event, wait for the vibrations to dampen out, and then sample the data source for its state.
  • 16. AN EXAMPLE: DEBOUNCING PATTERN • Collaboration Roles: 1. Application Client: This element is the ultimate recipient of the debounced event. Its operation deviceEventReceive() is only activated when the event is real (i.e., results in a changed device state). 2. Bouncing Device: The Bouncing Device represents the hardware for the device itself. The most common implementation of this device is completely in hardware. 3. Debouncer: The Debouncer is the software element that processes the incoming event, debounces it, and makes sure that it represents an actual device state change. 4. Debouncing Timer: This timer provides an on busy wait via its delay() service. This is often done with an OS call but might be done with specialty timer hardware as well.
  • 17. AN EXAMPLE: DEBOUNCING PATTERN • Consequences: This pattern is not necessary for hardware that debounces before announcing events. In my experience, however, it often falls on the software to perform this task. This is a simple pattern that performs the debouncing so that the application need only concern itself with true events resulting from a change in device state. • Implementation Strategies: It is common for the device to use an interrupt vector to contact its client. It is common for the Bouncing Device to be entirely implemented in hardware so that when the event occurs, a hardware interrupt is created, and the device state must be verified by reading a memory location or portaddress. When the event interface is via an interrupt, the address of the DeviceClient::eventReceive() operation must be installed in the proper location in the interrupt vector table when the DeviceClient is initiated.
  • 18. AN EXAMPLE: DEBOUNCING PATTERN EXAMPLE: