xmlsquad / xml-authoring-library

A place to put code that is reused by many commands which are part of the [xml-authoring-tools suite](https://github.com/forikal-uk/xml-authoring-tools).
Apache License 2.0
0 stars 0 forks source link

Extract 'User Config file finding' and 'Google API logic' from `XmlSquad\Library\Command\AbstractCommand` into a 'console helper classes' #6

Open forikal-uk opened 6 years ago

forikal-uk commented 6 years ago

Goal

See issue summary

Why

In the beginning, there were multiple developers building the various commands in the xml-authoring-project.

Consequently, each command had a different way of

I have collected all of those commands into the XmlSquad\Library\Command\AbstractCommand with the aim of de-duplicating the code to unify it so that the user has a consistent interface between commands in the suite.

However, having Commands extending a long chain of abstract Command classes ties down the freedom of the command developer. The OOP best practice is to favour composition of objects rather than structure in order to allow for variations of this type.

So, the answer is to give command writers some kind of 'console helper classes' that can be used to contain and re-use the behaviour associated with:

How

IT IS UP TO YOU. But, here is a suggestion that considers testing, collaboration and documentation: