As I work on my CakePHP based projects, I find that my views/elements
directory gets more and more filled.  I really like putting view logic
in elements even in cases where I am not actually re-using the
element.  I find I am treating elements almost like functions, so that
when I have a fairly complicated piece of view logic, I remove it from
the index.ctp or view.ctp template file, so that the main template
file is easier to read.  The fact that I can cache elements is also a
huge benefit.

But I'm wondering if other CakePHP developers like elements as much as
I do?  Am I creating spaghetti code?  Do you find it annoying if you
check out a project and a ton of the view logic is encapsulated in
elements?

Is the liberal use of elements considered a CakePHP "best practice" or
are elements meant to be used sparingly?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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