Download presentation
Presentation is loading. Please wait.
Published byJose Stilwell Modified over 9 years ago
1
Luca Lista - C++ Metriche nel software Luca Lista INFN, Sezione di Napoli
2
Luca Lista - C++ The Dependency Metrics [1] Responsibility, Independence and Stability of a Package –Ca: Afferent Couplings # of dependent external classes –Ce: Efferent Couplings # internal classes dependent on external –Instability: Ce / (Ca+Ce) [0,1] 0 = maximally independent 1 = dependent but with no dependents [1] R.Martin, www.oma.com
3
Luca Lista - C++ Stability vs. Flexibility Open Closed Principle –Stable (good) Package Responsible independent abstract classes –Unstable (good) Package Dependent irresponsible concrete classes Abstractness –# abstract classes / total # of classes [0,1]
4
Luca Lista - C++ The Main Sequence Define Stability-Abstractness relationship Main Sequence (0,1) (1,0) Maximally stable & abstract Maximally unstable & concrete
5
Luca Lista - C++ …and its statement The MS textual definition –Packages that are maximally stable should be maximally abstract. Instable packages should be concrete. The abstraction of a package should be in proportion to its stability Combined with the Stable Dependencies –Dependency Inversion Principle for classes dependencies toward abstractions
6
Luca Lista - C++ Example of metrics Main Sequence IfrGeomBase IfrData IfrPidData IfrDataImp IfrGeom IfrGeomP IfrReco IfrSequence IfrDataP IfrEnv IfrSim IfrPid IfrVisitors 0 10 20 30 40 50 60 70 80 90 100 0102030405060708090100 Instability Abstractness
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.