A Brief Guide to Reusability

DescriptionA reusability refers to the reuse of a product. In
software engineering and computer science, reusability describes the
reuse of existing resources in any form within the software development
cycle; these resources include source code, test cases, libraries and
other executable files, etc. In software engineering this is often
expressed as – if an application can be reused it can run many times
without requiring modifications or additional investments. For example,
consider the classic game “Space Invaders”. If you can repeat the game
over again without any special effort, the reusability of this software
makes it possible to implement the game in various different
environments. techkite.net
Software reusability has important consequences in the quality of a software product. For example, if the same source code that produces two distinct programs can be reused to produce a third program, then the programmer can optimize his or her production process by reducing the number of times the source code has to be written. Likewise, reusability means that a program can be written once, compiled multiple times, and executed without changing the code at all; however, this last scenario does not mean that programmers should rewrite their source code just to make it run faster. Rather, if the implementation simply involves modification of the implementation details, then reusability permits programmers to change a program’s behavior without changing its source code.
What are some common examples of reusability? The software “dependency model” is an example of reusability. In the dependency model, a single machine instruction is used to link together independent units that make up a product’s core modules. The product’s generic structure and code are stored in its own module. This example illustrates how reusability can benefit programmers by rewriting their source codes in a way that allows them to reuse their modules and avoid writing separate definitions for each module.
Another example of reusability is “design pattern.” A designer who is planning the architecture of a new product may come up with several alternative designs, from which the desired result may be chosen. Although a reusing approach will not solve all design problems, it can make the job of a programmer more focused because all the alternatives have already been solved. The reusing approach can also lead to fewer bugs because only the specific problem was solved by refactoring the application. This is also good for the overall efficiency of a system, since reuses are less likely to introduce bugs into a system than are design patterns.
How do I decide whether a piece of software is reusable or not? First, the software must satisfy three criteria. It must be essential, it must be needed, and it must be valuable. An essential item is something that must be present for the satisfaction of a need. Thus, if a software package allows a user to send email, it is essential. If a set of data can be retrieved from a memory file in the user’s computer, it is needed.
Next, the reusability of a software package is also measured by how much it can be reused. The more that can be reused, the more useful it is and the more valuable it is as a source of revenue. For some software packages, this is not a simple calculation. The amount of code that can be reused varies significantly depending on the complexity and general purpose of the software in question.
How do I know if a reusability strategy makes sense for my program? Usually, a reusability strategy is considered right away. For larger programs, such as those that involve complicated calculations, a design-by-pattern approach may prove to be impractical and even counterproductive. In these cases, it might be necessary to implement a formal reuse methodology. More experienced programmers may also opt for a monomorphization strategy, which has the effect of combining code and data types into a single representation so that code can be reused without having to change that representation at runtime.
Is there a “good” or “bad” way to approach reusability? Reusability is a complex subject. The best approach to reusability is a combination of good practices, such as designing your software in a modular fashion with a consistent architecture, and correct usage of abstractions. When the goal of reusability is to create a simpler program (which may not be feasible at the beginning), it is often necessary to design software packages using techniques that maintain the flexibility and expressiveness of the initial design. This is especially true of open source software that may not have the ability to support customization, and in which code repository authors must make their contributions compatible so that both sides can reap the benefits of reusability.
Comments
Post a Comment