PHP Usergroup Dortmund

Planet der Usergroup Dortmund

Aggregierte Feeds der Groupies der Usergroup Dortmund.

PHP Subconference at FrOSCon 2013

By Kore Nordmann at 1369465167

This years FrOSCon – one of the most awesome open source software conferences – is right ahead and we are organizing a PHP project room again this year. Read more for details…

Mehr lesen...

PHP Subconference at FrOSCon 2012

By Kore Nordmann at 1336386106

This years FrOSCon - one of the most awesome open source software conferences - is right ahead and we are organizing a PHP ubconference gain this year. Read more for details.

Mehr lesen...

Generating XML schemas from XML data

By Kore Nordmann at 1301394026

Already some time ago I published a tool on Github which allows you to generate (or learn) XML schemas from XML data. You provide the tool with a set of XML files and you get a nice, human readable, XML schema (XSD, DTD, …) from that. Read more for the details.

Mehr lesen...

PHPMD 1.1.0 released

By mapi at 1300704135

Version 1.1.0 of PHPMD was released on March the 20th 2011. The key features for this release were two new rules. The first one utilizes the Coupling Between Objects (CBO) metric to detect strongly coupled classes. The second one detects the usage of PHP's questionable goto statement. Beside that we have closed a minor bug in the LongVariable rule, where also private properties with descriptive names were reported. And finally we have replaced deprecated PHPUnit features in the PHPMD's test suite, so that PHPMD's tests should now work with PHPUnit 3.4.x and 3.5.x without deprecated warnings.

Features
  • Implemented #10474873: Add rule for PHP's goto statement. Implemented with commit #2745a20.
  • Implemented #10474987: Implement rule for CBO metric. Implemented with commit #14277b4.
  • Implemented #11012465: Replace deprecated PHPUnit features in test suite. Implemented with commit #4adb88d.
Bugfixes
  • Fixed #10096717: LongVariable rule should not apply on private properties. Fixed with commit #f063bc9.
Download

You can download release 1.1.0 through PHPMD's PEAR Channel Server or you can download the release as a Phar archive

Mehr lesen...

A brief introduction to the Coupling Between Objects metric

By mapi at 1300182720

In this blog post I will give you a brief introduction into the Coupling Between Objects metric, that is one of the metrics calculated by the static code analysis tool PHP_Depend.

The Coupling Between Objects or CBO metric was originally defined by Chidamber & Kemerer in their IEEE paper "A Metrics Suite for Object Oriented Design" [1]. This software metric represents the number of other types a class or interface is coupled to. The CBO metric is calculated for classes and interfaces. It counts the unique number of reference types that occur through method calls, method parameters, return types, thrown exceptions and accessed fields. But there is an exception for types that are either a subtype or supertype of the given class, because these types are not included in the calculated CBO value.

Excessive coupled classes prevent reuse of existing components and they are damaging for a modular, encapsulated software design. To improve the modularity of a software the inter coupling between different classes should be kept to a minimum. Beside reusability a high coupling has a second drawback, a class that is coupled to other classes is sensitive to changes in that classes and as a result it becomes more difficult to maintain and gets more error-prone. Additionally it is harder to test a heavly coupled class in isolation and it is harder to understand such a class. Therefore you should keep the number of dependencies at a minimum.

Thresholds

Based on their research Sahraoui, Godin and Miceli [2] suggest a maximum CBO value of 14, because higher values have negative impacts on several quality aspects of a class, which includes the maintainability, stability and understandability.

See also
Efferent Coupling:
Efferent Coupling or CE is a different name for the same metric, that is frequently used in the literatur.
Afferent Coupling:
The Afferent Coupling or CA is a metric that calculates the reverse coupling of a class.
Bibliography
[1]

http://www.iiitd.ac.in/PhD2010/papers/SW_Paper2.pdf

IEEE Transactions on Software Engineering; A Metrics Suite for Object Oriented Design; Chidamber & Kemerer, 1994

[2]

http://www.iro.umontreal.ca/~sahraouh/papers/ICSM00.pdf

Software Maintenance, 2000. Proceedings. International Conference; Can metrics help to bridge the gap between the improvement of OO design quality and its automation?; Sahraoui, Godin, Miceli; 2000

Mehr lesen...

Pdf Presenter Console 2.0 released

By Jakob Westhoff at 1295194137

I am very happy to announce that I finally had some time to release version 2.0 of my PDF-Presenter-Console. It is filled with new features like navigational link support and cache compression, as well as many bug fixes. Go get it while it's hot!

Mehr lesen...

Book review: Test-Driven JavaScript Development

By Jakob Westhoff at 1294841362

Over the holidays I finally had some time to work on my stack of books to read. One of the books on top of my list was Test-Driven JavaScript Development by Christian Johanson.

Mehr lesen...

static considered harmful

By Kore Nordmann at 1294326106

This is a provoking title, but, in my honest opinion, a very valid rule of thumb. During the last years of teaching other developers, developing PHP libraries and applications and doing quality assurance on other peoples software I came to this rather abrasive conclusion - let me tell you why…

Mehr lesen...

ArgumentRewrap - A Vim plugin to automatically split argument lists

By Jakob Westhoff at 1292982994

I have been using Vim as my primary PHP development environment for several years by now. Inspired by two blog articles (Coming Home To Vim, Vim Toolbox, 2010 Edition) I recently read I decided to cleanup my Vim configurations and create certain new macros for recurring tasks. One of these macros is the ArgumentRewrap plugin, which instantly saves me a lot of time.

Mehr lesen...

My book: "Plug-in Entwicklung mit jQuery"

By Jakob Westhoff at 1292194623

Over the past year I have been working on a book called "Plug-in Entwicklung mit jQuery" (engl. Plugin development with jQuery). Those of you who follow me on twitter might already know it: From today on the book is finally available. Why this book might be an interesting read for you is detailed in this article.

Mehr lesen...