merchant-php / convoy

MIT License
1 stars 0 forks source link

Define and document general functionality and glossary #1

Open fcastilloes opened 8 years ago

fcastilloes commented 8 years ago

The proposal of this library is to wrap thephpleague/pipeline implementation of Pipeline Design Pattern with an opinionated implementation. The main objective is to allow creation of several pipelines and add an interface to control the execution, allowing pipeline interruption, concatenation or replacement.

The main concepts, with an provisional naming, needed for implementation could start with the following:

rvegas commented 8 years ago

I don't really like _Auxiliary_, I think it does not give the right meaning to the actual function behind it. What about _Superintendent_ or _Auditor_?

http://www.thesaurus.com/browse/scrutinizer?s=t

fcastilloes commented 8 years ago

I didn't really like Auxiliary as well. Those are better, but in the wikipedia entry for Waybill we have Carrier, which in the thesaurus throws Courier, which I think sounds great, as it will be responsible for the message to reach its destination.

fcastilloes commented 8 years ago

So are you ok with the rest of the names? I wasn't too sure about Valise.

rvegas commented 8 years ago

I understand Valise, its cool. Also courier seems nice.

fcastilloes commented 8 years ago

Additional element:

The Courier should be able to search the Waybill for Seals if asked by a Checkpoint.

fcastilloes commented 8 years ago

It would also be needed a CheckpointProxy so they can be assigned yo the Waybill and lazy loaded when requested by the Driver.

rvegas commented 8 years ago

About _Seal_ wouldn't you rather use stamp?

fcastilloes commented 8 years ago

Instead of CheckpointProxy we could better have a Destination, which would be a simple value object that driver could use to build a Checkpoint.

So, Driver should be an interface that a client could implement to add their own rules. A ClassDriver could be included to get a Destination with the classname of the Checkpoint

interface Driver {
  /**
   * @param Destination $destination
   * @returns Checkpoint
   */
  public function get(Destination $destination);
}
fcastilloes commented 8 years ago

Thinking about if Destination should implement a Composite Pattern to add subroutes and how it should be implemented.