0% found this document useful (0 votes)
3 views

Lecture 9

Component-Based Software Systems (CBSS) leverage existing software components to enhance efficiency in software development by reducing costs and time to market. The component selection problem arises when developers must decide between building in-house components or purchasing Commercial Off-The-Shelf (COTS) components, evaluating them based on financial, technical, business, and legal criteria. Various methods, including Weighted Scoring, Analytical Hierarchical Process, and artificial intelligence techniques, are employed to optimize the selection of software components, focusing on minimizing coupling and maximizing cohesion for improved software quality.

Uploaded by

Raheela Nasim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lecture 9

Component-Based Software Systems (CBSS) leverage existing software components to enhance efficiency in software development by reducing costs and time to market. The component selection problem arises when developers must decide between building in-house components or purchasing Commercial Off-The-Shelf (COTS) components, evaluating them based on financial, technical, business, and legal criteria. Various methods, including Weighted Scoring, Analytical Hierarchical Process, and artificial intelligence techniques, are employed to optimize the selection of software components, focusing on minimizing coupling and maximizing cohesion for improved software quality.

Uploaded by

Raheela Nasim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

COMPONENTS SELECTION

Lecture 9
COMPONENT-BASED SOFTWARE SYSTEMS (CBSS)
Introduction:
 With the progressive development of software in recent years, software development has
become more complex; to overcome this complexity, a lot of cost and time is needed.
 An acceptable and reasonable solution is reusability of software systems.
 Component-Based Software Engineering (CBSE) is an approach to building and
development of software systems based on existing software components.
 These software systems, which have the maximum use of reusable materials, are called
Component-Based Software Systems (CBSS).
 CBSSs cause the efficiency of software development in terms of demanding lower cost,
reducing the time to market, improving maintainability, increasing reliability, and improving
other quality parameters.
 With the development of CBSE, various software components have been presented by many
software developer organizations.
 These components are called Commercial of the shelf (COTS).
Kalantri.S, H. Motameni, E. Akbari and M. Rabbani “Optimal components selection based on fuzzy‑intra coupling density for component‑based software
 The components of COTS help software developers to select a software
component from among a set of alternative software components available in the
market.
 Thus, software developers can either build their desired software components as
in-house or buy them as COTS (i.e., the build-or-buy strategy)
 Components of COTS are often built by independent teams of developers in
different languages, and applicable to different platforms with less complexity;
then, they are available as standard components in the market.
 The advantages of this type of components are the existence of different versions
of a COTS product, design diversity, diversity of data, and the diversity of
executive environment which are available in the market by different
manufacturers.

Kalantri.S, H. Motameni, E. Akbari and M. Rabbani “Optimal components selection based on fuzzy‑intra coupling density for component‑based software
 On the other hand, these products have some disadvantages, including issues
with security, consistency, integrity and interoperability, procurement and
licensing, etc.
 However, the customization of the components of in-house development makes
it compatible with the system, reliability, and support.
 Unlike the components of COTS, components of in-house prolong the time of
supplying the software product to the market.
 Thus, always there is a discussion on whether to build-or buy software
components.
 The problem of deciding optimally between COTS and in-house components is
one of the major challenges of software developers, which is known as the
component selection problem.

Kalantri.S, H. Motameni, E. Akbari and M. Rabbani “Optimal components selection based on fuzzy‑intra coupling density for component‑based software
COMPONENT SELECTION PROBLEM
 To overcome this problem, software researchers evaluate in-house and
COTS software components based on some criteria to finally decide
what components they should build and what components they should
buy. These criteria include

 Financial perspective (COTS cost, maintenance cost, upgrading cost, etc.)


 Technical perspective (reliability, safety, performance, requirements, quality,
etc.)
 Business perspective (COTS vendor recognition, COTS vendor properties,
Historical records, etc.)
 Legal perspective (type of contract, license agreement, escrow, etc.).

Kalantri.S, H. Motameni, E. Akbari and M. Rabbani “Optimal components selection based on fuzzy‑intra coupling density for component‑based software
 In addition to the above mentioned criteria, it should be noted that the efficiency of the component-
based software system significantly depends on the system architecture.
 Coupling and cohesion have a major role in reducing the complexity associated with the design
and determining the quality of a software system in terms of reliability, maintainability, and
accessibility
 Cohesion as an intra modules property refers to the amount of communication that the components
within a module have with each other (operating power of a module).
 Coupling as an inter-modules property refers to the amount of the communication of a module
with other modules (dependency between two or more modules)
 Thus, for an optimal software component selection, the interactions of components within the
modules (cohesion) need to be maximum, while the interactions between the modules (coupling)
need to be minimum.
 Software designs with high cohesion and low coupling will create independent modules that offer
some advantages, including easier development, reduced complexity, facilitated maintenance and
modifications, reduced error rate, increased reusability, parallel development, and simple
implementation.
 Intra Coupling Density (ICD) is a measure used to describe the relationship between coupling
and cohesion
Kalantri.S, H.of modules.
Motameni, E. Akbari and M. Rabbani “Optimal components selection based on fuzzy‑intra coupling density for component‑based software
 In Coupling, we need to consider some properties:

Degree
• Degree is the number of connections between the module and others. With coupling, we want
to keep the degree small. For instance, if the module needed to connect to other modules
through a few parameters or narrow interfaces, then the degree would be small, and coupling
would be loose.
Ease
• Ease is how obvious are the connections between the module and others. With coupling, we
want the connections to be easy to make without needing to understand the implementations
of the other modules.
Flexibility
• Flexibility is how interchangeable the other modules are for this module. With coupling, we
want the other modules easily replaceable for something better in the future.

https://ducmanhphan.github.io/2019-03-23-Coupling-and-Cohension-in-OOP/
COUPLING TYPES
Content coupling: it occurs when modules can correct and change internal data directly. A
module refers to another module and can be accessed without restriction.
 Content coupling is said to occur when one module uses the code of other module, for
instance a branch. This violates information hiding - a basic design concept.
Common coupling: couplings communicate with each other through data sharing. Modules
have access only to common data or common blocks (global data can be addressed and
accessed).
 Common coupling is said to occur when several modules have access to the same global
data. But it can lead to uncontrolled error propagation and unforeseen side-effects when
changes are made.
Control coupling: When one function controls the flow of another function in this method, a module sends a
control variable to another module and in this way, they can communicate with each other. It is done by setting a
control fag (or control variable) (a module sends a request to another module through the control fag).
 Control coupling is one module controlling the flow of another, by passing it information on what to do
 For example: passing a what-to-do flag.

Stamp coupling: it occurs when modules share a composite data structure. By composite data structure, we mean
that it is data that has some internal structure to it, such as a record.
• Stamp coupling occurs when modules share a composite data structure and use only parts of it, possibly different
parts(E.g: passing a whole record to a function that needs only one field of it).
• In this situation, a modification in a field that a module does not need may lead to changing the way the module
reads the record.
Data coupling: a module sends data to another one considering its needs. All data must be homogeneous.
 Data coupling occurs when modules share data through, for example, parameters. Each datum is an elementary
piece, and these are the only data shared (Ex: passing an integer to a function that computes a square root).
PARAMETERS USED IN
COUPLING FORMULA
CALCULATION METHODS OF COUPLING
 CBO, RFC, CF, OCM, CCM, and DAC are Metrics for Object-Oriented Design (MOOD) coupling's
metrics
 CBO (Coupling Between Object Classes) shows how many classes couple together and identifies the
amount of coupling.
 RFC (Response for Class) as a response set includes all methods in a class and other calling classes from
the same class (we will consider the concept of coupling when a class is available in another class; at least
some parts of this class are called by another one).
 CF (Coupling factor) can be calculated by formula and it indicates the number of coupled class pairs
divided by the total number of class pairs.

 DAC (Data abstraction coupling) equals the number of class features (methods and variables) that other
classes use as their data.
DETERMINING THE COHESION
 Cohesion is defined based on internal communication between modules, it can be computed in
many ways. According to coupling classification, the Myers method presents a different
classification for cohesion. To offer a more accurate method this classification is used. Myers
classified cohesion into six types:
 Logical
 Temporal
 Procedural
 Communicational
 Sequential
 Functional
COHESION TYPES
Logical cohesion: elements that have the same operation are considered as the same method.
• Logical cohesion is when parts of a module are grouped because they are logically categorized to
do the same thing even though they are different by nature.
• For example: grouping all mouse and keyboard input handling routines.
Temporal cohesion: elements that have the same operation are placed in a method and they
operate simultaneously.
 Temporal cohesion is when parts of a module are grouped by when they are processed - the parts
at a particular time in program execution.
 For example: A function which is called after catching an exception which closes open files,
creates an error log, and notifies the user.
Procedural cohesion: elements from a method are connected together through some control flows.
 Procedural cohesion is when parts of a module are grouped because they always follow a certain
sequence of execution.
 For example: a function which checks file permissions and then opens the file.
Communicational cohesion: it covers the elements that have procedural cohesion and work on the same data set.
 Communicational cohesion is when parts of a module are grouped because they operate on the same data.
 There are cases where communicational cohesion is the highest level of cohesion that can be attained under the
circumstances.
 For example: a module which operates on the same record of information

Sequential cohesion: the elements of a method that have communicational cohesion and are connected together
by regular control flow have sequential cohesion.
 Sequential cohesion is when parts of a module are grouped because the output from one part is the input to
another part like an assembly line.
 For example: a function which reads data from a file and processes the data.

Functional cohesion: the elements of a method that have a sequential cohesion and also have the same work or
the same goal are said to have functional cohesion.
 Functional cohesion is when parts of a module are grouped because they all contribute to a single well-defined
task of the module.
 While functional cohesion is considered the most desirable type of cohesion for a software module, it may no be
achievable.

https://ducmanhphan.github.io/2019-03-23-Coupling-and-Cohension-in-OOP/
 For example

https://ducmanhphan.github.io/2019-03-23-Coupling-and-Cohension-in-OOP/
PARAMETERS OF COHESION
OPTIMIZATION METHODS OF SOFTWARE COMPONENTS SELECTION

 In a general classification, the methods of selecting the optimal components in


component-based software systems include the methods based on the
Weighted scoring method, the methods based on Analytical Hierarchical
Process (AHP), the methods based on artificial intelligence, and the methods
based on optimization.
WEIGHTED SCORING METHOD
 The Weighted scoring method (WSM) is one of the oldest methods in the selection of
components and software packages.
 In cases where the issue of Multi-Criteria Decision Making (MCDM) exists for n number of
candidate components and m criteria, manual weighting method will be applied.
 This method, although, is simple and implementable, but if the customer needs change at the
last minute, the score for each component changes according to the evaluation criteria, and it
should be updated before the final calculation.
 As the process of weighting is manual, it is considered duplication and process is complicated.
 For selecting the best component out of the various candidate components, using WSM, five
steps are taken as shown in Fig 1.
Kaur.L and H. Singh.2014. Software Component Selection techniques - A review
 Consider a situation in which we have to select a component on the basis of 5 selection
criteria:- greatest ease of use, having least system overhead, least response time, least cost
and high customizability. Weights are assigned accordingly so as to state the relative
importance of each selection criteria. As it can be seen, least cost is the most important
selection criteria. The four candidate components are assigned their performance on each
criteria on the scale of 1-5. The final score of each component is calculated using the
following formula

S(Ai)=ΣWjSij
Where sum is over j=1,2,…, n; Wj is weight of jth criterion; Sij is score that measures how
well a candidate component (Ai) performs on a selection criterion. Thus in the example given
below (Table 1) we can see that Component 1 (C1) is the best for selection according to the
selection criterias since it has the highest score out of the four alternatives.
Though this selection technique is extremely simple and convenient to use, the main
disadvantage is that it cannot be used for a large number of alternatives since it is a manual
process. Also, if the user requirements change at the last moment, the score of each alternative
with respect to each evaluation criteria changes and this change needs to be upgraded before
calculating final score.
Kaur.L and H. Singh.2014. Software Component Selection techniques - A review
Kaur.L and H. Singh.2014. Software Component Selection techniques - A review
ANALYTICAL HIERARCHICAL PROCESS
 This method allows consideration of both qualitative and quantitative factors in selecting the
best alternative. In short, it uses an ‘eigen value’ approach to derive ratio scales from paired
comparisons. In general, paired comparison takes this form: “How important is criteria Ci
relative to criteria Cj?.The performances of the various alternatives are caliberated with the
help of a numeric scale which ranges from 1/9 to 9. A score of 1/9 indicates ‘least valued
than’, a score of 1 indicates ‘equal to’ and a score of 9 indicates ‘most important than’. The
AHP methodology is based on three principles: decomposition, comparative judgments; and
synthesis of priorities.
(a) The decomposition step involves defining the problem, deciding the criteria that influences
the selection process and structuring the problem in a hierarchy of different levels constituting
goal, criteria, sub-criteria and alternatives.
(b) With the comparative judgments, users are required to set up a comparison matrix at each
level of hierarchy by comparing pairs of criteria or subcriteria. Next step is to rate the relative
importance of these criteria using pair-wise comparisons. This includes the comparison of each
element in the corresponding level and its appropriate value on the numerical scale.
Kaur.L and H. Singh.2014. Software Component Selection techniques - A review
(c) The final stage is to calculate aggregate performance value
for each alternative and ranking of alternatives according to
their performance.
 Though this technique is more organized in terms of its structure its
limitations lie in the number of pair-wise comparisons (and therefore
time) required. In addition to this, AHP also suffers from rank-reversal
problem which can be rectified using the multiplicative-formula for
aggregation.

Kaur.L and H. Singh.2014. Software Component Selection techniques - A review


ARTIFICIAL INTELLIGENCE‑BASED METHODS

 The methods such as neural network, Decision Tree, fuzzy classifier, deductive
method, and collective intelligence are a number of methods working based on
artificial intelligence.
 In this category, a technique for training AI classifiers described to assist in the
selection of software components for development projects.
 Researchers believe that when using AI, we are able to represent dependencies
between attributes, overcoming some of the limitations of existing
aggregation-based approaches to CS.
ARTIFICIAL INTELLIGENCE‑BASED METHODS
 The Rule Base Reasoning (RBR) and Case Base Reasoning (CBR) methods are two fundamental techniques
of Knowledge Base System (KBS).
 KBS provides a mechanism to systematically arrange the knowledge and produce a tool that assists decision
makers in evaluation and selection of the software packages. The methodology proposed by the authors is
explained in Fig 2.
 RBR assisted the user in deciding the evaluation criteria and capture the requirements of the ideal software
package. The rules in the presented system were written in a simple IF-THEN-ELSE format. User requirements
of the software package are collected in the form of feature and feature value.
 CBR compared the ideal user requirements of the desired software to the candidate software packages. These
candidates were stored as ‘cases’ in the case-base of the system.
 Result set of the system presented the candidate components ranked on the basis of the similarity score. This
similarity score stated so as to how well each candidate software meets the needs of the desired software package
 This similarity identifies the software component that responds to the system ideal needs.
 Hybrid Knowledge Base System (HKBS), compared to the AHP and WSM methods, is more efficient because
it offers the computational efficiency, ease of problem-solving, knowledge reuse, compatibility, and evaluation of
the results.
Kaur.L and H. Singh.2014. Software Component Selection techniques - A review
Kaur.L and H. Singh.2014. Software Component Selection techniques - A review
 A comparison was also conducted between the WSM, AHP and the proposed HKBS
technique by the authors and it was proved that HKBS method for the evaluation and
selection of the software components is relatively better than AHP and WSM
techniques where the

 computational efficiency
 ease in problem solving
 knowledge reuse and
 consistency and presentation of the evaluation results is concerned

Kaur.L and H. Singh.2014. Software Component Selection techniques - A review


REFRENCES
 Kalantri.S, H. Motameni, E. Akbari and M. Rabbani “Optimal components
selection based on fuzzy‑intra coupling density for component‑based software
systems under build‑or‑buy scheme
 Kaur.L and H. Singh.2014. Software Component Selection techniques - A
review
 https://ducmanhphan.github.io/2019-03-23-Coupling-and-Cohension-in-OOP/

You might also like