jeudi 18 juin 2015

How to name default/general concrete class that implements interface

Using the following basic example:

interface ObjectWrapper {
  public function getSourceObjectData();
}

I have the following types of objects that need wrapped:

  • Order
  • Customer
  • Invoice
  • Payment
  • Shipment
  • Subscriber

All will have the same behaviour for getSourceObjectData method, apart from the last one 'Subscriber'

The name for the subscriber concrete class is obvious therefore:

SubscriberWrapper

But what would the correct name be for the other concrete class which is used for all of the other types?

DefaultWrapper, ConcreteWrapper, BasicWrapper, GeneralWrapper 

All seem wrong as they dont really describe what the class does

Aucun commentaire:

Enregistrer un commentaire