Subscribe by Email


Showing posts with label Cohesion. Show all posts
Showing posts with label Cohesion. Show all posts

Sunday, August 14, 2011

What are User Interface Design and Operation oriented Metrics?

User interface design metrics are fine but above all else, be absolutely sure that your end users like the interface and are comfortable with the interactions required.
- Layout appropriateness is a design metric for human computer interface. The layout entities like graphic icons, text, menus, windows are used to assist the user.
- The cohesion metric for user interface measures the connection of on screen content to other on screen content. UI cohesion is high if data on screen belongs to single major data object. UI cohesion is low if different data are present and related to different data objects.
- The time required to achieve a scenario or operation, recover from an error, text density, number of data or content objects can be measured by direct measures of user interface interaction.

Operation oriented metrics are:
- Operation complexity is computed using complexity metrics because operations should be limited to a specific responsibility.
- Operation size depends on lines of code. As the number of messages sent by
a single operation increases, responsibilities have not been well allocated within a class.
- Average number of parameters per operation is defined as: larger the number of operation parameters, more complex is the relation between objects.


Friday, August 5, 2011

What are different component level design metrics?

Component level design focuses on internal workings of software and include measures: cohesion, coupling, and complexity. It helps in judging the quality of a component level design. Once a procedural design is developed, component level design metrics can be applied. It is possible to compute measures of the functional independence, coupling and cohesion of a component and to use these to assess the quality of design.

The cohesiveness of a module can be described by a set of metrics:
- Data slice which is defined as a backward walk that searches for data values that can affect the state of the module.
- Data tokens are variables defined for a module.
- Glue tokens are set of data tokens on data slice.
- Superglue tokens are data tokens common to every data slice in a module.
- Stickiness of glue token is directly proportional to number of data slices it binds.

Coupling metrics is an indication of connectedness of a module to other modules. The metric for module coupling encompasses data and control flow coupling, global coupling and environmental coupling.

Complexity metrics are used to predict critical information about the reliability and maintainability of software systems from automatic analysis of source code. It also provides feedback during software project to help control the design activity. Cyclomatic complexity is the most widely used complexity metric.


Tuesday, April 12, 2011

What is Design Engineering? What are different design concepts?

Design engineering focuses on the creation of a representation or model that are concentrated on architecture of the software, data structures, interfaces and components that are necessary to implement the software.

The design process is an iterative process of refinement, i.e.from a higher level of abstraction to lower levels of abstraction. The design should implement both explicit and implicit requirements. It should be readable and understandable. It provides an over-all illustration of the software from the perspective of the data, function and behavior.

Design concepts provides the software engineer a foundation from which design methods can be applied. These concepts include:
- Abstractions: Software engineers different levels of abstractions as we design the blueprint of the software. Two types of abstraction called data and procedural abstractions are defined.
- Modularity: It leads to information hiding and encourages functional independence.
- Coupling: It is the degree of interconnectedness between design objects. Two types of coupling are used: Interaction and Inheritance Coupling.
- Cohesion: It is the measure to which an element contributes to a single purpose.
- Refinement: Abstraction complements refinement as they enable a software engineer to specify the behavior and data of a class or module yet suppressing low levels of detail.
- Refactoring: It simplifies the design of the component without changing its function and behavior.

The work product of the design engineering phase is the design model which consists of the architectural design, data design, interface design and component-level design and deployment level design.


Friday, February 18, 2011

Component Level Design - Designing Class based Components - Cohesion

Cohesion in context with component level design refers that a component or class encapsulates only attributes and operations that are closely related to each other and to the class or component itself.

TYPES OF COHESION


Functional
It is exhibited mainly by operations. This type of cohesion occurs when a module performs one and only one computation and then returns a result.
Layer
It is exhibited by packages, components, and classes. This type of cohesion occurs when a higher layer accesses the services of a lower layer, but lower layers do not access higher layers.
Temporal
Operations that are performed to reflect a specific behavior or state.
Procedural
Components and operations are grouped together. It allows one to be invoked immediately after preceding one was invoked. It is done even if there is no data is passed between them.
Communicational
Operation on same data are defined in one class. Classes and components that exhibit functional, layer, and communicational cohesion are easy to implement, test and maintain.
Sequential
Components and operations are grouped in such a manner that the first one provides input to the second one and so on.
Utility
Components, classes, or operations exist in the same category but are otherwise unrelated are grouped together. This type is less used.


Thursday, November 26, 2009

Component Level Design Metrics

Component level design metrics for software components focus on internal characteristics of a software component and include measures of the three Cs - module cohesion, coupling, and complexity.

- Cohesion Metrics :It defines a collection of metrics that provide an indication of the cohesiveness of a module.The metrics are defined in terms of five concepts :
* Data slice - data values within the module that affect the module location at which a backward trace began.
* Data tokens - Variables defined for a module
* Glue Tokens - The set of tokens lying on multiple data slices
* Superglue tokens - The set of tokens on all slices
* Stickiness - of a glue token is proportional to number of data slices that it binds
* Strong Functional Cohesion
SFC(i) = SG(i)/tokens(i)

- Coupling Metrics : Module coupling provides an indication of the connectedness of a module to other modules, global data, and the outside environment.
* Data and control flow coupling
di = number of input data parameters
ci = number of input control parameters
d0 = number of output data parameters
c0 = number of output control parameters
* Global coupling
gd = number of global variables used as data
gc = number of global variables used as control
* Environmental coupling
w = number of modules called (fan-out)
r = number of modules calling the module under consideration (fan-in)
* Module Coupling:
mc = 1/ (di + 2*ci + d0 + 2*c0 + gd + 2*gc + w + r)
mc = 1/(1 + 0 + 1 + 0 + 0 + 0 + 1 + 0) = .33 (Low Coupling)
mc = 1/(5 + 2*5 + 5 + 2*5 + 10 + 0 + 3 + 4) = .02 (High Coupling)


Facebook activity