Information générale
Catégorie:
Conception classe
Versions des environnements
Network:
Windows 2000 Server
Thanks a lot Victor. So if I understand correctly, I define a common base class for the .NET Remoting and Web Service classes and I instanciate the right one from a ConcreteCreator class?
>Sound like a good case for the Factory Pattern. The tricky part is returning the correct object. In this case I would consider using an interface class.
>
>All your classes would comply to this interface so all you have to do is instantiate it. Regardless of what class you create through the factory you will be able to call its method since it complies to the contract of the interface.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement