The document discusses the General Responsibility Assignment Software Patterns (GRASP) principles for assigning responsibilities to classes in object-oriented design. It outlines the 9 main GRASP principles - Information Expert, Creator, Low Coupling, Controller, High Cohesion, Polymorphism, Pure Fabrication, Indirection, and Protected Variations. For each principle, it provides the problem it addresses, the suggested solution, an example of how to apply the principle, and benefits and pros/cons. The principles provide guidance on how to distribute responsibilities among classes to achieve well-structured and maintainable object-oriented software designs.
In software engineering and software architecture design, design decisions address architecturally significant requirements; they are perceived as hard to make and/or costly to change. It is called also architecture strategies and tactics.
In software engineering and software architecture design, design decisions address architecturally significant requirements; they are perceived as hard to make and/or costly to change. It is called also architecture strategies and tactics.
The objective is to explain how a software design may be represented as a set of interacting objects that manage their own state and operations and to introduce various models that describe an object-oriented design.
Unit testing is often automated but it can also be done manually. Debugging is a process of line by line execution of the code/ script with the intent of finding errors/ fixing the defects.
UML stands for Unified Modelling Language.
UML is a standard language for specifying, visualizing, constructing, and documenting a system in which software represents the most significant part.
UML is different from the other common programming languages like C++, Java, COBOL etc.
UML is a pictorial language used to make software blue prints.
UML can serve as a central notation for software development process. Using UML helps project teams communicate, explore potential designs, and validate the architectural designs of software.
UML diagrams are made using notation of things and relationships.
The building blocks of UML can be defined as:
Things
Relationships
Diagrams
Things: Things are the most important building blocks of UML. Things can be:
Structural
Behavioral
Grouping
Annotational
The Structural things define the static part of the model. They represent physical and conceptual elements. Following are the brief descriptions of the structural things.
Class: Class represents set of objects having similar responsibilities.
Interface: Interface defines a set of operations which specify the responsibility of a class.
Collaboration: Collaboration defines interaction between elements.
Use case: Use case represents a set of actions performed by a system for a specific goal.
Component: Component describes physical part of a system.
Node: A node can be defined as a physical element that exists at run time.
A behavioral thing consists of the dynamic parts of UML models. Following are the behavioral things:
Interaction: Interaction is defined as a behavior that consists of a group of messages exchanged among elements to accomplish a specific task.
State machine: State machine is useful when the state of an object in its life cycle is important. It defines the sequence of states an object goes through in response to events. Events are external factors responsible for state change.
Process models are not perfect, but provide road map for software engineering work. Software models provide stability, control, and organization to a process that if not managed can easily get out of control
Software process models are adapted to meet the needs of software engineers and managers for a specific project.
The objective is to explain how a software design may be represented as a set of interacting objects that manage their own state and operations and to introduce various models that describe an object-oriented design.
Unit testing is often automated but it can also be done manually. Debugging is a process of line by line execution of the code/ script with the intent of finding errors/ fixing the defects.
UML stands for Unified Modelling Language.
UML is a standard language for specifying, visualizing, constructing, and documenting a system in which software represents the most significant part.
UML is different from the other common programming languages like C++, Java, COBOL etc.
UML is a pictorial language used to make software blue prints.
UML can serve as a central notation for software development process. Using UML helps project teams communicate, explore potential designs, and validate the architectural designs of software.
UML diagrams are made using notation of things and relationships.
The building blocks of UML can be defined as:
Things
Relationships
Diagrams
Things: Things are the most important building blocks of UML. Things can be:
Structural
Behavioral
Grouping
Annotational
The Structural things define the static part of the model. They represent physical and conceptual elements. Following are the brief descriptions of the structural things.
Class: Class represents set of objects having similar responsibilities.
Interface: Interface defines a set of operations which specify the responsibility of a class.
Collaboration: Collaboration defines interaction between elements.
Use case: Use case represents a set of actions performed by a system for a specific goal.
Component: Component describes physical part of a system.
Node: A node can be defined as a physical element that exists at run time.
A behavioral thing consists of the dynamic parts of UML models. Following are the behavioral things:
Interaction: Interaction is defined as a behavior that consists of a group of messages exchanged among elements to accomplish a specific task.
State machine: State machine is useful when the state of an object in its life cycle is important. It defines the sequence of states an object goes through in response to events. Events are external factors responsible for state change.
Process models are not perfect, but provide road map for software engineering work. Software models provide stability, control, and organization to a process that if not managed can easily get out of control
Software process models are adapted to meet the needs of software engineers and managers for a specific project.
To maximize your Oracle investment and drive innovation, it's important to have a clear understanding of your business goals and how Oracle's technologies can help you achieve them. Start by identifying the Oracle products and services that are most relevant to your needs, and then work with a trusted partner or consultant to develop a comprehensive strategy for implementation and ongoing maintenance.
In this webinar on demand you'll learn how organizations leverage Oracle Cloud support strategies and increase focus on core business processes while boosting end-user satisfaction. We will show some strategies to help you improve response times, leverage the latest functionality, and lower your total cost of ownership. There will be an open Q&A at the end of our session.
IBM Cloud Service Management and Operations Field GuideCarol Wingfield
The easy to digest IBM Cloud Service Management and Operations Field Guide documents IBM’s approach to designing, implementing, and continuously improving the operations management processes you use in your enterprise.
Please always visit ibm.biz/csmo-field-guide for the latest version.
APM members were guests of Lockheed Martin for this interactive presentation which outlined Lockheed Martin’s experience in implementing Enterprise Agile across the corporation. This presentation focuses on management practices and lessons learned.
9 Principles for Salesforce Application ArchitectureSteven Herod
To balance complexity with desired business outcomes, architects should consider 9 key principles which guide the decisions you need to make when designing. This session will outline the principles and how they impact the overall solution, including: Licensing Leads the Way Structure is Essential Start with the Data Model Security from the Start Use the Product Configure, Enhance, Extend, But Rarely Replace Code is not Evil Use the AppExchange Thoughtfully Adopt the New when Ready; Retire the Old when Possible
https://www.salesforce.com/video/7810553/
Enterprise resource planning (ERP) is an enterprise-wide information system designed to coordinate all the resources, information, and activities needed to complete business processes such as order fulfillment or billing. ... Ideally, the data for the various business functions are integrated.
Improving the Quality of Existing SoftwareSteven Smith
Given at DogFoodCon 2016 in Columbus, Ohio
As developers, most of our time is spent working on existing software – even if it’s just the software we wrote ourselves, yesterday. And over time, software rots. If were not diligent, our beautiful code can degrade into a worthless mess. Keeping our code in working condition is no different than changing the oil in our car “ its preventive maintenance. In this session, Steve will cover some common places to look for signs of degradation in existing applications, and describe the steps we can take to improve our code. Examples will use C# and primarily ASP.NET.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
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!
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, 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.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaYara Milbes
Discover the transformative power of the WhatsApp API in our latest SlideShare presentation, "Top 7 Unique WhatsApp API Benefits." In today's fast-paced digital era, effective communication is crucial for both personal and professional success. Whether you're a small business looking to enhance customer interactions or an individual seeking seamless communication with loved ones, the WhatsApp API offers robust capabilities that can significantly elevate your experience.
In this presentation, we delve into the top 7 distinctive benefits of the WhatsApp API, provided by the leading WhatsApp API service provider in Saudi Arabia. Learn how to streamline customer support, automate notifications, leverage rich media messaging, run scalable marketing campaigns, integrate secure payments, synchronize with CRM systems, and ensure enhanced security and privacy.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
1. Boutique product development company
It is amazing what you can accomplish when you have a client-centric team to deliver outstanding products.
2. GRASP
PRINCIPLES
Boutique product development company
It is amazing what you can accomplish when you have a client-centric team to deliver outstanding products.
Raheel Arif | Software Engineer
3. Understanding responsibilities is key to object-oriented
design - Martin Fowler
GRASP
o GRASP = General Responsibility Assignment Software
Patterns
o A set of principles for assigning responsibilities to classes –
the key skill in OO software design
Raheel Arif | Software Engineer
4. GRASP PRINCIPLES
Raheel Arif | Software Engineer
9 GRASP principles:
o Information Expert
o Creator
o Low Coupling
o Controller
o High Cohesion
o Polymorphism
o Pure Fabrication
o Indirection
o Protected Variations
5. GRASP Principles
Information Expert
Problem: What is a general principle for assigning
responsibilities to objects?
Solution: Assign a responsibility to the information expert, that
is, the class that has the information necessary to fulfill the
responsibility.
Example: E.g., Board information needed to get a Square
Raheel Arif | Software Engineer
6. GRASP Principles
Pros and Cons
• Facilitates information encapsulation: why?
o Classes use their own info to fulfill tasks
• Encourages cohesive, lightweight class definitions
But:
• Information expert may contradict patterns of
Low Coupling and High Cohesion
Raheel Arif | Software Engineer
7. GRASP Principles
Creator
Problem: Who creates an A?
Solution: Assign class B the responsibility to create an
instance of class A if one of these is true (the more the
better):
• B "contains" or compositely aggregates A.
• B records instances of A
• B closely uses A
• B has the initializing data for A.
Raheel Arif | Software Engineer
10. GRASP Principles
Low Coupling
Problem: How to support low dependency, low change
impact, increased reuse?
Solution: Assign a responsibility so coupling is low.
Coupling – a measure of how strongly one element is
connected to, has knowledge of, or relies on other elements
Raheel Arif | Software Engineer
11. GRASP Principles
Low Coupling
A class with high coupling relies on many other classes –
leads to problems:
• Changes in related classes forces local changes
• Harder to understand in isolation
• Harder to reuse
Raheel Arif | Software Engineer
13. GRASP Principles
Benefits
• Understandability: Classes are easier to understand in
Raheel Arif | Software Engineer
isolation
• Maintainability: Classes aren’t affected by changes in
other components
• Reusability: easier to grab hold of classes
14. GRASP Principles
Controller
Problem: Who should be responsible for handling a system
event? (Or, what object receives and coordinates a system
operation?)
Solution: Assign the responsibility for receiving and/or
handling a system event to one of following choices:
• Represent the overall system, device or subsystem
(façade controller)
• Represent a use case scenario within which the system
event occurs (a <UseCase>Handler)
Raheel Arif | Software Engineer
15. GRASP Principles
High Cohesion
Problem: How to keep classes focused and manageable?
Solution: Assign responsibility so that cohesion remains
high.
Cohesion measures how strongly related and focused are
the responsibilities of an element
Raheel Arif | Software Engineer
16. GRASP Principles
High Cohesion
Problems from low cohesion (does many unrelated things or
does too much work):
• Hard to understand/comprehend
• Hard to reuse
• Hard to maintain
Brittle – easily affected by change
Raheel Arif | Software Engineer
18. GRASP Principles
High Cohesion
• Very low cohesion – a class is responsible for many things
in different functional areas
• High cohesion – a class has moderate responsibilities in
one functional area and collaborates with other classes to
fulfill tasks
Raheel Arif | Software Engineer
19. GRASP Principles
High Cohesion
Typically high cohesion => few methods with highly related
functionality
Benefits of high cohesion:
• Easy to maintain
• Easy to understand
• Easy to reuse
Raheel Arif | Software Engineer
20. GRASP Principles
Polymorphism
Problem: How to handle alternatives based on type?
How to create pluggable software components
Solution: When related alternatives or behaviors vary by
type (class), assign responsibilities for the behavior—using
polymorphic operations—to the
types for which the behavior varies.
• Polymorphic operations are those that operate on
Raheel Arif | Software Engineer
differing classes
• Don’t test for the type of the object and use conditional
logic to perform varying statements based on type.
21. GRASP Principles
Monopoly Problem: How to Design for Different Square Actions?
Raheel Arif | Software Engineer
23. GRASP Principles
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 (for example)
are not appropriate?
Solution: Assign a highly cohesive set of responsibilities to
an artificial or convenience class that does not represent a
problem domain concept something made up, to support
high cohesion, low coupling, and reuse.
Raheel Arif | Software Engineer
24. GRASP Principles
Pure Fabrication- Example
Who should be responsible for saving Sale instances in a
relational database?
- by Information Expert ??
- leads to low cohesion
- and high coupling
- better: create (“fabricate”) a new class that has this
Raheel Arif | Software Engineer
responsibility
25. GRASP Principles
Indirection
Sometimes objects must interact with other objects or external
systems, which may change (or replaced) in future. Direct coupling to
such objects or systems may result in modification in our objects
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 higher?
Solution:
Assign the responsibility to an intermediate object to mediate
between other components or services so that they are not directly
coupled. The intermediary creates an indirection between other
components.
Raheel Arif | Software Engineer
26. GRASP Principles
Indirection--A Simple Example
Consider a CreditAuthorizationService class that needs to
use a Modem
Bad approach:
Put low-level calls to the Modem API directly in the methods of the
CreditAuthorizationClass
Better approach:
Add an intermediateModemclass that insulates
CreditAuthorizationClass from the Modem API.
Raheel Arif | Software Engineer
27. GRASP Principles
Indirection--A Simple Example
Problems:
In a Sales System, there are multiple external third-party tax calculators
that must be supported.
The system needs to be able to integrate with different calculators
according to some conditions.
For example; if total is above 500TL it uses the external "Tax Master"
program, otherwise "Good As Gold" program.
Each tax calculator has a different interface .
One product may support a raw TCP socket protocol, another may offer a
SOAP interface, and a third may offer a Java RMI interface.
In the future, a new calculator program may be integrated into the system
or an existing calculator may be removed
Actually Sale class is responsible to calculate the total and therefore needs
the tax.
However, we want to keep our system (Sale) independent from the varying
external tax calculators.
Raheel Arif | Software Engineer
28. GRASP Principles
Example: Third-Party (External) Tax Calculators in the NextGen System
Raheel Arif | Software Engineer
29. GRASP Principles
Example: Third-Party (External) Tax Calculators in the NextGen System
Raheel Arif | Software Engineer
30. GRASP Principles
Indirection - Notes
● The GoF Proxy, Bridge, and Mediator patterns utilize indirection.
● For that matter, classes created for Indirection are usually also Pure
Fabrications, thus exemplifying two patterns for the price of one. :-)
Raheel Arif | Software Engineer
● Lower coupling between components
● Indirection is pervasive in computer science:
"Most problems in computer science can be solved by another
level of indirection."- David Wheeler
..but:
"Most problems in performance can be solved by removing
another layer of indirection." - anonymous
31. GRASP Principles
Protected Variations
Problem: How to design objects, subsystems, and systems so that
the variations or instability in these elements does not have an
undesirable impact on other elements?
Solution: Identify points of predicted variation or instability; assign
responsibilities to create a stable interface around them.
(The term "interface" is used in the broadest sense of an access
view; it does not literally only mean something like a Java interface.
Raheel Arif | Software Engineer
32. GRASP Principles
Protected Variations - Example
Problem: a client explained that the logistical support application
used by an airline was a maintenance headache. There was frequent
modification of the business logic to support the logistics. How do you
protect the system from variations at this point?
Raheel Arif | Software Engineer
33. GRASP Principles
Protected Variations - Example
Solution: A rules engine was added to the system, and an external
rule editor let the subject matter experts update the rules without
requiring changes to the source code of the system.
Raheel Arif | Software Engineer
34. GRASP Principles
Thank you for your time
If you have any questions
then please ask
Waleed Bin Dawood | Software Engineer