Entries tagged as software metricsRelated tags arbit ant continuous integration cruisecontrol cyclomatic complexity ipc karlsruhe kore phpundercontrol phpunit talks article php-magazin bug fix cli npath complexity php php5 phpmd php_depend pmd release announcement sebastian marek static code analysis tokenizer cbo coupling between objects quality assurance checkstyle design quality php_codesniffer class interface size cologne phpug conference hamburg phpugdo unconference css customization dashboard ezcomponents java server pages layout lint phpdoc testing tutorial usability overview pyramid software architecture software design apache software foundation consulting qafoo toby zeta components book changes company crazy dortmund elephpant ext/filter fabien potencier fun logger phpbbq phpt pirum quality static_reflection support thinkpad tools training unit test xml xpath zce zend certified engineer optimization performance elger mayflower php_codebrowser thorsten dbus derick annotations rule set git github customerMonday, July 21. 2008New PHP_Depend release 0.8.0beta4This should be the final beta release for PHP_Depend 0.8.0. Beside some minor bugfixes, it contains a last API change for the log sub component. This change removes constraints to the ctor signature of a logger implementation, which is now part of a separate interface. The following list shows all changes in this version. A detailed description of all issues can be found in the PHP_Depend issue tracker!
As always you can use PHP_Depend's pear channel or its svn repository, to check out this new version. And feel free to discuss and follow the PHP_Depend development on its dedicated mailing list.
Posted by Manuel Pichler
in php, php_depend, phpugdo, phpundercontrol, projects
at
20:47
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: design quality, php, php_depend, quality assurance, release announcement, software metrics
Wednesday, June 25. 2008Using the Overview PyramidThe Overview Pyramid is used to visualize a complete software system in a really compact manner. Therefor it collects a set of metrics from the categories Inheritance, Coupling and Size & Complexity, and puts them into relation. The following figure shows the base structure of the Overview Pyramid[ML06]. Metrics used by the Overview PyramidThe following three lists contain all the metrics, which the Overview Pyramid uses. Size and ComplexityThe category Size & Complexity contributes the greatest and mostly used set of software metrics.
CouplingThis group of metrics informs about the coupling between different program parts in the analyzed application.
InheritanceBoth metrics in this group deal with the use of Inheritance and give a general overview of the use of Inheritance within the analyzed system.
Structure of the Overview PyramidNow that we know all metrics used for the Overview Pyramid, it is time to replace the placeholders with the measured informations. The figure below shows the filled Overview Pyramid. In a second step, the previously independent metrics are set into relation. Therefor we calculate the average values of individual value pairs, these computed values provide us with new informations about the distributions within the application. The following example figure of the Overview Pyramid contains a computed value for the measured LOC and NOM metric which shows us, that in the average each operation has 25 lines of code. This value can be described as very high, especially when you consider that most systems contain a variety of simple operation, like Getter and Setter, in addition to the main application logic. To take reasonable conclusions from the computed values one important part is still missing, an adequate set of reference values. Without reference values, that say what values are low, average or high, it is not possible to classify these results. The current version of PHP_Depend supports a single set of reference values, this set was taken from [ML96]. Reference values
With these reference values PHP_Depend can classify the computed results. PHP_Depend uses this information for the generation of colored backgrounds, so that the color already supports the categorization. The benefit of the Overview PyramidOf course, the final question is, which advantages offers the Overview Pyramid? The Overview Pyramid provides a simple and size indipendent way to get a first impression of a software system, and this without an expensive source code analysis. Thus the Overview Pyramid is an effective tool for a first cost estimate for an unknown system. With the help of this tool and know-how, an experienced developer will quickly get a first impression and will know what can be expected from the analyzed application. And this knowledge could be a good help during the planning phase of a new project. Bibliography
Posted by Manuel Pichler
in php, php_depend, phpugdo, projects
at
18:36
| Comments (8)
| Trackbacks (0)
Defined tags for this entry: overview pyramid, php_depend, quality assurance, software design, software metrics
Sunday, June 22. 2008Follow the development process of PHP_DependIf you like commit mails as I do, you can subscribe to the commit mailing list. Simply send an email to commits-join@pdepend.org or register thru the online interface. If you have any PHP_Depend related questions, tips or suggestions, subscribe to the PHP_Depend user mailing list by mail users-join@pdepend.org or use the online interface. Enjoy PHP_Depend! Manuel
Posted by Manuel Pichler
in php, php_depend, phpugdo, projects
at
22:48
| Comments (0)
| Trackback (1)
Saturday, June 21. 2008What you should know about PHP_DependHere a short follow up for the PHP_Depend release announcement, with hints on using PHP_Depend.
First I must explain that PHP_Depend is working package oriented. This means it heavily relies on
With default settings PHP_Depend suppresses the +global Package, because it expects that this package contains classes from external libraries, like Zend Framework or eZComponents. If you use PHP_Depend for a project with less or no The second important hint is related to exported charts and images. If your operation system, image viewer or browser supports SVG, you should use this format. The reason for this decision is really simple, SVG provides tooltips and so you get most informations from the generated graphics. For the Overview-Pyramid this means, that you get a tooltip for the used acronyms. ![]() PHP_Depend Overview-Pyramid with acronym tooltip And within the JDepend-chart you get the package name as tooltip. ![]() PHP_Depend JDepend-Chart with package tooltip
I hope this short introduction helps you while you are trying out PHP_Depend. If you are already using the metrics feature of PHPUnit, you should try out the new
Posted by Manuel Pichler
in php, php_depend, phpugdo, projects
at
23:35
| Comment (1)
| Trackbacks (0)
Wednesday, June 18. 2008PHP_Depend-0.8.0beta1 releasedThis new release of PHP_Depend took some time to be finished. This is because the initial idea of a simple adaption of JDepend evolved (supported thru this blog-post by Sebastian), and so PHP_Depend has become a complete software metric application. Many new features and enhancements have found their way into this version. One of the key features is the pluggable architecture for custom Loggers and Metric-Analyzers. This opens the possibility to hook own Logger- and Analyzer-implementations into the execution chain of PHP_Depend. Beside these architectural changes this PHP_Depend version is shipped with a large set of implemented software metrics. ClassLevel (Class)
CodeRank (Class, Package)An adaption of google's PageRank algorithm for classes and packages.
Coupling (Project)
Cyclomatic Complexity (Project, Method, Function)
Dependency (Package)For details see the following entry.
Hierarchy (Project)
Inheritance (Project)
NodeCount (Project, Package, Class, Interface)
NodeLOC (Project, Package, Class, Interface, Method, Function)
Due to the fact that PHP is a loosely typed programming language, PHP_Depend can only approximate some values. But the measured results can be improved with a good and complete source code documentation, because PHP_Depend takes advantage of different doc comment annotations ( Beside all these metrics, PHP_Depend also provides a new chart type, the "Overview Pyramid". The Overview Pyramid can be a handy tool to analyze legacy code. If you have read the book Object-Oriented Metrics in Practice you should know howto interpret the Overview Pyramid, all others have to wait for a detailed description. ![]() PHP_Depend Overview Pyramid for PHP_Depend This new version can be installed with the PEAR-Installer. Just discover the pear.xplib.de channel and install the latest PHP_Depend release. After PHP_Depend has been installed successfully, the new command line tool pdepend should exist.
mapi@arwen ~ $ pear channel-discover pear.xplib.de
mapi@arwen ~ $ pear install xplib/PHP_Depend-beta
mapi@arwen ~ $ pdepend --help
PHP_Depend 0.8.0beta1 by Manuel Pichler
Usage: pdepend [options] [logger] <dir[,dir[,...]]>
--jdepend-chart=<file> Generates a diagram of the analyzed packages.
--jdepend-xml=<file> Generates the package dependency log.
--overview-pyramid=<file> Generates a chart with an Overview Pyramid for the
analyzed project.
--summary-xml=<file> Generates a xml log with all metrics.
--coderank-mode=<*[,...]> Used CodeRank strategies. Comma separated list of
'inheritance'(default), 'property' and 'method'.
--suffix=<ext[,...]> List of valid PHP file extensions.
--ignore=<dir[,...]> List of exclude directories.
--exclude=<pkg[,...]> List of exclude packages.
--without-annotations Do not parse doc comment annotations.
--help Print this help text.
--version Print the current PHP_Depend version.
There is also a Subversion repository at http://svn.pdepend.org/, where the latest development version can be found. Please test this beta release and file bug-reports and feature-requests in the PHP_Depend bug tracker.
Posted by Manuel Pichler
in php, php_depend, phpugdo, planet-php, projects
at
16:39
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: php, php_depend, quality assurance, release announcement, software architecture, software metrics
Tuesday, February 12. 2008phpUnderControl 0.3.6Except minor enhancements and bugfixes the latest phpUnderControl version comes with two new features.
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, projects
at
11:19
| Comments (6)
| Trackbacks (0)
Defined tags for this entry: continuous integration, cruisecontrol, phpundercontrol, phpunit, quality assurance, software metrics, testing
Wednesday, February 6. 2008How reusable, extensible and maintainable is your software?To provide a flexible and extendable software, it is a good OO practice to reduce the dependencies between implementing classes. This could be achieved by developing against abstractions which means both, abstract classes and interfaces. By using abstractions instead of real implementation in the application you provide some sort of contract, that could be used by others to hook into the application with their own classes that fulfill the contract. Except the extensibility of an application a good abstraction reduces the risk of breaks in multiple subsystems when something was changed in a single package. But how to get rid of all these dependencies, doing this by hand will become an impossible job, at least for larger projects. At this point a tool should be used to assist the development process. PHP_Depend is an adaption of the established Java development tool JDepend. This tool shows you the quality of your design in the terms of extensibility, reusability and maintainability. All these facts are influenced by the inter-package dependencies and the package abstraction that PHP_Depend visualizes in form of an abstract/instability chart and as a detailed XML report of all detected dependencies. PHP_Depend calculates the following metrics by counting classes, interfaces and dependencies.
With these values we can create a chart that visualizes the relationship between the instability (I) on the y-axis and the abstraction (A) on the x-axis. Because in a project not each package can achieve the optimal values of A = 1, I = 0 or A = 0, I = 1, we draw a diagonal between the two corners. This line is called the Main sequence and represents an average between abstraction (A) and instability (I). This means that packages near this line have a good mix between abstraction and instability. You can call these packages balanced. Because it is desirable for packages to be close to the Main sequence we have a fifth metric, the package distance (D) from this ideal.
If you are interested in this subject and PHP_Depend you can check out the latest version, including the unit tests, from the subversion repository or simply install the PHP_Depend PEAR package. But be aware this software is at a very early stage. mapi@arwen $ pear channel-discover pear.xplib.de mapi@arwen $ pear install xplib/PHP_Depend-alpha Now you can run PHP_Depend with the following command. pdepend <source-dir> [<output-dir>]
If you are interested in the code coverage follow this link I will close this post with a cite of Robert Martin:
The following sources were used for this post.
Posted by Manuel Pichler
in php, php_depend, phpugdo, phpundercontrol, planet-php, projects
at
17:52
| Comments (9)
| Trackback (1)
Defined tags for this entry: design quality, php, quality assurance, software architecture, software design, software metrics
« previous page
(Page 2 of 2, totaling 22 entries)
|
ProjectsFurther stuffCategories |




