The document discusses principles of object-oriented design, specifically focusing on the GRASP (General Responsibility Assignment Software Patterns) patterns. It introduces five basic GRASP patterns: Creator, Information Expert, High Cohesion, Low Coupling, and Controller. For each pattern, it provides the problem addressed, proposed solution, example applications, and potential contraindications. It also provides a UML class diagram notation guide and discusses how patterns can be applied when designing objects for a Monopoly game domain.
● Distributed Database Management Systems Advantages and Disadvantages.
● Characteristics of Distributed Database Management Systems.
● Levels of Data and Process Distribution.
● Distributed Database Transparency Features.
● Transaction Performance and Failure Transparency.
● Distributed Database Management Systems Advantages and Disadvantages.
● Characteristics of Distributed Database Management Systems.
● Levels of Data and Process Distribution.
● Distributed Database Transparency Features.
● Transaction Performance and Failure Transparency.
A brief introduction to Rails Eingines. The joy and shortcomings of building modular web apps the Rails way. Originally presented at the 22nd Athens Ruby Meetup.
Workshop on Parallel, Cluster and Cloud Computing on Multi-core & GPU
(PCCCMG - 2015)
Workshop Conducted by
Computer Society of India
In Association with
Dept of CSE, VNIT and Persistence System Ltd, Nagpur
Workshop Dates 4th to 6th September 2015
MongoDB is the most famous and loved NoSQL database. It has many features that are easy to handle when compared to conventional RDBMS. These slides contain the basics of MongoDB.
Web businesses such as eBay®, Amazon® and a whole lot of others have long seized to be mere websites; they have morphed into web business platforms. By adopting a platform strategy, they are building an ecosystem of developers, partners and entrepreneurs to build innovative applications for customers. In this session, we discuss the significance of and associated issues in adopting a SOA strategy to open-up these platforms for the ecosystem.
Web Business Platforms On The Cloud An Engineering PerspectiveHarsh Jegadeesan
Web businesses such as eBay®, Amazon® and a whole lot of others have long seized to be mere websites; they have morphed into web business platforms on the "cloud". By adopting a platform strategy, they are building an ecosystem of developers, partners and entrepreneurs to build innovative applications for customers. As platform owners, catering to his heterogeneous ecosystem is a huge engineering challenge in itself. This session, we would discuss some of these challenges along with some recipes to overcome them.
A brief introduction to Rails Eingines. The joy and shortcomings of building modular web apps the Rails way. Originally presented at the 22nd Athens Ruby Meetup.
Workshop on Parallel, Cluster and Cloud Computing on Multi-core & GPU
(PCCCMG - 2015)
Workshop Conducted by
Computer Society of India
In Association with
Dept of CSE, VNIT and Persistence System Ltd, Nagpur
Workshop Dates 4th to 6th September 2015
MongoDB is the most famous and loved NoSQL database. It has many features that are easy to handle when compared to conventional RDBMS. These slides contain the basics of MongoDB.
Web businesses such as eBay®, Amazon® and a whole lot of others have long seized to be mere websites; they have morphed into web business platforms. By adopting a platform strategy, they are building an ecosystem of developers, partners and entrepreneurs to build innovative applications for customers. In this session, we discuss the significance of and associated issues in adopting a SOA strategy to open-up these platforms for the ecosystem.
Web Business Platforms On The Cloud An Engineering PerspectiveHarsh Jegadeesan
Web businesses such as eBay®, Amazon® and a whole lot of others have long seized to be mere websites; they have morphed into web business platforms on the "cloud". By adopting a platform strategy, they are building an ecosystem of developers, partners and entrepreneurs to build innovative applications for customers. As platform owners, catering to his heterogeneous ecosystem is a huge engineering challenge in itself. This session, we would discuss some of these challenges along with some recipes to overcome them.
APIs make you mobile - Mobile World Congress 2017Harsh Jegadeesan
Mobility is a monumental change that has made our lives digital. How can we enable mobility? by unlocking the data and processes and making them mobile. APIs allow you to make your data and processes mobile. APIs are the atoms of digital life! You need to take good care of your APIs. The SAP Cloud Platform allows you to manage your full lifecycle of APIs.
SAP API Business Hub - Community Webinar.
SAP API Business Hub is a public catalog of all SAP and selected partner APIs. (See: https://api.sap.com/).
The slides were presented in the SAP Community Webinar on Jan 16, 2017 for SAP mentors and influencers community. https://blogs.sap.com/2017/01/03/jan-16-sap-community-calls-sap-api-business-hub/
A blog on the webinar by Tammy Powlas is available here:
https://blogs.sap.com/2017/01/16/sap-api-business-hub-a-public-catalog-of-all-sap-apis-sap-mentor-community-call/
API Business Hub (api.sap.com) is the central catalog of SAP and selected partner APIs for application developers to search, discover, test and consume these APIs to build extensions or integrations using the HANA Cloud Platform. This presentation provides an overview of the SAP API Business Hub.
User manual for those users who develop any desktop application so i try to provide betteropportunity to view it and try to make best user manual ..
Good Luck
These slides on Object-Oriented Design Heuristics are part of the course LINGI2252 “Software Maintenance and Evolution”, given by Prof. Kim Mens at UCL, Belgium.
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 .
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
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.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
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.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
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/
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
2. USE-CASE REALIZATION
How a particular use-case is realized in the
design model in terms of collaborating objects?
Use-Case suggests system operations
Domain-Layer interaction diagrams illustrate
use-case realization
2
3. GRASP : DESIGN OBJECTS WITH
RESPONSIBILITIES
GRASP patterns are a learning aid to help one
understand essential object design, and apply
design reasoning in a methodical,
rational,explainable way.
3
4. DESIGN ACTIVITIES
During design and coding we apply various OO
design principles, among them software design
patterns such as the GRASP and GoF (Gang of
Four) patterns.
Our metaphor is Responsibility Driven Design
(RDD), because our chief design emphasis is on
assigning responsibilities to objects.
4
5. RESPONSIBILITIES AND METHODS
Responsibilities are realized as methods
Approach to understanding and using design
principles is based on patterns of assigning
responsibilities.
Definition of Responsibility:
“A contract or obligation of a classifier”
Responsibilities are of the following types:
Knowing
Doing
5
6. DOING
Doing responsibilities of an object include :
Doing something itself , such as creating an object or
doing a calculation
Initialing action in other objects
Controlling and coordinating activities in other objects
6
7. KNOWING
Knowing responsibilities of object include :
Knowing about private encapsulated data
Knowing about related objects
Knowing about things it can derive or calculate
7
8. RESPONSIBILITIES AND INTERACTION DIAGRAMS
Interaction diagrams show choices in assigning
responsibilities to objects.
When these diagrams are created, decisions in
responsibility assignment are reflected in the
messages sent to different classes of objects.
8
9. PATTERNS
Principles and idioms codified in a structured
format describing the problem, solution, and
given a name are called patterns.
A “New Pattern” is an oxymoron. Patterns are
tried and true, established ways of doing things.
They are not new things or new ways of doing
things.
9
10. DEFINITION OF PATTERN
Pattern is a named problem/solution pair that
can be applied in new contexts,with advice on
how to apply it in novel situations and discussion
of its trade-offs.
10
11. NAMING PATTERNS
All Patterns have suggestive names. Naming a
pattern, technique, or a principle has the
following advantages :
It supports chunking and incorporating that concept
into our understanding and memory
It facilitates communication .
11
12. CHANGING EMPHASIS
Throughout analysis, we have referred to
analyzing the problem domain, and postponing
consideration of the solution domain. We
emphasized domain objects over software objects
.
That changes in design. We are now concerned
with software objects and the solution domain.
12
13. GRASP
The GRASP name was chosen to suggest the
importance of grasping these principles to successfully
design object-oriented software.
It is an acronym for General Responsibility Assignment
Software Patterns.
They describe the fundamental principles of object
design and responsibility assignment, expressed as
patterns.
13
14. FIVE BASIC GRASP PATTERNS :
Information Expert
Creator
High Cohesion
Low Coupling
Controller
14
15. UML CLASS DIAGRAM NOTATION
Three sections:
Class Name
Third section is for methods
attributes
methods
15
16. CREATOR
Problem: Who should be responsible for creating a
new instance of some class ?
The creation of objects is one of the most common
activities in an object-oriented system.
It is useful to have a general principle for
assignment of creation responsibilities.
Assigned well, the design can support low coupling
increased clarity, encapsulation, and reusability.
16
18. SOLUTION
Assign class B the responsibility to create an
instance of class A if one or more of the following
is true :
B aggregates A objects .
B contains A objects.
B records instances of A objects.
B closely uses A objects.
B has the initializing data that will be passed to A
when it is created
B is a creator of A objects.
18
19. DISCUSSION
The basic intent of the Creator pattern is to find a
creator that needs to be connected to the created object
in any event.
Aggregator aggregates Part
Container contains Content
Recorder records.
Sometimes a creator is found by looking for the class
that has the initializing data that will be passed in
during creation.
19
20. CONTRAINDICATIONS
Often creation requires significant complexity,
such as:
using recycled instances for performance reasons,
conditionally creating an instance from one of a
family of similar classes based upon some external
property value
In these instances, another pattern principle
might be preferred (factory?)
20
21. MONOPOLY EXAMPLE
In the monopoly example, who will create the
Squares?
Since the game board contains the squares where
activities take place, a Board software object is a
logical place to create Square software objects.
21
22. INFORMATION EXPERT
By Information expert we should look for the class of
objects that has all the information needed
Problem : What is a general principle of assigning
responsibilities to objects?
Solution: Assign a responsibility to the information
expert – a class that has the information necessary to
fulfill the responsibility.
22
23. DISCUSSION
Information Expert is a basic guiding principle used
continuously in object design.
Expert is not meant to be obscure or fancy idea; it
expresses the common “intuition” that objects do
things related to information they have.
Fulfillment of a responsibility often requires
information that is spread across different classes of
objects.
Whenever information is spread across different
objects , they will need to interact via messages to 23
share the work.
24. CONTRAINDICATIONS
There are situations where the solution
suggested by expert is undesirable, usually
because of problems in coupling and cohesion.
Keep the application logic in one place, database
in another place and so forth, rather than
intermingling different system concerns in the
same component.
24
25. BENEFITS
Information encapsulation is maintained, since objects
use their own information to fulfill tasks. This usually
supports low coupling, which leads to more robust and
maintainable systems.
Behavior is distributed across the classes that have the
required information, encouraging more cohesive
“lightweight” class definitions that are easier to
understand and maintain.
High cohesion is usually supported.
25
26. MONOPOLY EXAMPLE
If you want to retrieve information about the
squares on the board, who does it?
The Board software object is also a good choice,
as it was for creating the Square objects.
Note that the information is retrieved from the
Squares.
26
27. LOW COUPLING
Coupling is a measure of how strongly one
element is connected to, has knowledge of, or
relies on other element.
27
28. LOW COUPLING PATTERN
Problem:
How to support a low dependency, low change
impact ,and increased reuse?
Solution:
Assign a responsibility so that coupling remains
low.
28
29. DISCUSSION
Low Coupling is a principle to keep in mind
during all design decisions
It is an underlying goal to continually consider. It
is evaluative principle that a designer applies
while evaluating all design decisions.
29
30. CONTRAINDICATIONS & BENEFITS
(High coupling to stable elements and to
pervasive elements is seldom a problem.)
Benefits:
Objects are not affected by changes in other
components
Objects are simple to understand in isolation
Objects are convenient to reuse
30
31. MONOPOLY EXAMPLE
If we created an arbitrary other class to retrieve
information from the Squares instead of
assigning the responsibility to the Board object,
then our other class would have to retrieve
information from both Board and Square,
increasing the number of connections (and thus
the coupling.)
31
32. CONNECTIONS BETWEEN PATTERNS
Information Expert supports Low Coupling.
This is a natural result of identifying patterns
from practices that have developed over years of
experience.
You often get the same result by starting with a
different idea, because the ideas (patterns)
support each other.
32
33. HIGH COHESION
Cohesion is a measure of how strongly related
and focused are the responsibilities of an
element.
High Cohesion: An element with highly related
responsibilities, and which does not do a
tremendous amount of work, has high cohesion.
33
35. DISCUSSION
Like Low Coupling, High Cohesion is a principle
to keep in mind during all design decisions; it is
an underlying goal to consider contantly.
35
36. MONOPOLY EXAMPLE
Assuming, from the previous Monopoly slide,
that :MonopolyGame is the controller:
If :MonopolyGame performs most of the game
functions within the software object, you have
low cohesion.
If the functions are delegated to other software
objects, you have high cohesion.
36
37. BACK TO RELATIONSHIPS
Low Coupling and High Cohesion go together
naturally. One usually leads to the other.
Both are outcomes of the OO principle of
“chunking,” breaking up a large problem into
manageable pieces.
If the pieces are too simple there will be too many
of them.
If the pieces are too complex, each will not be
understandable.
37
38. COHESION EXAMPLES
Some scenarios illustrating varying degrees of varying
degrees of functional cohesion:
Very Low Cohesion – A class is solely responsible for
many different functional areas.
Low Cohesion – A class has sole responsibility for a
complex task in one functional area.
38
39. Moderate Cohesion – A class has light weight
and sole responsibilities in a few different areas
that are logically related to the class concept, but
not to each other.
High Cohesion – A class has moderate
responsibilities in one functional area and
collaborates with other classes to fulfill tasks.
39
40. CONTRAINDICATIONS
Grouping of responsibilities or code into one class or
component to simplify maintenance by one person.
(Such grouping may also make maintenance much
more difficult.)
Distributed server objects.
It is sometimes desirable to create fewer and larger,
less cohesive server objects that provide an interface
for many operations, due to overhead and performance
needs associated with remote objects and remote
communication.
40
41. BENEFITS
Clarity and ease of comprehension of design is
increased.
Maintenance and enhancements are simplified
Low coupling is often supported.
41
42. CONTROLLER
A Controller is a non–user interface object responsible
for receiving or handling a system event. It defines
methods for system operation.
42
43. PROBLEM :
Who should be responsible for handling an input
system event?
Note that this assumes the Model-View-
Controller architectural (not software) pattern
that separates the user interface (Views) from
the functionality of the rest of the system and
uses controllers to access other functionality
(Models).
43
44. SOLUTION
Assign the responsibility for receiving or
handling a system event message to a class
representing one of the following choices:
Represent the overall system, device, or
subsystem
Represents a use case scenario within
which the system event occurs
44
45. DISCUSSION
Controller pattern provides guidance for
generally accepted, suitable choices.
It is often desirable to use the same controller
class for all the system events of one use case so
that it is possible to maintain information about
the state of the use case in the controller.
45
46. MONOPOLY EXAMPLE
The first system message is “Play Game.” What
object should receive this message?
The author suggests that :MonopolyGame might
be a suitable object if there are a limited number
of system operations. Otherwise, we would have
to consider High Cohesion if there are many
operations.
46
47. FACADE CONTROLLER
Suitable when there are not “too many” system
events ,or it is not possible for the user interface
(UI) to redirect system event messages to
alternating controllers,such as in message
processing system.
47
48. USE–CASE CONTROLLER
When placing the responsibilities in a façade
controller leads to design with low cohesion or
high coupling, Use Case Controller is preferred
as an alternative.
When there are many system events across
different processes, it factors their handling into
manageable separate classes.
48
49. AN OBJECT CLASSIFICATION SCHEMA
The following analysis class types are used by Ivar
Jacobsen in Objectory:
Boundary objects are abstractions of interfaces
Entity objects are application-independent domain software
objects
Control objects are use case handlers
Jacobsen was a contributor to UML, and the controller
pattern reflects his approach.
49
50. VISIBILITY
Visibility is the ability of one object to “see” or have
reference to another object
Visibility is required for one object to message
another
Attribute visibility: Y is an attribute of Class X
Parameter visibility: Y is parameter of Method X
Local Visibility: Y is a local object in a method of
Class X
Global Visibility: Y is globally dependent 50
51. OTHER GRASP PATTERNS
Polymorphism
Pure Fabrication
Indirection
Protected Variation
51
52. POLYMORPHISM
Problem: How to handle alternatives based on
types? (conditional themes) How to design
pluggable software components?
Solution: when the related alternatives or
behaviors vary by type, assign responsibilities for
the behavior using polymorphic operations
52
53. BENEFITS
Extensions required for new variations are easy
to add
New implementation can be introduced without
affecting clients
53
54. PURE FABRICATION
Problem: What object should have the
responsibility, when you do not want to violate
High Cohesion and Low Coupling, or other goals,
but solutions offered by Expert are not
appropriate?
Assigning responsibilities to only domain layer
software classes leads to problems in terms of
poor cohesion or coupling – low reuse!
54
55. PURE FABRICATION (2)
Solution: Assign a highly cohesive set of
responsibilities to an artificial or convenience
class that does not represent a problem domain
concept
Design of objects is divided into:
Representational decomposition
Behavioral decomposition
Benefits:
High-Cohesion
Reuse potential
55
56. INDIRECTION
Problem: Where to assign a responsibility to
avoid direct coupling between two (or more)
things? How to de-couple objects so that low
coupling is supported and reuse potential
remains high?
Solution: Assign the responsibility to an
intermediary object to mediate between other
components or services so that they are not
directly coupled.
56
57. PROTECTED VARIATIONS
Problem: How to design objects, subsystems so
that the variations or instability in these
elements does not have an undesirable impact on
other elements?
Solution: Identify points of predicated variation
or instability, assign responsibility to create a
stable interface around them.
57
58. SUMMARY
The skillful assignment of responsibilities is
extremely important in object design.
Determining the assignment of responsibilities
often occurs during the creation of interaction
diagrams , and certainly during programming.
Patterns are named problem/solution pairs that
codify good advice and principles often related to
assignment of responsibilities.
58