Since I'm not an expert, I was wondering if anybody here could offer advice.
I'm working on an application that will have a variety of widgets displayed on one page, and each widget relies on information from a MySQL database. The widgets may be disabled, or enabled, depending on the user preference (the database has flags for which should be on or off).
I can either have the widgets make the queries in the init() function, or have the controller calling the view (with widgets) call one monster-size query - modified on which widgets will actually be shown.
Having the widgets make queries is the less complex solution, but I’ve got a feeling this could be frowned upon (for example, there’s the issue of multiple queries being slower than one query). Any suggestions