3 ms·
That's similar to how I'm tending towards. Controllers shouldn't contain the actual business logic, that's for the application layer. Controller -> Application
by adamauckland 13y ago
That's similar to how I'm tending towards. Controllers shouldn't contain the actual business logic, that's for the application layer.
Controller -> Application Objects -> Model -> View -> Controller
That way, the 'web page' controller can be replaced by a 'web service' controller or a 'command line' controller and the application logic remains untouched.
Spaghetti controllers are a result of not separating concerns.
I also agree with your event compromise. There are always going to be events that need to be broadcast systemwide (logout), but they should be limited.
I've been toying with using a message queue instead of events, it may work, it may not...