Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Displaying output

by ides (Deacon)
on May 14, 2007 at 14:41 UTC ( #615328=note: print w/replies, xml ) Need Help??

in reply to Displaying output

That's really a matter of personal taste. You can do the "limiting" in either place. I weigh the decision on this type of thing based on the server resources used. If the cost of retrieving the data is high and likely to be large often, then I would put it into the controller. That way you can limit it as early as possible, for example if you know you want to page rows from the database 50 at a time, it's best to just make the SQL 'LIMIT 50'.

If the chance that the data is too large are small ( not frequent ) and the cost to retrieve it isn't large, then I would probably opt to limit it in the template. So as not to overly limit the flexibility of the application.

Frank Wiles <>

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://615328]
[Lady_Aleena]: Hello. Why is this dying at -exec: my @music_times = qx(find ~/Music/Albums/ -type f -iname '*.mp3' -exec {} \;); with the error find: missing argument to `-exec'
[Lady_Aleena]: ACK! my @music_times = qx(find ~/Music/Albums/ -type f -iname '*.mp3' -exec mp3info -p "%S\n" {} \;);
[marioroy]: :)
marioroy adds oatmeal cookies to the platter on the sideboard.
marioroy adds oatmeal raisin cookies to the platter on the sideboard.

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-04-23 09:10 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (430 votes). Check out past polls.