Linked Questions

3 votes
3 answers
3k views

I searched about this subjet arround here in Stack Overflow. I found the following solution: Explanation of Visitor Pattern Now, my case is simillar to this one. I need, however, to avoid the use of ...
user1987003's user avatar
2 votes
4 answers
1k views

I'm trying to figure out how to provide a type definition that corresponds to "all classes that implement some abstract class." Take the following code example: abstract class AbstractFoo { ...
entersudonym's user avatar
0 votes
2 answers
1k views

I have two classes that extends a third class, i.e. public class class_a extends parent_class and public class class_b extends parent_class My question is it possible to have a third class to ...
Sharon's user avatar
  • 88
1 vote
1 answer
1k views

Sorry if is a dummy question but I'm not really clear with it. Is it a good practice to integrate factory pattern in an mvc using php. For example could I have the following library structure: index....
lgt's user avatar
  • 1,034
2 votes
1 answer
1k views

As I understand it the factory design pattern allows objects to be created through the use of a separate object that's sole aim is to create the first one. Different types of factory can be used to ...
WalleyM's user avatar
  • 172
1 vote
1 answer
873 views

I am confused at the factory-method pattern. The below code is from "https://www.oodesign.com/factory-method-pattern.html" public interface Product { � } public abstract class Creator { ...
선상원's user avatar
1 vote
2 answers
260 views

... Or a different way of implementing this: I have an interface called ICommunicationProvider which is then extended by ISMSCommunicationProvider, IEmailCommunicationProvider, ...
Varin's user avatar
  • 2,445
1 vote
2 answers
528 views

Erich Gamma's GOF design pattern book says: Whereas the word application can create several documents on its own as shown below: It appears that one application can create several documents. In what ...
Aquarius_Girl's user avatar
0 votes
2 answers
143 views

I'm trying to initialize generic types in generic methods. I've since learned you can't require constructors in interfaces, so I figured out how to use generics to roughly fake the same behavior: ...
Polymer's user avatar
  • 1,073
0 votes
1 answer
169 views

I'm trying to make a simple game. I have a class for the screen buffer, a class for the images, and a class for the sprites. My question is this: Since every sprite needs to "belong" to some image (...
Baruch's user avatar
  • 22k
1 vote
3 answers
139 views

I'm a newbie to design pattern. And I'm trying to learn some design patterns. I read blogs online and most of them directly show me that: this is the simple factory and this is how we use it. I ...
Fan Zhang's user avatar

15 30 50 per page
1
2