Interface-Based Object-Oriented Design and Importance of Mock Objects

Post on 05-Dec-2014

607 views 2 download

description

 

transcript

Interface-Based Object-Oriented Design and Importance of Mock Objects

Copyright, 1996 © Dale Carnegie & Associates, Inc.

Tameem Ahmad

StudentM.Tech.

Z.H.C.E.T.A.M.U.,Aligarh

2

References:Jagadeesh Nandigam, Venkat N Gudivada, Abdelwahab Hamou-Lhadj and Yonglei Tao “Interface-Based Object-Oriented Design with Mock Objects”, Sixth International Conference on Information Technology: New Generations, 2009.

Alexandre Chureau, Yvon Savaria and El Mostapha Aboulhamid “Interface-based Design of Systems-on-Chip using UML-RT”, 4th IEEE International Workshop on System-on-Chip for Real-Time Applications (IWSOC’04).

Rakesh Kumar Mishra and Bharat Lohani, “An Object-Oriented Software Development Approach to Design Simulator for Airborne Altimetric Lidar”,

3

4

5

Overview

Interfaces

Mock Objects

Practicing Interface-Based Approach in OOAD

My Enhancement in the Interface-Based

Design

Conclusion

6

What are the

interfaces???

Why it is important???

How we can do this???

Interfaces

7

Interfaces: (Continued)In object-oriented programming languages, an interface is a

language construct that specifies the expected behavior of an

object as a set of operation/method signatures.

A method signature usually includes the method name, order,

and type of its parameters, and its return type.

8

Interfaces: (Continued)

9

Interfaces: (Continued)With careful use of interfaces, we can decouple classes in our system.program to an interface, not an implementation.

flexibility (gracefully accommodating changes in direction), extensibility (gracefully accommodating addons),pluggability (gracefully substituting objects that have identical interfaces for each other at run-time using dynamic binding and polymorphism)

10

Interfaces: (Continued)

11

Mock ObjectsIn object-oriented programming, mock objects are simulated objects that mimic the behavior of real objects in controlled ways.It is not that developing interface-based design depends on mocks, but using mocks in software development forces one to develop code that is interface-based, loosely coupled, and where object composition via interfaces is favored.

12

My Contribution:

Design reuse Easier exploration of the design space

13

Thank You