Hi all,

My application accepts a fairly large collection of parameters and
uses them to generate an HTML snippet. The snippet is generated
lazily, so that the parameters can change frequently but the HTML is
only generated when it's needed. Once generated, the HTML is cached
(in the database) until the parameters change again.

I'm new to MVC, and not sure where the best place to put the HTML
generation code is. I would guess that the Model is the best logical
place for it, since it will be updating a model reference with the
generated HTML. What makes me wonder though, is that the generation
code actually references other models (because the parameters can be
logically separated).

Would the Controller be a better place for this code, or should I
leave it in the Model? If so, how do you access other models from
within a Model class?

Many thanks,
Matt.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to