What is the difference between Builder Design pattern and Factory Design pattern? [closed]

With design patterns, there usually is no “more advantageous” solution that works for all cases. It depends on what you need to implement. From Wikipedia: Builder focuses on constructing a complex object step by step. Abstract Factory emphasizes a family of product objects (either simple or complex). Builder returns the product as a final step, … Read more

What is the Page Object Pattern in Selenium WebDriver? [closed]

The documentation has already covered this. If you have any specific questions, feel free to edit your main post. Official: Page Objects and PageFactory on Selenuim Wiki. Page Object Design Pattern on Selenium official site. Unofficial: Do a Google search, you will get a lot info on this. Page Object Pattern Page Objects in Selenium … Read more

Which design patterns can be applied to the configuration settings problem?

I prefer to create an interface for setting query, loading, and saving. By using dependency injection, I can inject this into each component that requires it. This allows flexibility in terms of replacing the configuration strategy, and gives a common base for everything to work from. I prefer this to a single, global “settings loader” … Read more

Singleton pattern [closed]

http://sites.google.com/site/steveyegge2/singleton-considered-stupid Why is the Singleton so attractive? I’ll be the first to admit: I liked it too. No, scratch that – I loved the Singleton. It felt like an old friend from the moment I laid eyes on it. It was simple and beautiful. I’ll tell you why: it’s because the Singleton pattern is a … Read more

Factory, Abstract Factory and Factory Method

The Gang Of Four “Design Patterns; Elements of Reusable Object-Oriented Software” book contains two entries, “Abstract Factory” (aka ‘Virtual Constructor’) and “Factory Method”. I don’t know about “Concrete Factory.” I’ve heard the term, but never given it too much thought. Factory Method In “Factory Method” an object has a method which is responsible for the … Read more

What is a Proxy in Doctrine 2?

UPDATE This answer contains wrong information about differences between proxy objects and partial objects. See @Kontrollfreak’s answer for more details: https://stackoverflow.com/a/17787070/252591 Proxy objects are used whenever your query doesn’t return all data required to create an entity. Imagine following scenario: @Entity class User { @Column protected $id; @Column protected $username; @Column protected $firstname; @Column protected … Read more