Welcome Guest, Not a member yet? Register   Sign In
Views: how to do this correctly?
#1

[eluser]Martín M.[/eluser]
Maybe this is a stupid question. If it is, please do tell me :lol:

Let's imagine some kind of software built with CI with views which the user can edit. Imagine for example a forum, where somebody downloads the CI built forum and then edits the views to suit them to his liking, in order to integrate it in this existing webpage.

Now imagine that we have 10 pieces of data we pass from the controller to the view, and the user uses them in the view with the classical <?=$blah?>. The problem comes when the user doesn't need all of them, I mean, he only uses 2 or 3 variables that we are passing to the view, but the 7-8 variables are being calculated even they are not used (for example, results of a BD query).

The question: how to fix this waste of resources? Maybe calling functions from the view instead of using passed variables?

I hope somebody understands my concern and can shed some light on this. And if I'm wrong please tell me.


Messages In This Thread
Views: how to do this correctly? - by El Forum - 06-22-2008, 04:43 AM
Views: how to do this correctly? - by El Forum - 06-22-2008, 06:03 AM
Views: how to do this correctly? - by El Forum - 06-22-2008, 06:27 AM
Views: how to do this correctly? - by El Forum - 06-22-2008, 08:10 AM
Views: how to do this correctly? - by El Forum - 06-22-2008, 08:17 AM
Views: how to do this correctly? - by El Forum - 06-22-2008, 12:39 PM
Views: how to do this correctly? - by El Forum - 06-22-2008, 01:53 PM
Views: how to do this correctly? - by El Forum - 06-22-2008, 02:08 PM
Views: how to do this correctly? - by El Forum - 06-22-2008, 02:38 PM
Views: how to do this correctly? - by El Forum - 06-22-2008, 03:04 PM
Views: how to do this correctly? - by El Forum - 06-22-2008, 03:10 PM
Views: how to do this correctly? - by El Forum - 06-22-2008, 03:28 PM
Views: how to do this correctly? - by El Forum - 06-22-2008, 03:35 PM
Views: how to do this correctly? - by El Forum - 06-22-2008, 03:53 PM
Views: how to do this correctly? - by El Forum - 06-22-2008, 05:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB