OTOH Storing your business logic in services isn't really the best approach. Business logic is supposed to live in models. Symfony documentation very nicely states what services are for and altough some deviation from their definition is neccessary it's not recommended.
What's interesting here is how you define "model". For a traditional Symfony app, you might think of model == entity, but I think of model as more of any class that's related to your biz logic, and not the framework (e.g. a controller). In other words, model is a combination of entities (or things like them) + services. In other words, I think I agree with you :).
Cheers!
Please, log in to vote for this comment
|
Share Comment
"Houston: no signs of life" Start the conversation!
2 Comments
OTOH Storing your business logic in services isn't really the best approach. Business logic is supposed to live in models. Symfony documentation very nicely states what services are for and altough some deviation from their definition is neccessary it's not recommended.
Hey Joe!
What's interesting here is how you define "model". For a traditional Symfony app, you might think of model == entity, but I think of model as more of any class that's related to your biz logic, and not the framework (e.g. a controller). In other words, model is a combination of entities (or things like them) + services. In other words, I think I agree with you :).
Cheers!
"Houston: no signs of life"
Start the conversation!