Request: Change class naming convention #130

Open
ignace opened this Issue Sep 8, 2012 · 4 comments

Comments

Projects
None yet
2 participants

ignace commented Sep 8, 2012

All classes/interfaces are named Standard and Template which leads to conflicts when importing them. A possible solution would to rename these to their package name:

Proem\Dispatch\Standard -> Proem\Dispatch\Dispatch
Proem\Dispatch\Template -> Proem\Dispatch\DispatchInterface

Imports would then need no alias:

use Proem\Dispatch\Dispatch; // Proem\Dispatch\Standard
use Proem\Routing\Router\Router; \\ Proem\Routing\Router\Standard
Owner

trq commented Sep 9, 2012

Ok, I think I have decided on the following convention.

Proem\Component\Standard -> Proem\Component\StandardComponent
Proem\Component\Template -> Proem\Dispatch\ComponentInterface
Proem\Component\Generic -> Proem\Dispatch\ComponentGeneric

This should resolve the above mentioned issues.

Any input much appreciated.

This might take a little while to get completed as it would also mean some major documentation changes. This would likely end up creating a 0.6.6 tag and also mean that the stable docs would be updated.

Unfortunately, I'm also in the middle of writing a new static site generator for the website (and documentation) as well, so this needs to be completed before I can update the docs.

ignace commented Sep 9, 2012

I don't see how that resolves anything? Instead of all of the components ending in \Standard they'll be ending in StandardComponent?!

Owner

trq commented Sep 10, 2012

Sorry, I obviously wasn't very clear. The word Component would be the actual name of the component. eg;

Proem\Dispatch\Standard -> Proem\Dispatch\StandardDispatch

ignace commented Sep 10, 2012

Looks good. I was confused due to

Proem\Component\Template -> Proem\Dispatch\ComponentInterface
Proem\Component\Generic -> Proem\Dispatch\ComponentGeneric
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment