Download presentation
Presentation is loading. Please wait.
Published byAntony Hoover Modified over 9 years ago
1
Banaras Hindu University
2
A Course on Software Reuse by Design Patterns and Frameworks
3
by Dr. Manjari Gupta Department of Computer Science Banaras Hindu University
4
Lecture 2 Object-Oriented Software Engineering and Reuse
5
Comprises three essential concepts information hiding, inheritance/polymorphism and dynamic binding. Different object technologies Information hiding is main feature of object-based systems. inheritance and dynamic binding were introduced in object-oriented systems. Object-oriented frameworks stress on extensibility. Object technology
6
combines the application domain and solution domain modeling activities into one. application domain is first modeled as a set of objects and relationships This model is used to represent the real-world concepts. The functionality of an object-oriented system is encapsulated in the form of a set of objects. Important Features of OO Software Engineering
7
Objects provide different services either on their own or by interacting with other objects. State of an object values of different instance variables of an object, at a given point of time, constitute its state. can be grouped into two categories- public and private. Class is a common template for similar objects. designed to carry data and have behavior. Data model classes Objects and Classes
8
includes five development activities: requirement elicitation, analysis, system design, object design and implementation. also includes activities whose purpose is to evaluate the appropriateness of the respective models OO Software Development
9
The Object-oriented paradigm features encapsulation, inheritance and delayed binding Development and use of reusable artifacts is supported by properties of object-oriented systems refinement composition abstraction factorization OO Concepts that Enhances the Potential for Reuse
10
Related objects may be grouped together to form frameworks and toolkits [Jawadekar04]. Each object can be used in different applications from different systems. Characteristics of an object foster its reusability [Smolarova97]: Objects separate interface from the implementation. Objects often closely map the real world. Objects come in different sizes and abstraction levels. Objects live all the way down during software development. Reuse of Objects
11
A class offers a well-defined and related set of services to its clients Objects instantiated from a class perform common methods and share common structure while each object within a class retains its own states. Inheritance allows the derivation of new classes by modification of existing classes. Specialization and overriding are two ways of modifying an existing class. Specialization adds new functionality to sub-classes Overriding refine, redefine or even hide the parent’s functionality Reuse of classes
12
abstract class a class with one or more abstract methods. abstract method a method that is declared, but contains no implementation. with more than one possible implementation, represent variable parts of the behavior of an abstract class. creates a standard class interface for all descendants same contract Reuse of classes Cont…
13
The extension of a class into subclasses by specializing the existing class allows subclasses to share common features. Multiple inheritance Lends to a great degree of code reuse. Every additional base class enhances code reuse. full reuse of the implementation found in two (or more) different classes Without multiple inheritance one would be forced to use has-a relationship, thereby reducing code reuse and further increasing implementation and testing time. Reuse by inheritance
14
Dynamic binding implies late binding of function calls the function call is bound to an object during runtime and not during compilation. Result of dynamic binding polymorphism is achieved. variables and parameters can take on values of different types. Reuse by dynamic binding and polymorphism
15
Example of Dynamic Binding and Polymorphism [Landin95]
23
provides a number of benefits not particularly well suited to describing complex interactions between groups of objects difficult to capture and reuse common design idioms that involve multiple objects Design patterns Frameworks OOD
24
A design pattern describes solution to a recurring problem in software design phase Stems from the work of the architect Christopher Alexander Solve specific design problems Design reuse is popular by use of design patterns Reuse by Design Patterns
25
Frameworks are widely used to reuse design of all or part of a system that is represented by a set of abstract classes and the way their instances interact. “Software Reuse by frameworks” attempts to capture, document and specify the architectural design experiences in form of a semi-code. A framework is a generic application program that a programmer tailors by providing highly specialized routines, which are called by the framework[Lee00]. The development of a framework begins with the domain analysis for identifying commonalities and variation points among the similar applications belonging to a particular domain. Reuse by Frameworks
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.