igniphp / framework

Swoole, PSR-15, PSR-7, PSR-11 lightweight modular anti-framework for REST micro-services.
MIT License
265 stars 14 forks source link

Issue #10 - Router and Route interface. #16

Closed dkraczkowski closed 6 years ago

smalot commented 6 years ago

I have one remark on your code. When creating interface, I usually add Interface as a suffix.

This avoids any mistake when using "Route" object which can be an interface or a class, depending only the namespace.

A great documentation: https://www.php-fig.org/bylaws/psr-naming-conventions/

dkraczkowski commented 6 years ago

@smalot I have used to do this but to be honest couple years ago I have changed my mind if comes to suffixes around traits and interfaces from the following reasons:

I am happy to discuss this further ;)

dkraczkowski commented 6 years ago

Just to be clear, I do understand why standards are there for and why I should use them. I am always trying to follow standards I like consistency, I like rules (they make life easier and world maintainable). If I would create a psr package I would for sure go for all the rules that are recommended by PSR group. On the other hand being a creator is also being a critic- as developers we should criticise the world around us to make it better a place. I hope this short explanation makes sense to you :)

smalot commented 6 years ago

Sounds good for me, no problem ;) In all cases, your code is very smart !

I love your integration of:

Keep going !

dkraczkowski commented 6 years ago

Thanks :)