SOFTWARE REUSE 28 March 2013 William W. McMillan.
-
Upload
edward-woods -
Category
Documents
-
view
213 -
download
0
Transcript of SOFTWARE REUSE 28 March 2013 William W. McMillan.
Benefits of Reuse
Save resources. Standardize a solution that can be
trusted. Support levels-of-abstraction approach
to creating systems. Encapsulated “black-box” components.
Reduce tedium, allow developers to work on new things.
Risks of Reuse
Propagate inefficient solution. e.g., O(N2) sorting routine
Propagate incorrect solution. Stats formula could be wrong or
inappropriate. Shield developers from fundamental
knowledge of how something works. May not know inefficiencies of solution in
particular context. May miss interactions and dependencies.
Risks of Reuse
Hard to change or update reused component.
Long-term cost if there’s a license fee. Loss of support if provider goes belly-up.
Suppose a method to compute a standard error of the mean is incorrect. What are some potential costs if the routine is used repeatedly?
History of Reuse
Copy someone’s source code to do a task. Subroutines:
Well-defined modules, with name, … but might use common data structures.
Call subroutines with parameters. “Include” files. External libraries of useful routines.
E.g., LINPACK for linear algebra and related. Database tools like Ingres
History of Reuse
Computer simulation led to object-oriented design. Simula 67
Packages and “Units” appeared. UCSD Pascal, Ada.
Abstract data types influential in computer science.
Object-oriented goes mainstream: C++, O-O capabilities bolted onto C. Smalltalk from a more AI perspective.
History of Reuse
Java cleans up a lot of O-O trash: Multiple inheritance gone. No “friend” access. Better dynamic memory management.
C# is Microsoft’s version of Java. Packages, APIs, components now
common. A lot of development is done on top of:
Statistics packages SQL engines Enterprise mega-packages like SAP
Reuse of Software Ideas
Algorithms and data structures. Useful architectures and design patterns
(discussed earlier in course). E.g., model-view-controller
Programming styles. Elements of Programming Style by
Kernighan and Plauger Relational databases.
Software Frameworks
Integrated sets of tools and utilities. E.g., .NET, Enterprise Java Beans, Allegro
Common Lisp. User interface objects and methods. Communication facilities. Security tools. Data structures. Database management. Web applications. Session and transaction management.
Families of Software Products E.g., Microsoft Office, Adobe Creative
Suite. Might have unique scripting language. UI has similar feel and style across
members. Compatible parts. Common architecture. Common data formats. Incentives to use all or none. Reasons to keep all parts up to date.
Buy Commercial Software?
E.g., SAP, E-Commerce tools. Why reinvent the wheel? Why not get expert advice and help? Reduce costs, especially maintenance. Reduce liability. Get things you might not have thought
of: Encryption, back-up facilities, slick
algorithms,…
Use Open-Source Software?
Talk about saving costs…. But do you always save? Where does support come from?
“Read the source code” isn’t always the help you need.
Need to consider long-term costs and risks.
Use Cloud-Based Services?
E.g., Amazon, AT&T. Third-party provider. Data and functions on servers managed
by provider. Includes many tools. Access via the Internet.