The document discusses various design patterns, including structural patterns like the Composite pattern and behavioral patterns like the Strategy pattern. It provides examples of each pattern, explaining their structure, applicability, and consequences. It also covers the Singleton creational pattern and human interaction patterns such as "Go Back to a Safe Place". The document is intended to teach about design patterns and how they can be used to solve common programming problems.
This document outlines an agenda for a time management course. The course covers topics such as defining time management, deciding what tasks to complete and priorities, planning, procrastination, managing interruptions, and changing habits. It provides examples of workload categories and techniques for reducing firefighting, prioritizing deliverables, overcoming challenges to planning, reducing procrastination, managing telephone calls and filing. The overall goal is to help participants improve their productivity and ability to manage their time effectively.
This document provides an overview of innovation training for Intel's ISTG division. The objectives are to provide an understanding of innovation practices, information on ISTG's innovation investments and goals, and links to processes and tools. Key topics covered include definitions of innovation and systemic innovation, examples of radical, incremental and reapplied innovation, and why innovation is important for companies, employees and addressing competition. It also discusses ISTG's investments in innovation culture, funding, and tools. The document aims to help employees schedule time for innovative thinking and encourage risk-taking and new ideas.
The document discusses exercising positive control as the fifth step of the Management Task Cycle. It provides guidance on techniques for managers to effectively emphasize time, control details, apply goal pressure, and delegate tasks while avoiding becoming overly controlling. These include setting clear expectations and deadlines, regularly checking in on progress, engaging employees in goal setting, and trusting employees' abilities. The document also cautions against bottlenecks that can occur if managers skip earlier MTC steps and suddenly try to over-exert control.
The document discusses various aspects of stress at work including definitions, causes, effects, and ways to manage stress. It defines stressors as events or situations that cause mental or physical demand. Stress response is the reaction to a stressor, which can be interpreted positively or negatively. The document outlines several sources of stress at work such as intrinsic job factors, role in the organization, relationships, career development, and home-work interface. It also discusses individual characteristics that affect stress levels and provides strategies for addressing fatigue, exhaustion, and burnout.
Extreme Programming (XP) is an agile software development methodology that emphasizes communication, feedback, and simplicity. It consists of 12 specific practices like pair programming, planning games, small releases, and on-site customers. The goals of XP include reducing costs, shortening development timelines by 25-50%, and keeping requirements flexible through constant collaboration between developers and customers. Studies show that XP can help complete projects at a lower cost and faster pace by improving code quality, knowledge sharing, and responsiveness to changing needs.
This document discusses various techniques for managing stress, including keeping a stress diary to identify stressors, using imagery and relaxation to reduce stress, anticipating and planning for stressful situations, focusing on rational thinking and positive self-affirmations to counteract negative thoughts, and using optimal stress levels to improve performance when under-motivated.
The document proposes an action plan to improve the software development process at Intel by adopting elements of the CMMI framework. It outlines suggested improvements to requirements gathering, design, and verification processes including using UML modeling, design reviews, test planning, and code reviews. Potential costs include training and an initial learning curve, while benefits could include increased customer satisfaction, improved work products, and fewer bugs. Feedback is sought from technical staff before implementing the changes.
This document provides an introduction to design patterns and their application in object-oriented software design. It discusses the history of design patterns, provides definitions, and gives examples of the Observer, Builder, and Strategy patterns. It also covers how to use design patterns during the software design phase and provides code examples from various Intel projects.
This document outlines an agenda for a time management course. The course covers topics such as defining time management, deciding what tasks to complete and priorities, planning, procrastination, managing interruptions, and changing habits. It provides examples of workload categories and techniques for reducing firefighting, prioritizing deliverables, overcoming challenges to planning, reducing procrastination, managing telephone calls and filing. The overall goal is to help participants improve their productivity and ability to manage their time effectively.
This document provides an overview of innovation training for Intel's ISTG division. The objectives are to provide an understanding of innovation practices, information on ISTG's innovation investments and goals, and links to processes and tools. Key topics covered include definitions of innovation and systemic innovation, examples of radical, incremental and reapplied innovation, and why innovation is important for companies, employees and addressing competition. It also discusses ISTG's investments in innovation culture, funding, and tools. The document aims to help employees schedule time for innovative thinking and encourage risk-taking and new ideas.
The document discusses exercising positive control as the fifth step of the Management Task Cycle. It provides guidance on techniques for managers to effectively emphasize time, control details, apply goal pressure, and delegate tasks while avoiding becoming overly controlling. These include setting clear expectations and deadlines, regularly checking in on progress, engaging employees in goal setting, and trusting employees' abilities. The document also cautions against bottlenecks that can occur if managers skip earlier MTC steps and suddenly try to over-exert control.
The document discusses various aspects of stress at work including definitions, causes, effects, and ways to manage stress. It defines stressors as events or situations that cause mental or physical demand. Stress response is the reaction to a stressor, which can be interpreted positively or negatively. The document outlines several sources of stress at work such as intrinsic job factors, role in the organization, relationships, career development, and home-work interface. It also discusses individual characteristics that affect stress levels and provides strategies for addressing fatigue, exhaustion, and burnout.
Extreme Programming (XP) is an agile software development methodology that emphasizes communication, feedback, and simplicity. It consists of 12 specific practices like pair programming, planning games, small releases, and on-site customers. The goals of XP include reducing costs, shortening development timelines by 25-50%, and keeping requirements flexible through constant collaboration between developers and customers. Studies show that XP can help complete projects at a lower cost and faster pace by improving code quality, knowledge sharing, and responsiveness to changing needs.
This document discusses various techniques for managing stress, including keeping a stress diary to identify stressors, using imagery and relaxation to reduce stress, anticipating and planning for stressful situations, focusing on rational thinking and positive self-affirmations to counteract negative thoughts, and using optimal stress levels to improve performance when under-motivated.
The document proposes an action plan to improve the software development process at Intel by adopting elements of the CMMI framework. It outlines suggested improvements to requirements gathering, design, and verification processes including using UML modeling, design reviews, test planning, and code reviews. Potential costs include training and an initial learning curve, while benefits could include increased customer satisfaction, improved work products, and fewer bugs. Feedback is sought from technical staff before implementing the changes.
This document provides an introduction to design patterns and their application in object-oriented software design. It discusses the history of design patterns, provides definitions, and gives examples of the Observer, Builder, and Strategy patterns. It also covers how to use design patterns during the software design phase and provides code examples from various Intel projects.
SW development process and the leading indicatorJean Pаoli
This document discusses improvements to Intel's software development process and implementation of a "leading indicator" metric. It describes establishing a standardized development process across departments, with defined activities like requirements, design, coding, and testing. Each activity produces artifacts tracked in the system. A pilot implemented core activities in one department. The process will be expanded to additional activities and merged with the MPOR project management system. Implementation in other departments will follow to gradually roll out the new process company-wide.
This document discusses types of stress, signs of stress, and strategies for managing stress both personally and as a manager. It identifies three main types of stress: general stress from everyday events, cumulative stress from the buildup of everyday stressors, and trauma from abnormal threatening events. The document also outlines physical, emotional, mental, and social factors that can influence stress reactions. Finally, it provides tips for modifying personal stress responses such as taking breaks, getting enough sleep, and avoiding irritating people or events. As a manager, strategies include promoting awareness of stress, providing feedback and support to employees, and helping employees recognize their stress limits and signs of stress in others.
The document discusses effective prioritization and zero-based budgeting (ZBB). It begins by outlining the course objectives of better understanding how to apply ZBB concepts and create an action plan. It then defines ZBB as a process where all expenditures must be justified each period rather than just increases from the previous period. At Intel, ZBB is viewed more broadly as a resource management tool and prioritized list of projects and activities. The document stresses the importance of prioritization and challenges the status quo. It provides steps for developing key deliverables, prioritizing them using various methods, and taking actions based on the prioritization.
This document provides guidance on conducting a Post Implementation Review (PIR) process. It outlines the purpose and requirements of a PIR, which is to improve future projects by learning from past experiences. The document describes the PIR process, which includes planning, completing a survey, analyzing survey results to determine root causes of issues, and conducting a PIR meeting. It provides examples and exercises to demonstrate determining root causes and developing resolutions to prevent issues from reoccurring. The overall goal is to capture lessons learned and identify opportunities to update processes and templates based on project experiences.
This document provides an overview and agenda for an instructor-led PMP study program. The agenda includes introductions, a history of the program, a review of the program structure, and overviews of the 10 course presentations. It also covers instructor delivery tips, an instructor corner website, and addresses for questions. The goal of the program is to support Intel project managers in obtaining their PMP certification through a virtual 10-week series taught by Intel PMPs.
This document summarizes two models of thinking styles - the Phillips 'Deva' model and the Ned Hermann Group model. The Phillips model categorizes thinking as either 'hard' (objective, tangible) or 'soft' (subjective, intangible). The Ned Hermann Group model describes four thinking styles - type A learns through logic and data, type B through organized consistent approaches, type C through group discussion and personal involvement, and type D through fun spontaneity and variety. The document also provides examples of how companies have used these models to improve team productivity, personal effectiveness, and organizational applications.
This document provides an overview of project time management concepts for a PMP exam preparation presentation, including important schedule development tools like critical path method, PERT, and Monte Carlo simulation as well as processes for managing the project schedule through control and making course corrections. Key considerations for developing a project schedule such as activity sequencing, float, dependencies, and compression techniques are also discussed.
The document provides an introduction to the Rational Unified Process (RUP). It discusses what a software engineering process is, limitations of the waterfall model, and an overview of RUP. RUP is an iterative software development process framework that is use case driven and architecture-centric. It consists of four main phases - inception, elaboration, construction, and transition - with milestones used to transition between phases. The goal is to deliver working software incrementally throughout the project lifetime.
This document discusses design patterns, including their origin in architecture, history in software design, description formats, different types of patterns like architectural patterns, pattern catalogs, and pattern systems. It provides an example of the singleton pattern and discusses some drawbacks of patterns.
Design patterns provide a high-level language of discourse for programmers to describe their systems and to discuss solutions to common problems. This language comprises the names of recognizable patterns and their elements. Each design pattern shave its own templates and these patterns have illustrative names and are described with diagrams illustrating, their role players. There are 23 design patterns. These patterns are divided into three groups: structural, creational, and behavioral.
This document provides an introduction to design patterns, including definitions of what patterns are, why they are used, and common types of patterns. It describes the Observer pattern, which allows objects to notify dependents of state changes, defining a one-to-many relationship between a subject and observer objects so that observers are automatically notified of changes. The Observer pattern establishes a publish-subscribe mechanism between the subject and observer objects.
This document provides an overview of object-oriented analysis and design (OOAD) concepts. It discusses iterative development processes like the Unified Process and agile approaches. It emphasizes thinking in terms of objects and their services and responsibilities. The document also covers UML notation, requirements analysis, design patterns, OOA/D principles, and implementing designs in code. Students will study these topics and be assigned homework to define and discuss domain models, interaction diagrams, class diagrams, and use cases.
This document provides an overview of object-oriented analysis and design (OOAD) concepts. It discusses iterative development processes like the Unified Process and agile approaches. It emphasizes thinking in terms of objects and their services and responsibilities. The document also covers UML notation, requirements analysis, design patterns, OOA which identifies problem domain objects, and OOD which defines how software objects meet requirements. Students will study these topics and be assigned homework to define and discuss domain models, interaction diagrams, class diagrams, and use cases.
This document discusses system architecture and provides examples. It defines system architecture as the conceptual model that defines a system's structure, behavior, and views. System architecture can refer to the architecture of a system itself, the process of architecting a system, or the body of knowledge for designing systems. An effective system architecture depicts the system's elements, properties, relationships, behaviors, and multiple views in an overall model. The document also provides examples of system architectures and things to consider when developing an architecture, such as key parts, elements, relationships, and techniques. It emphasizes that the architecture should represent the overall research topic.
This document discusses design patterns, including their definitions, categories, and strengths/weaknesses. It provides definitions of design patterns from various sources, noting they are reusable solutions to common problems in software design. Patterns are grouped into creational, structural, and behavioral categories based on their focus. Advantages include promoting reuse and providing documentation, while weaknesses include a lack of systematic application guidance. The document also discusses pattern languages and repositories, as well as specialized patterns in different domains.
The document provides an agenda and introduction for a two-day software design training.
Day 1 covers introduction to software design principles, object oriented concepts and design, and evaluating software design. Day 2 covers software design patterns and clean code.
The introduction defines software design, contrasts it with architecture and coding, and outlines principles of software design such as SOLID and DRY. It also discusses software design considerations, modeling, and checkpoints. Later sections explain object oriented concepts, design principles including GRASP, and techniques for evaluating design quality.
This document provides an overview of key topics in object-oriented analysis and design that will be covered, including iterative development processes like the Unified Process, UML notation, requirements analysis, OOA/D principles, design patterns, and more. It discusses thinking in terms of objects and their services and responsibilities. Homework is assigned to define and discuss use cases, domain models, interaction diagrams, and class diagrams. Students are responsible for all material in Chapter 1.
This document discusses design patterns in Java. It defines design patterns as general and reusable solutions to common programming problems. It outlines the main categories of design patterns - creational, structural, and behavioral. Within each category it provides brief descriptions of the intent and purpose. It also discusses the Gang of Four, who published the seminal book on design patterns, and how design patterns provide common platforms for developers and represent best practices. It then provides more detailed descriptions of the factory method and singleton design patterns as examples.
The document provides an overview of object-oriented analysis and design (OOAD). It discusses key OOAD concepts like iterative development, the Unified Process, UML notation, thinking in terms of objects and their services/responsibilities. It explains the differences between object-oriented analysis, which focuses on identifying domain objects, and object-oriented design, which defines software objects and how they collaborate. The document uses a dice game example to illustrate domain modeling with objects, interaction diagrams to show message flows, and a class diagram to define class attributes and methods.
This document introduces design patterns and provides an overview of the Singleton pattern. It discusses different ways to implement the Singleton pattern, including eager initialization, static block initialization, lazy initialization, thread-safe implementations using synchronization and double-checked locking, and Bill Pugh's inner static class approach. It also notes that reflection can be used to circumvent Singleton implementations and destroy the singleton nature of the class. The document categorizes design patterns and provides examples of creational, structural, and behavioral patterns.
Design patterns are reusable solutions to common software design problems. There are three main types of design patterns: creational patterns, which create objects for you rather than having you instantiate them directly; structural patterns, which help compose groups of objects into larger structures; and behavioral patterns, which help define communication between objects. Some common design patterns used in Android development include Model-View-Controller (MVC), Model-View-Presenter (MVP), and Observer. MVC separates an application into three components - the model, the view, and the controller. MVP builds on MVC by introducing a presenter component to separate the application logic and flow from the view components. The Observer pattern allows an object to publish changes to its state
SW development process and the leading indicatorJean Pаoli
This document discusses improvements to Intel's software development process and implementation of a "leading indicator" metric. It describes establishing a standardized development process across departments, with defined activities like requirements, design, coding, and testing. Each activity produces artifacts tracked in the system. A pilot implemented core activities in one department. The process will be expanded to additional activities and merged with the MPOR project management system. Implementation in other departments will follow to gradually roll out the new process company-wide.
This document discusses types of stress, signs of stress, and strategies for managing stress both personally and as a manager. It identifies three main types of stress: general stress from everyday events, cumulative stress from the buildup of everyday stressors, and trauma from abnormal threatening events. The document also outlines physical, emotional, mental, and social factors that can influence stress reactions. Finally, it provides tips for modifying personal stress responses such as taking breaks, getting enough sleep, and avoiding irritating people or events. As a manager, strategies include promoting awareness of stress, providing feedback and support to employees, and helping employees recognize their stress limits and signs of stress in others.
The document discusses effective prioritization and zero-based budgeting (ZBB). It begins by outlining the course objectives of better understanding how to apply ZBB concepts and create an action plan. It then defines ZBB as a process where all expenditures must be justified each period rather than just increases from the previous period. At Intel, ZBB is viewed more broadly as a resource management tool and prioritized list of projects and activities. The document stresses the importance of prioritization and challenges the status quo. It provides steps for developing key deliverables, prioritizing them using various methods, and taking actions based on the prioritization.
This document provides guidance on conducting a Post Implementation Review (PIR) process. It outlines the purpose and requirements of a PIR, which is to improve future projects by learning from past experiences. The document describes the PIR process, which includes planning, completing a survey, analyzing survey results to determine root causes of issues, and conducting a PIR meeting. It provides examples and exercises to demonstrate determining root causes and developing resolutions to prevent issues from reoccurring. The overall goal is to capture lessons learned and identify opportunities to update processes and templates based on project experiences.
This document provides an overview and agenda for an instructor-led PMP study program. The agenda includes introductions, a history of the program, a review of the program structure, and overviews of the 10 course presentations. It also covers instructor delivery tips, an instructor corner website, and addresses for questions. The goal of the program is to support Intel project managers in obtaining their PMP certification through a virtual 10-week series taught by Intel PMPs.
This document summarizes two models of thinking styles - the Phillips 'Deva' model and the Ned Hermann Group model. The Phillips model categorizes thinking as either 'hard' (objective, tangible) or 'soft' (subjective, intangible). The Ned Hermann Group model describes four thinking styles - type A learns through logic and data, type B through organized consistent approaches, type C through group discussion and personal involvement, and type D through fun spontaneity and variety. The document also provides examples of how companies have used these models to improve team productivity, personal effectiveness, and organizational applications.
This document provides an overview of project time management concepts for a PMP exam preparation presentation, including important schedule development tools like critical path method, PERT, and Monte Carlo simulation as well as processes for managing the project schedule through control and making course corrections. Key considerations for developing a project schedule such as activity sequencing, float, dependencies, and compression techniques are also discussed.
The document provides an introduction to the Rational Unified Process (RUP). It discusses what a software engineering process is, limitations of the waterfall model, and an overview of RUP. RUP is an iterative software development process framework that is use case driven and architecture-centric. It consists of four main phases - inception, elaboration, construction, and transition - with milestones used to transition between phases. The goal is to deliver working software incrementally throughout the project lifetime.
This document discusses design patterns, including their origin in architecture, history in software design, description formats, different types of patterns like architectural patterns, pattern catalogs, and pattern systems. It provides an example of the singleton pattern and discusses some drawbacks of patterns.
Design patterns provide a high-level language of discourse for programmers to describe their systems and to discuss solutions to common problems. This language comprises the names of recognizable patterns and their elements. Each design pattern shave its own templates and these patterns have illustrative names and are described with diagrams illustrating, their role players. There are 23 design patterns. These patterns are divided into three groups: structural, creational, and behavioral.
This document provides an introduction to design patterns, including definitions of what patterns are, why they are used, and common types of patterns. It describes the Observer pattern, which allows objects to notify dependents of state changes, defining a one-to-many relationship between a subject and observer objects so that observers are automatically notified of changes. The Observer pattern establishes a publish-subscribe mechanism between the subject and observer objects.
This document provides an overview of object-oriented analysis and design (OOAD) concepts. It discusses iterative development processes like the Unified Process and agile approaches. It emphasizes thinking in terms of objects and their services and responsibilities. The document also covers UML notation, requirements analysis, design patterns, OOA/D principles, and implementing designs in code. Students will study these topics and be assigned homework to define and discuss domain models, interaction diagrams, class diagrams, and use cases.
This document provides an overview of object-oriented analysis and design (OOAD) concepts. It discusses iterative development processes like the Unified Process and agile approaches. It emphasizes thinking in terms of objects and their services and responsibilities. The document also covers UML notation, requirements analysis, design patterns, OOA which identifies problem domain objects, and OOD which defines how software objects meet requirements. Students will study these topics and be assigned homework to define and discuss domain models, interaction diagrams, class diagrams, and use cases.
This document discusses system architecture and provides examples. It defines system architecture as the conceptual model that defines a system's structure, behavior, and views. System architecture can refer to the architecture of a system itself, the process of architecting a system, or the body of knowledge for designing systems. An effective system architecture depicts the system's elements, properties, relationships, behaviors, and multiple views in an overall model. The document also provides examples of system architectures and things to consider when developing an architecture, such as key parts, elements, relationships, and techniques. It emphasizes that the architecture should represent the overall research topic.
This document discusses design patterns, including their definitions, categories, and strengths/weaknesses. It provides definitions of design patterns from various sources, noting they are reusable solutions to common problems in software design. Patterns are grouped into creational, structural, and behavioral categories based on their focus. Advantages include promoting reuse and providing documentation, while weaknesses include a lack of systematic application guidance. The document also discusses pattern languages and repositories, as well as specialized patterns in different domains.
The document provides an agenda and introduction for a two-day software design training.
Day 1 covers introduction to software design principles, object oriented concepts and design, and evaluating software design. Day 2 covers software design patterns and clean code.
The introduction defines software design, contrasts it with architecture and coding, and outlines principles of software design such as SOLID and DRY. It also discusses software design considerations, modeling, and checkpoints. Later sections explain object oriented concepts, design principles including GRASP, and techniques for evaluating design quality.
This document provides an overview of key topics in object-oriented analysis and design that will be covered, including iterative development processes like the Unified Process, UML notation, requirements analysis, OOA/D principles, design patterns, and more. It discusses thinking in terms of objects and their services and responsibilities. Homework is assigned to define and discuss use cases, domain models, interaction diagrams, and class diagrams. Students are responsible for all material in Chapter 1.
This document discusses design patterns in Java. It defines design patterns as general and reusable solutions to common programming problems. It outlines the main categories of design patterns - creational, structural, and behavioral. Within each category it provides brief descriptions of the intent and purpose. It also discusses the Gang of Four, who published the seminal book on design patterns, and how design patterns provide common platforms for developers and represent best practices. It then provides more detailed descriptions of the factory method and singleton design patterns as examples.
The document provides an overview of object-oriented analysis and design (OOAD). It discusses key OOAD concepts like iterative development, the Unified Process, UML notation, thinking in terms of objects and their services/responsibilities. It explains the differences between object-oriented analysis, which focuses on identifying domain objects, and object-oriented design, which defines software objects and how they collaborate. The document uses a dice game example to illustrate domain modeling with objects, interaction diagrams to show message flows, and a class diagram to define class attributes and methods.
This document introduces design patterns and provides an overview of the Singleton pattern. It discusses different ways to implement the Singleton pattern, including eager initialization, static block initialization, lazy initialization, thread-safe implementations using synchronization and double-checked locking, and Bill Pugh's inner static class approach. It also notes that reflection can be used to circumvent Singleton implementations and destroy the singleton nature of the class. The document categorizes design patterns and provides examples of creational, structural, and behavioral patterns.
Design patterns are reusable solutions to common software design problems. There are three main types of design patterns: creational patterns, which create objects for you rather than having you instantiate them directly; structural patterns, which help compose groups of objects into larger structures; and behavioral patterns, which help define communication between objects. Some common design patterns used in Android development include Model-View-Controller (MVC), Model-View-Presenter (MVP), and Observer. MVC separates an application into three components - the model, the view, and the controller. MVP builds on MVC by introducing a presenter component to separate the application logic and flow from the view components. The Observer pattern allows an object to publish changes to its state
This document provides an overview of object-oriented concepts, including a definition of object-orientation, its core characteristics, and a history of its development and modeling. It discusses the evolution of modeling languages like OMT and UML, and explains the different types of models in object-oriented development, including class, state, and interaction models. Key aspects of object-oriented technology and modeling concepts are defined.
Usability and User Experience Training Seminarlabecvar
This presentation describes a day-long seminar for giving participants an overview of best practices in usability design and research. Also included are several hand-on exercises to be done throughout the day to solidify participants' understanding of course concepts.
This document discusses different types of patterns used in design and architecture. It covers behavioral, creational, and structural design patterns. It also discusses architectural patterns like Model-View-Controller. It provides examples of these patterns and discusses how they can be applied and added to Enterprise Architect modeling tools. It emphasizes that patterns are a starting point and not the final destination.
Knowledge mechanisms in IEEE 1471/ISO 42010Rich Hilliard
Here are the key points about architectural knowledge:
- It distinguishes knowledge (what architects know) from practice (what architects do). Knowledge is a precondition for good practice.
- It involves both competence (knowing concepts, principles, patterns) and performance (ability to apply knowledge successfully).
- Architectural knowledge encompasses things like architectural styles, patterns, principles, quality attributes, domain models, heuristics, processes, methods, tools, documentation standards, and rationale for design decisions. It's the body of knowledge architects draw on to perform their work.
So in summary, architectural knowledge refers to the concepts, facts, and expertise that architects possess and apply in their work of conceiving, designing, documenting,
RPWORLD offers custom injection molding service to help customers develop products ramping up from prototypeing to end-use production. We can deliver your on-demand parts in as fast as 7 days.
1. Design Patterns – Eran Toch
Methodologies in Information System Development
Design Patterns:Design Patterns:
Talking in the Design LanguageTalking in the Design Language
Eran Toch
Methodologies in the Development
of Information Systems
2. Design Patterns – Eran Toch
2November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
– The Composite Pattern
• Behavioral Patterns
– The Strategy Pattern
• Creational Patterns
– The Singleton Pattern
• Human Interaction Patterns
– Go Back to a Safe Place
• Summary
3. Design Patterns – Eran Toch
3November 2003
What is a Design Pattern?What is a Design Pattern?
In Short, a solution
for a typical problem
“a description of a recurrent
problem and of the core of possible
solutions.“
4. Design Patterns – Eran Toch
4November 2003
Why do we need them?Why do we need them?
• Problems are not always unique. Reusing
existing experience might be proved useful.
• We need a common language to describe
problems and solutions.
• The Design of Object-Oriented systems limits
the scope of problems and solutions we can
talk about
5. Design Patterns – Eran Toch
5November 2003
History of Design PatternsHistory of Design Patterns
Christopher Alexander
A Pattern Language: Towns, Buildings Construction 1970’
1995’
2000’
Architecture
Object Oriented
Software Design
Other Areas:
HCI, Organizational Behavior…
Gang of Four (GoF)
Design Patterns: Elements of
Reusable Object-Oriented Software
Many Authors
6. Design Patterns – Eran Toch
6November 2003
Structure of a design patternStructure of a design pattern
• Pattern Name and Classification
• Intent
– a Short statement about what the pattern does
• Motivation
– A scenario that illustrates where the pattern would be
useful
• Applicability
– Situations where the pattern can be used
7. Design Patterns – Eran Toch
7November 2003
Structure of a design pattern – cont’dStructure of a design pattern – cont’d
• Structure
– A graphical representation of the pattern
• Participants
– The classes and objects participating in the pattern
• Collaborations
– How to do the participants interact to carry out their
responsibilities?
• Consequences
– What are the pros and cons of using the pattern?
• Implementation
– Hints and techniques for implementing the pattern
8. Design Patterns – Eran Toch
8November 2003
Classification of patternsClassification of patterns
• Structural
– Composite*, Decorator, Façade, Adapter…
• Behavioral
– Strategy*, Command, Observer, Chain of
Responsibilities…
• Creational
– Singleton*, Abstract Factory, Factory Method…
• Other
– User interface Patterns
• Go Back to a Safe Place
9. Design Patterns – Eran Toch
9November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
10. Design Patterns – Eran Toch
10November 2003
The Composite PatternThe Composite Pattern
• Intent:
– Compose objects into tree structures to represent
part-whole hierarchies.
– Composite lets clients treat individual objects and
compositions of objects uniformly. This is called
recursive composition.
11. Design Patterns – Eran Toch
11November 2003
MotivationMotivation
When Processing the hierarchal
collection, we need to query the
type of the object (composite or
primitive) and act differently
Diagram reference: Design
Patterns [Gof]
12. Design Patterns – Eran Toch
12November 2003
Composite: ApplicabilityComposite: Applicability
• Use the Composite pattern when:
– You want to represent part-whole hierarchies of
objects.
– You want clients to be able to ignore the
difference between compositions of objects and
individual objects. Clients will treat all objects in
the composite structure uniformly.
13. Design Patterns – Eran Toch
13November 2003
Composite: StructureComposite: Structure
• Define an abstract base class that specifies the
uniform behavior.
• Subclass the Primitive and Composite classes of the
Component class.
Diagram reference: Design
Patterns [Gof]
14. Design Patterns – Eran Toch
14November 2003
Composite: ConsequencesComposite: Consequences
• Benefits
– It makes it easy to add new kinds of components
– It makes clients simpler, since they do not have to
know if they are dealing with a leaf or a composite
component
• Liabilities
– It makes it harder to restrict the type of components of
a composite
15. Design Patterns – Eran Toch
15November 2003
Composite: Known UsesComposite: Known Uses
1. A GUI system has window objects which can
contain various GUI components (widgets) such as,
buttons and text areas. A window can also contain
widget container objects which can hold other
widgets.
Concrete examples: Java Swing, MFC
2. Folder based file system
3. Arithmetic expressions
16. Design Patterns – Eran Toch
16November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
17. Design Patterns – Eran Toch
17November 2003
The Strategy PatternThe Strategy Pattern
• Intent:
– Define a family of algorithms, encapsulate each one,
and make them interchangeable.
– Strategy lets the algorithm vary independently from
clients that use it.
18. Design Patterns – Eran Toch
18November 2003
Strategy: MotivationStrategy: Motivation
The client wants to use the algorithm
without knowing which one to use in
advance. We want to add new
algorithms without changing the
client class.
19. Design Patterns – Eran Toch
19November 2003
Strategy: StructureStrategy: Structure
• Encapsulate the behavior of the context class in a
separate algorithm class.
• The context class keeps a reference to the algorithm
class and passes on the messages.
• The algorithm class can be sub-classed to support
multiple algorithms.
20. Design Patterns – Eran Toch
20November 2003
Strategy: ConsequencesStrategy: Consequences
• Benefits
– Provides an alternative to subclassing the Context
class to get a variety of algorithms or behaviors
– Keeps the client clean from large conditional
statements
– Provides a choice of implementations for the same
behavior
• Liabilities
– Increases the number of objects
– All algorithms must use the same Strategy interface
– We still need conditional statements!
21. Design Patterns – Eran Toch
21November 2003
Strategy: Known UsesStrategy: Known Uses
• QSIA Learning System
• Layout Manager in Java
Swing
• Sorting algorithms,
memory allocation
algorithms and more…
22. Design Patterns – Eran Toch
22November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
23. Design Patterns – Eran Toch
23November 2003
The Singleton PatternThe Singleton Pattern
• Intent.
– Ensure a class only has one instance, and provide a
global point of access to it.
• Motivation.
– Sometimes, an application needs one, and only one,
instance of an object. For example, we want just one
window manager. Or just one factory for a family of
products.
– We need to have that one instance easily accessible.
– And we want to ensure that additional instances of the
class can not be created.
24. Design Patterns – Eran Toch
24November 2003
Singleton: StructureSingleton: Structure
• Declare the single instance as a private static data
member.
• Provide a public static member function that
encapsulates all initialization code, and provides
access to the instance.
25. Design Patterns – Eran Toch
25November 2003
Singleton: Example CodeSingleton: Example Code
public class Singleton {
// The private reference to the one and only instance.
private static Singleton uniqueInstance = null;
// An instance attribute.
private int data = 0;
/**
* Returns a reference to the single instance.
* Creates the instance if it does not yet exist.
*/
public static Singleton instance() {
if(uniqueInstance == null)
uniqueInstance = new Singleton();
return uniqueInstance;
}
/**
* The Singleton Constructor. Note that it is private!
* No client can instantiate a Singleton object!
*/
private Singleton() {}
}
26. Design Patterns – Eran Toch
26November 2003
Singleton: Example Code – cont’dSingleton: Example Code – cont’d
public class TestSingleton {
public static void main(String args[]) {
// Get a reference to the single instance of Singleton.
Singleton s = Singleton.instance();
// Set the data value.
s.setData(34);
System.out.println("First reference: " + s);
System.out.println("Singleton data value is: " + s.getData());
// Get another reference to the Singleton.
// Is it the same object?
s = null;
s = Singleton.instance();
System.out.println("nSecond reference: " + s);
System.out.println("Singleton data value is: " + s.getData());
}
}
What will be the output?
27. Design Patterns – Eran Toch
27November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
28. Design Patterns – Eran Toch
28November 2003
Human Interaction PatternsHuman Interaction Patterns
• A Pattern language to describe human
interaction situations
• Examples:
– Go Back to a Safe Place
– Form
– Control Panel
– WYSIWYG Editor
– Hierarchical Set
– Map of Navigable Spaces
– More…
29. Design Patterns – Eran Toch
29November 2003
Go Back to a Safe PlaceGo Back to a Safe Place
• Problem:
– How can the artifact make navigation easy, convenient, and
psychologically safe for the user?
• Forces:
– A user may forget where they were, if they stop using the artifact
while they're in the middle of something and don't get back to it
for a while.
– If the user gets into a space or a state that they don't want to be
in, they will want to get out of it in a safe and predictable way.
– The user is more likely to explore an artifact if they are assured
that they can easily get out of an undesired state or space; that
assurance engenders a feeling of security.
30. Design Patterns – Eran Toch
30November 2003
Go Back to a Safe PlaceGo Back to a Safe Place
• Solution:
– Provide a way to go back to a checkpoint of the user's
choice.
• Examples:
– The "Home" button on a Web browser
– Turning back to the beginning of a chapter in a
physical book or magazine
– The “undo" feature on some computer applications
31. Design Patterns – Eran Toch
31November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
32. Design Patterns – Eran Toch
32November 2003
SummarySummary
• Patterns learned:
– Composite, Strategy, Singleton, Go Back to a Safe
Place.
• Advantages of Design Patterns:
– They capture expertise and make it accessible to non-
experts.
– Their names collectively form a vocabulary that helps
developers communicate better.
– They help people understand a system more quickly
when it is documented with the patterns it uses.
33. Design Patterns – Eran Toch
33November 2003
ReferencesReferences
• Design Patterns: Elements of Reusable Object-Oriented
Software, Gamma E. et el., 1995, Addison-Wesley.
• A course from Bob Tarr from UMBC University
http://www.research.umbc.edu/~tarr/dp/fall00/cs491.html
• The Design Patterns Java Companion, James W. Cooper (an
online version of the book)
http://www.patterndepot.com/put/8/JavaPatterns.htm
• A Site dedicated to Design Patterns by Vince Huston
http://home.earthlink.net/~huston2/dp/patterns.html
• Seven Habits of Successful Pattern Writers, John Vlissides
http://hillside.net/patterns/papers/7habits.html
• COMMON GROUND: A Pattern Language for Human-
Computer Interface Design, Jenifer Tidwell,
http://www.mit.edu/~jtidwell/common_ground_onefile.html
34. Design Patterns – Eran Toch
34November 2003
Doesn’t it go too far?Doesn’t it go too far?
• Taken from Vince Huston’s site about Design
Patterns:
35. Design Patterns – Eran Toch
Methodologies in Information System Development
Thanks!Thanks!