Feature request - Remove $db refs from Controller--ONLY use models; likewise output ONLY via Views
Reported by dleffler | September 11th, 2012 @ 11:01 PM | in 2.2.2 (closed)
This is an 'in a perfect world' type request to move all the direct database calls ($db object) into the model(s). The Controller should NEVER act directly on the database, after all that is the purpose of the Model in MVC. The Controller should act through the model to manipulate any data.
Likewise, the Controller should never really output anything without going through a 'view'. Though there would be some exceptions to this, esp. in regards to messages (expQueue, etc...)
Comments and changes to this ticket
-
expNinja July 27th, 2013 @ 08:23 PM
- Assigned user set to dleffler
- Milestone set to 2.2.2
(from [4533b423d7fd2d2c99fd48f29341112a10c5425c]) Moves many $db ref's from controller into model [#713 milestone:2.2.2 responsible:dleffler] https://github.com/exponentcms/exponent-cms/commit/4533b423d7fd2d2c...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Bug Tracker for Exponent CMS