Component Level Design - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Component Level Design

Description:

... are responsible for supporting the processing required in the application ... Principle (OCP) - class should be open for extension but closed for modification ... – PowerPoint PPT presentation

Number of Views:207
Avg rating:3.0/5.0
Slides: 17
Provided by: renetab
Category:

less

Transcript and Presenter's Notes

Title: Component Level Design


1
Component Level Design
2
What is a Component?
  • Has 3 Characteristics
  • - Modular - A portion of a program that
    performs a specific function. Can be combined
    with other modules of the same program.
  • - Deployable
  • - Replaceable Can be replaced by other
    similar modules
  • In Object Oriented view of a Component is that
    it is a set of collaborating classes

3
Why do we care about Components Level Design?
  • Positives
  • To define data structures, algorithms, interface
    characteristics, and communication mechanisms for
    each software component.
  • Represents the software in a way that allows the
    designer to review it for correctness and
    consistency, before it is built.
  • The CLD each software component is represented
    using graphical, tabular, or text-based notation.

4
The Three Types Of Components
  • Control components - coordinates all of the
    other components
  • Problem domain components - implement a
    function required by the customer
  • Infrastructure components - are responsible for
    supporting the processing required in the
    application

5
Object Oriented Component Design
  • Focuses on the elaboration of Domain specific
    classes and the definition of Infrastructure
    classes
  • A detailed description of class attributes,
    operations, and interfaces is required prior to
    beginning the design

6
Principles For Designing Class-based Components
  • Open-Closed Principle (OCP) - class should be
    open for extension but closed for modification
  • Liskov Substitution Principle (LSP) - subclasses
    should be substitutable for their base classes
  • Dependency Inversion Principle (DIP) - depend on
    abstractions, do not depend on concretions
  • Interface Segregation Principle (ISP) - many
    client specific interfaces are better than one
    general purpose interface

7
Principles For Designing Class-based Components
  • Release Reuse Equivalency Principle (REP) - the
    granule of reuse is the granule of release
  • Common Closure Principle (CCP) - classes that
    change together belong together
  • Common Reuse Principle (CRP) - classes that
    can't be used together should not be grouped
    together

8
UML Unified Markup Language
  • The Unified Modeling Language (UML) is a
    standard  language for specifying, visualizing,
    constructing, and documenting the artifacts of
    software systems

9
Goals of UML
  1. Provide users with a expressive visual modeling
    language so they can develop and exchange
    meaningful models.
  2. Provide extensibility and specialization
    mechanisms to extend the core concepts.
  3. Be independent of particular programming
    languages and development processes.
  4. Provide a formal basis for understanding the
    modeling language.
  5. Encourage the growth of the OO tools market.
  6. Support higher-level development concepts such as
    collaborations, frameworks, patterns and
    components.

10
UML Class Diagram
  • Association relationship
  • Inheritance

11
Cohesion
  • Utility cohesion - components grouped within the
    same category but are otherwise unrelated
  • Temporal cohesion - operations are performed to
    reflect a specific behavior or state
  • Procedural cohesion - components grouped to
    allow one be invoked immediately after the
    preceding one was invoked with or without
    passing data
  • Communicational cohesion - operations required
    same data are grouped in same class

12
Cohesion
  • Sequential cohesion - components grouped to
    allow input to be passed from first to second
    and so on
  • Layer cohesion - exhibited by package components
    when a higher level layer accesses the services
    of a lower layer, but lower level layers do not
    access higher level layer services
  • Functional cohesion - module performs one and
    only one function

13
Coupling
  • Data coupling - occurs when long strings of
    arguments are passed between components
  • Stamp coupling - occurs when parts of larger
    data structures are passed between components
  • Control coupling - occurs when one component
    passes control flags as arguments to another
  • External coupling - occurs when a component
    communicates or collaborates with in
    infrastructure component (e.g., database)

14
Coupling
  • Common coupling - occurs when several components
    make use of a global variable
  • Content coupling - occurs when one component
    surreptitiously modifies internal data in
    another component
  • Routine call coupling - occurs when one operator
    invokes another
  • Type use coupling - occurs when one component
    uses a data type defined in another
  • Inclusion or import coupling - occurs when one
    component imports a package or uses the content
    of another

15
Steps For Conducting Component Level Design
  • Identify all design classes that correspond to
    the problem domain.
  • Identify all design classes that correspond to
    the infrastructure domain.
  • Elaborate all design classes that are not
    acquired as reusable components.
  • Specify message details when classes or
    components collaborate.
  • Identify appropriate interfaces for each
    component.
  • Elaborate attributes and define data types and
    data structures required to implement them.
  • Describe processing flow within each operation in
    detail.

16
Steps For Conducting Component Level Design
  • 4. Identify persistent data sources (databases
    and files) and identify the classes required to
    manage them.
  • 5. Develop and elaborate behavioral
    representations for each class or component.
  • 6. Elaborate deployment diagrams to provide
    additional implementation detail.
  • 7. Factor every component-level diagram
    representation and consider alternatives.
Write a Comment
User Comments (0)
About PowerShow.com