Let me preface by saying this is the first live cakephp project for me.
I’m trying to move logic out of the controller to the model but the fact that compoents are not available makes this awkward.
For example, I want to send a notification email after a user registration. I’ve moved my email function into the model, but now have to import the Email component into the model.
So for the sake of a couple of lines of code (excluding the strings for the message itself) I have to import a component which might already be being used in the controller as well (not in this particular case though).
It seems cake is not really “arranged” for Fat Model concept?
Do not send emails from the model! There’s a reason the EmailComponent is a component and not a behavior. Models are about modeling your data. Sending email has nothing to do with data modeling, it’s about interacting with the real world, i.e. output, which is why the process is comprised of components and view files.
If something in your MVC structure seems really awkward and weird, you’re probably doing it wrong.