1 / 6

Metriche nel software

Metriche nel software. Luca Lista INFN, Sezione di Napoli. 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

felix
Download Presentation

Metriche nel software

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Metriche nel software Luca Lista INFN, Sezione di Napoli Luca Lista - C++

  2. 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 Luca Lista - C++

  3. 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] Luca Lista - C++

  4. The Main Sequence • Define Stability-Abstractness relationship Maximally stable & abstract (0,1) Main Sequence (1,0) Maximally unstable & concrete Luca Lista - C++

  5. …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 Luca Lista - C++

  6. Example of metrics Main Sequence 100 90 80 IfrGeomBase 70 IfrData 60 Abstractness 50 IfrPidData 40 30 20 IfrVisitors IfrReco IfrDataImp IfrPid 10 IfrSim IfrGeomP IfrGeom IfrEnv IfrSequence 0 IfrDataP 0 10 20 30 40 50 60 70 80 90 100 Instability Luca Lista - C++

More Related