Presentation is loading. Please wait.

Presentation is loading. Please wait.

Developed by Reneta Barneva, SUNY Fredonia Component Level Design.

Similar presentations


Presentation on theme: "Developed by Reneta Barneva, SUNY Fredonia Component Level Design."— Presentation transcript:

1 Developed by Reneta Barneva, SUNY Fredonia Component Level Design

2 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia UML Class Diagram Association relationship Inheritance

11 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia 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 Developed by Reneta Barneva, SUNY Fredonia Steps For Conducting Component Level Design 1. Identify all design classes that correspond to the problem domain. 2. Identify all design classes that correspond to the infrastructure domain. 3. Elaborate all design classes that are not acquired as reusable components. a.Specify message details when classes or components collaborate. b.Identify appropriate interfaces for each component. c.Elaborate attributes and define data types and data structures required to implement them. d.Describe processing flow within each operation in detail.

16 Developed by Reneta Barneva, SUNY Fredonia 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.


Download ppt "Developed by Reneta Barneva, SUNY Fredonia Component Level Design."

Similar presentations


Ads by Google