Please enable JavaScript.
Coggle requires JavaScript to display documents.
Topic 3: Software Reuse - Coggle Diagram
Topic 3: Software Reuse
Introduction
Today, systems must be built in a short time period. this results in an organized approach to reuse.
Component-Based-Software-Engineering (CBSE) is a process that emphasizes the design and construction of computer- based systems using reusable components.
CBSE
Software component reuse, does not just mean the reuse of code. It also includes the reuse of specifications and designs.
Types
- Code components: functions, modules, subsystems etc
- Abstract Products: specifications, designs etc.
The potential gains from reusing specifications may be greater than reusing code component. Code contains low-level detail which may specialize it to such extent that it cannot be reused. Designs or specifications are more abstract and hence more widely applicable.
Levels of reuse
- Sub-system reuse: Major sub-systems of an application may be reuse.
- Module or object reuse: Components of a system representing a collection of functions may be reuse. For eg., a C++ object implementing a binary tree may be reused in different applications.
- Application system reuse: The whole of an application system may be reused. For this the software must be portable i.e. it should execute on different platforms.
- Function reuse: Software components which implement a single function, such as mathematical functions, may be reused.
-
Reuse Techniques
software asset
is any artifact resulting from one stage in a development task. Any mapping from the artifact produced by one development stage to the artifact produced by the next
Assets can be at any level of abstraction and software process stage: such as Domain/business analysis/model & Application requirements and others.
Any information, formalism or tool used during development can also be subject to reuse ( Languages, CASE tools, IDE, processes)
Reuse Components
Object-orientation
Reuse Strengths
- Pervades all life-cycle, abstraction and executability levels
- Associated with detailed engineering processes and methods
- Classes bundle a structural and a behavioral template that is reused each time an object of the class is created
- OO platforms usually come with vast libraries of built-in classes
- Inheritance provides structural and behavioral model and code reuse through specialization
- Abstract class and interfaces provide structural and service specification reuse through variable realization/implementation
7.Private attributes accessible only through public access methods provide encapsulation, making classes and objects reusable units
- Overloading, polymorphism and dynamic binding provide client reuse across diverse realizations of servers sharing a common specification
- Entity-centered modeling at gradual abstraction levels and associated standard visual notation (UML) greatly facilitates OO model and code comprehension for white-box reuse
Reuse Weaknesses
- Public attributes break encapsulation along associations, hindering model and code element locality and thus ease of reuse
- Protected attributes and methods break encapsulation down the class hierarchy,
- Attribute value and method realization overriding down the class hierarchy breaks interface semantics inheritance and thus encapsulation
- Classes too fine grained reuse units
- Packages more adequate and more variable grained reuse units but lack most reuse-fostering features of classes
-
Framework
What is framework?
In contrast to patterns, frameworks are specific to a given domain, but independents of any particular application requirements
-
-
Reuse occurs massively at the domain engineering and design stages (almost entirely avoided) and partially at the implementation stage
-
Components
any software unit that:Is “independently” deployable (albeit) reuses/requires a set of typed and constrained operations (typically provided by other components that its uses at servers). To provide a set of typed and constrained operations. Executable by either: Humans through a user interface (stand-alone deployment)or Other software through an calling interface (for which it then acts as a server). Encapsulates:Meta-data allowing the deployment platform or development environment to automatically assemble it with other components to provide complex services Several related classes, routines, or functions
-
-
-
-
-
-
-
-
-
Modules, libraries and packages
-
- Specific to given platform
-
-
Cost Benefit Model
Total costs consist of
-
-
Costs to retrieve a component, to adapt and to integrate it.
The benefit of reusing a component is higher than the costs of its new development if it is reused at least 3 times!
Reuse is economical if adaptation costs are very low
Important: Black-box reuse is not for free 5 % basic costs