php

  • submit to reddit

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 - 3847 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 - 4439 views - 08/01/11 by Giorgio Sironi in Articles

Random Color Generator

1 replies - 2773 views - 07/30/11 by Snippets Manager in Uncategorized

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 - 4591 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 - 5891 views - 07/27/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Extract Class

Sometimes there is too much logic to deal with in a single class. You tried extracting methods, but they are so many that the design is still complex to...

0 replies - 4834 views - 07/20/11 by Giorgio Sironi in Articles

Practical PHP Refactoring: Move Field

Object-oriented programming is based on the encapsulation of state and behavior associated with that state in decoupled items called objects. In the previous...

0 replies - 4005 views - 07/18/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 - 4758 views - 07/12/11 by Giorgio Sironi in Articles

Automated code reviews for PHP

I'm exploring an approach to automated code review: it's not as precise as the human-based one, but it scales better.For example, I heard from the Ideato guys...

0 replies - 9136 views - 06/16/11 by Giorgio Sironi in Articles

Rijndael 256 Bit Encryption Function

0 replies - 2351 views - 06/04/11 by Snippets Manager in Uncategorized

PHPSpec: BDD for your classes

I dived into Behavior-Driven Development a bit of time ago by starting using Behat (the PHP equivalent of Cucumber) on katas and on a PHP enterprise...

6 replies - 8922 views - 06/02/11 by Giorgio Sironi in Articles

CakePHP Beginner Example

0 replies - 2923 views - 05/23/11 by Snippets Manager in Uncategorized

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 - 9485 views - 05/10/11 by Giorgio Sironi in Articles

Calculate Distance Between 2 Sets Of Longitude/latitude Coordinates.

0 replies - 2604 views - 05/07/11 by Snippets Manager in Uncategorized