PHP

  • submit to reddit

There's no reason not to switch to DocBlox

Alessandro Nadalin signals these three options for Api documentation generation, the process of extracting Api informations on classes and methods from a...

4 replies - 7364 views - 08/30/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Duplicate Observed Data

In the scenario of today, we have informations of some kind which are present in the view (script, variables, presentational objects, JSON) but not in the...

0 replies - 3868 views - 08/29/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Replace Array with Object

This refactoring is a specialization of Replace Data Value with Object: its goal is to replace a scalar or primitive structure (in this case, an ever-present...

0 replies - 5521 views - 08/24/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Change Reference to Value

This refactoring targets simplification: it is the opposite of Change Value to Reference. An object whose lifecycle is tracked and which must have a single...

0 replies - 4193 views - 08/22/11 by Giorgio Sironi in Articles

Object Calisthenics

Calisthenics is a Greek-derived term for exercises, in the gym sense. I have object calisthenics, exercises for object-oriented programming, around for a long...

3 replies - 5922 views - 08/18/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Change Value to Reference

Classes derived from data have often multiple copies of equal objects lying around: there is no functional difference between them. Examples of these classes...

0 replies - 4363 views - 08/17/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Replace Data Value with Object

One of the rules of simple design is the necessity to minimize the number of moving parts, like classes and methods, as long as the tests are satisfied and we...

0 replies - 4119 views - 08/15/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Self Encapsulate Field

We are entering the data organization refactorings section of Fowler's book: these methods apply to object which maintain state, like entities, records, value...

0 replies - 3885 views - 08/10/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Introduce Local Extension

Introduce Local Extension is a workaround refactoring used to add logic when you cannot modify the original source code, or a more invasive refactoring is not...

0 replies - 3852 views - 08/08/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Remove Middle Man

Last week we talk about Hide Delegate as a tool for conforming to the Law of Demeter, and avoiding continuously scavenging the object graph in all directions....

0 replies - 4443 views - 08/01/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Inline Class

Every refactoring technique is potentially bidirectional: their list is a toolbox, and you decide when to use each tool.Inline Class is the inverse of Extract...

0 replies - 4595 views - 07/28/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Hide Delegate

The client code is calling a method on a collaborator (delegate) of another object, obtained by getter or another sequence of calls. Hide Delegate is about...

0 replies - 5902 views - 07/27/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Move Method

Following in Fowler's steps, we start a section of refactorings that involve moving features and code between classes and objects. While the changes we have...

0 replies - 4765 views - 07/12/11 by Giorgio Sironi in Articles

PHP UML generation from a live object graph

Sometimes you need to share a design with your colleagues. You can walk him through the code, and explain which classes and interfaces you created, but there...

0 replies - 9499 views - 05/10/11 by Giorgio Sironi in Articles

A Mockery review

Mockery is a mock object framework (more properly Test Double framework) from @padraicb, independent from testing frameworks like PHPUnit. It can be used to...

0 replies - 6774 views - 05/05/11 by Giorgio Sironi in Articles