Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Feature request - Remove $db refs from Controller--ONLY use models; likewise output ONLY via Views

#713

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...)

Reported by dleffler · September 11th, 2012 @ 11:01 PM

State: new
Milestone: 2.2.2
Assigned to: dleffler dleffler

Activity

  1. expNinja
    expNinja
    • 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...

    July 27th, 2013 @ 08:23 PM

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.