NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
8 replies Latest Post - 2012-12-19T17:42:44Z by SystemAdmin
Pinned topic 136377
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-12-19T17:42:44Z at 2012-12-19T17:42:44Z by SystemAdmin
JLQ 270002U0JR1 PostACCEPTED ANSWER
test2009-12-19T18:05:44Z in response to SystemAdminThank you very much, Mr. Jack D Herrington, you're a genius:)
This article is for me very useful, and as you say, "this is not just for architects java space":)
thanks for the article and I look forward to more contributions for PHP.
many greetings from Peru.
stamari 2700050QF92 PostsACCEPTED ANSWER
test2012-01-18T10:53:43Z in response to SystemAdminI don't understand why in the factory example the User class implements the IUser interface. If the factory class is the only one that creates the object, and it can create different types of objects, then why do the objects need to implement an interface?
test2012-12-19T17:42:44Z in response to SystemAdminI love how PHP was chosen for implementing these design patterns. The only issue that is stopping me from sending people i talk to this way for learning them is they are not shown in a "practical sense". I attempted to cover the Factory Pattern the other day in a more practical sense by using a Content Moderation Queue as the example. For those wanting to see a more practical take on using the Factory Pattern you can read it here: http://www.coderprofile.com/coder/VBAssassin/blog/2/practical-use-of-the-factory-pattern-polymorphism-and-interfaces-in-php