Closed andheiberg closed 10 years ago
This is a decision made for the architecture. Controllers are the glue between the request and the domain layer. As the Tricks namespace represents the domain, it didn't feel right placing the Controllers (which do not actually belong in the domain) under that same namespace
Yeah, that was also the only reason I could come up with.
I guess you are right that controllers are not domain specific, I just find i weird, as I usually would have controllers in Tricks. I guess you are right that a line needs to be drawn, otherwise why shouldn't routes, filters, config, etc. be in Tricks.
The main reason I go with a namespace for the project is that it makes autoloading services, repositories, serviceproviders etc. easier. So moving controllers to Tricks wouldn't really conflict with my goal.
I don't know :) just rambling here.
Seems fair enough, though remember that Composer accepts an unlimited amount of autoloading directives. Like the Controllers namespace in this project is also psr-0 autoloaded. Just saying that if you can seperate it and keep the architecture a little cleaner, why shouldn't you :)
Yeah I'm aware :)
Just never thought about it.
Why did you choose not to place controllers in the Tricks namespace?