This document provides an overview of design patterns including their definition, utility, essential elements, and examples. It discusses creational patterns like singleton, factory, and builder. Structural patterns covered include adapter, proxy, and composite. Behavioral patterns like command and iterator are also introduced. The document is presented as a slideshow by Dr. Lilia Sfaxi on design patterns for software engineering.
Je vous partage l'un des présentations que j'ai réalisé lorsque j'étais élève ingénieur pour le module 'Anglais Business ' , utile pour les étudiants souhaitant préparer une présentation en anglais sur les Design Pattern - ou les patrons de conception .
Je vous partage l'un des présentations que j'ai réalisé lorsque j'étais élève ingénieur pour le module 'Anglais Business ' , utile pour les étudiants souhaitant préparer une présentation en anglais sur les Design Pattern - ou les patrons de conception .
Design patterns are optimized, reusable solutions to the programming problems that we encounter every day. A design pattern is not a class or a library that we can simply plug into our system; it's much more than that. It is a template that has to be implemented in the correct situation. It's not language-specific either. A good design pattern should be implementable in most—if not all—languages, depending on the capabilities of the language. Most importantly, any design pattern can be a double-edged sword— if implemented in the wrong place, it can be disastrous and create many problems for you. However, implemented in the right place, at the right time, it can be your savior.
Design patterns are optimized, reusable solutions to the programming problems that we encounter every day. A design pattern is not a class or a library that we can simply plug into our system; it's much more than that. It is a template that has to be implemented in the correct situation. It's not language-specific either. A good design pattern should be implementable in most—if not all—languages, depending on the capabilities of the language. Most importantly, any design pattern can be a double-edged sword— if implemented in the wrong place, it can be disastrous and create many problems for you. However, implemented in the right place, at the right time, it can be your savior.
Using DITA-wiki Hybrid Solutions For Better Knowledge SystemsLisa Dyer
Want to reap the benefits of community-based documentation? This game-changing trend is gaining traction fast, but many organizations lack resources to build solutions. The open source DITA2Wiki Project is a free resource to do just that. You can get a proof-of-concept system up and running in an hour. A governing concept is mixing company-generated ("warranted") content with community-generated ("non-warranted") content to provide richer user assistance. And with DITA XML in the mix, you can deliver rich information online, offline, and directly within your apps.
Refactoring is a widespread practice that helps developers
to improve the maintainability and readability of their code.
However, there is a limited number of studies empirically
investigating the actual motivations behind specific refactoring operations applied by developers. To fill this gap, we monitored Java projects hosted on GitHub to detect recently applied refactorings, and asked the developers to explain the reasons behind their decision to refactor the code.
By applying thematic analysis on the collected responses,
we compiled a catalogue of 44 distinct motivations for 12
well-known refactoring types. We found that refactoring activity is mainly driven by changes in the requirements and
much less by code smells. Extract Method is the most versatile refactoring operation serving 11 different purposes.
Finally, we found evidence that the IDE used by the developers affects the adoption of automated refactoring tools.
[DevDay 2016] Design Pattern at a glance - Speaker: Tuan Do – Scrum Master a...DevDay.org
This is an extension of “Refactoring – code optimization” – a topic shared in DevDay 2015. This year, the presentation will focus on a more advanced topic but it is shown simply to help you optimize, restructure code, refactore better system thereby ensure easy software expanded, management and maintenance. That is the standard design in software programming. Maybe you’ve heard it with the word “Design Pattern”.
Join us to learn and share.
———
Speaker: Tuan Do – Scrum Master at Axon Active Vietnam
Dependency injection via annotations v1.0Jerry Kurian
How annotation works and how frameworks use it to implement dependency injection. The slides also show the concept of compartmentalization and how dependency injection helps with it.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Essentials of Automations: Optimizing FME Workflows with Parameters
Software Engineering - chp4- design patterns
1. MedTech
Chapter 4 – Design Patterns
Known Patterns and Design and Implementation Examples
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 1
MedTech – Mediterranean Institute of Technology
Software Engineering
MedTech
3. MedTech
Design Patterns
• In software engineering, a design pattern is a general
repeatable solution to a commonly occuring problem in
software design
• It isn’t a finished design that can be transformed directly into
code, but a description or template for how to solve a
problem that can be used in many different situations
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 3
Design Patterns: Definition and Utility
4. MedTech
Design Patterns: Usage
• Design patterns:
• Provide general solutions, documented in a format that doesn’t require
specifics tied to a particular problem
• Can speed up the development process by providing tested, proven
development paradigms
• Help you benefit from the experience of fellow developers
• Prevent subtle issues that can cause major problems
• Improve code readability for coders and architects familiar with them
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 4
Design Patterns: Definition and Utility
5. MedTech
Design Patterns: Essential Elements
• A pattern has four essential elements:
• The pattern name that we use to describe a design problem
• The problem that describes when to apply the pattern
• The solution that describes the elements that make up the
design
• The consequences that are the results and trade-offs of
applying the pattern
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 5
Design Patterns: Definition and Utility
6. MedTech
GoF Design Patterns
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 6
Design Patterns: Definition and Utility
• The Gang of Four are the four authors of the book « Design Patterns:
Elements of Reusable Object-Oriented Software »
• Defined 23 design patterns for recurrent design issues, called GoF
design patterns
• Classified by purpose:
• Structural : Concerns the composition of classes and objects
• Behavioral : Characterizes the interaction and responsibility of objects and
classes
• Creational : Concerns the creation process of objects and classes
• … and by scope:
• Class scope: relationship between classes and subclasses, defined
statically
• Object scope: object relationships, dynamic
7. MedTech
GoF Design Patterns
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 7
Design Patterns: Definition and Utility
9. MedTech
Creational Patterns: Definition
• Creational patterns abstract the instantiation process.
• They help to make a system independent of how its objects are
created, composed, and represented
• Creational patterns for classes use inheritance to vary the class that is
instantiated.
• Creational patterns for objects delegate instantiation to another object.
• Examples:
• Factory
• Singleton
• Builder
• Prototype
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 9
Creational Patterns
10. MedTech
Singleton
• Ensure that only one instance of a class is created and provide a global
access point to the object.
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 10
Creational Patterns
11. MedTech
Singleton: Usage
• When to Use
• When we must ensure that only one instance of a class is created
• When the instance must be available through all the code
• In multi-threading environments when multiple threads must access the
same resources through the same singleton object.
• Common Usage
• Logger Classes
• Configuration Classes
• Accessing resources in shared mode
• Other design patterns implemented as Singletons:
• Factories and Abstract Factories, Builder, Prototype
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 11
Creational Patterns
12. MedTech
Factory
• Creates objects without exposing the instantiation logic to the client
• Refers to the newly created object through a common interface.
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 12
Creational Patterns
13. MedTech
Factory: Usage
• When to use
• When a framework delegates the creation of objects derived from a common
superclass to the factory
• When we need flexibility in adding new types of objects that must be
created by the class
• Common Usage
• factories providing an xml parser:
• javax.xml.parsers.DocumentBuilderFactory
• javax.xml.parsers.SAXParserFactory
• java.net.URLConnection
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 13
Creational Patterns
14. MedTech
Builder
• Defines an instance for creating an object but letting subclasses
decide which class to instanciate
• Allows finer control over the construction process
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 14
Creational Patterns
20. MedTech
Builder: Usage
• When to use
• When the creation algorithm of a complex object is independent from the
parts that actually compose the object
• When the system needs to allow different representations for the objects
that are being built
• Builder and Factory
• Very similar to the Factory pattern
• Factory: the client uses the factory’s methods to create its own objects
• Builder: the Builder class is instructed on how to create the object and then
it is asked for it, but the way that the class is put together is up to the
Builder class
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 20
Creational Patterns
22. MedTech
Definition
• Structural patterns are concerned with how classes and objects are
composed to form larger structures.
• Structural class patterns use inheritance to compose interfaces or
implementations.
• Structural object patterns describe ways to compose objects to realize new
functionality. The added flexibility of object composition comes from the ability
to change the composition at runtime, which is impossible with static class
composition.
• Examples:
• Adapter
• Proxy
• Bridge
• Composite
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 22
Structural Patterns
23. MedTech
Adapter
• Converts the interface of a class into another interface the clients expect
• Lets classes work together, that normally wouldn’t, due to incompatible
interfaces
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 23
Structural Patterns
29. MedTech
Proxy
• Provide a « Placeholder » for an object to control references to it
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 29
Structural Patterns
40. MedTech
Definition
• Behavioral patterns are concerned with algorithms and the assignment of
responsibilities between objects
• Behavioral class patterns use inheritance to distribute behavior between
classes.
• Behavioral object patterns use composition rather than inheritance. Some
describe how a group of peer objects cooperate to perform a task that no
single object can carry out by itself.
• Examples:
• Command
• Iterator
• Observer
• Strategy
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 40
Behavioral Patterns
41. MedTech
Command
• Encapsulates a request in an object
• Allows the parameterization of clients with different requests
• Allows saving the request in a queue
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 41
Behavioral Patterns
44. MedTech
Iterator
• The iterator pattern allows
us to:
• Access contents of a
collection without
exposing its internal
structure.
• Support multiple
simultaneous traversals of
a collection.
• Provide a uniform interface
for traversing different
collections.
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 44
Behavioral Patterns
46. MedTech
Observer
• Defines a one-to-many dependency between objects so that when one
object changes state, all its dependents are notified and updated
automatically.
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 46
Behavioral Patterns
48. MedTech
References
Dr. Lilia SFAXI
www.liliasfaxi.wix.com/liliasfaxi
Slide 48
• Object Oriented Design, http://www.oodesign.com/, consulted
november 2016
• Gang of Four (GoF)OO Design Patterns, (Course) WATERLOO CHERITON
SCHOOL OF COMPUTER SCIENCE, 2011
• Design Patterns, (Course) Faculty of Science, Engineering and
Technology, 2007
• Textbooks
• E. Gamma & al. Design Patterns: Elements of Reusable Object-Oriented
Software, Addison-Wesley, 1994
• B. Christiansson & al. GoF Design Patterns -with examples using Java and
UML2, 2008