Databases Reference
In-Depth Information
2.2.3 Illustrating Three Typical Code Reuse Scenarios
This subsection illustrates scenarios of three typical types of code reuse in terms of
the dimensions of efficacy and attitude.
2.2.3.1 Searching for Previously Experienced Code
A developer often searches for a segment of code that he or she has either written
before or read before to literally copy and paste it into the current code being editing
(Fig. 2.4 ).
This is a typical example of a developer seeking efficacy through code texture
with an as-an-element attitude.
A developer may remember previously writing a code, or reading the code (writ-
ten by peer developers or by some OSS developers) that seems to be close to what he
or she needs in the current program. Once the code segment is identified and pasted,
the developer reads it, may modify it if necessary, or may completely discard it if it
does not seem to work.
2.2.3.2 Using a Framework
A framework is a collection of program modules that provide a set of necessary
functionality in a specific domain or service. Deciding which framework to use has
a significant effect on a developer's programming task because it is likely to deter-
mine the architecture of the system to implement and how the program is written
(Fig. 2.5 ).
This is a typical example of a developer seeking efficacy through code function-
ality with an as-a-substrate attitude.
Often a software architect of a software development project is the one who
searches for potentially useful frameworks and decides which framework to use
Fig. 2.4 Using a segment of previously experienced code. The challenge here is to find the segment
of interest in vaguely remembered code locations
Search WWH ::




Custom Search