1
vote
1answer
102 views

Builder & decorator patterns together, am I doing this right?

Little background: payload is the representation of a message being send, using a specific transport. The builder pattern is used to build different representation (as array, or as a Swift_Message ...
4
votes
2answers
263 views

Validation Class - Feedback Welcome!

I have written a Validation and Form class in PHP. Validation class allow you to define the rules of each field and a error message. Form class allow you to get a error message and also allow you ...
5
votes
2answers
120 views

When an object has different representations… what's the OO pattern?

I've an AbstractMessage object (a hierarchy, actually). It represents a small text message and can be sent using different transport methods: HTTP, REST and a "mailer" transport. Each transport relies ...
3
votes
1answer
276 views

How to convert my classes to Dependency injection?

I am still learning to develop my skills in OOP. It uses a combination of the factory and its real singletons? As I did more research, I have realized this design pattern is bad because of global ...