On Dec 4, 4:17 pm, sunertl <[EMAIL PROTECTED]> wrote:
> I have a question concerning the reusage of code in cakephp. as far as
> i understood the optimum to reach in mvc-frameworks is that no code is
> written twice. cake gives me means like elements and requestAction to
> reach this goal.
>
> but: every requestAction results in a new http-request, for elements i
> do not know. so i am concerned if i trade reusage for performance. is
> it better to write the few lines for pagination in every index-view
> (like created by bake) or write one element i call from there.
> the views created by bake include tables of related models. would it
> be better to requestAction index (with an aditional parameter
> containing the foreign key) from the related model? i think you can
> find dozens of situations like that.
>
> is there a limit like "not more than 5 requestActions and 3 elements
> per page" for best performance or should they be used all over to get
> best reusage of code?
>
> thank you in advance for your help!
I don't think there is any noticable performance hit at all using
elements, if you can restructure your code to not need to use
requestAction, it'll be in your interest to do so.
Or in other words optimal:
elements = unlimited;
requestAction = 0;
IMO hth,
AD
PS mini controllers on the frequent discussions page.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---