Just to push the other side of the argument a bit, there are some benefits to the Cake approach that haven´t been mentioned...
Ideally a view should standalone completely, i.e is uncoupled form any other part of the system, and have no dependencies: that makes it a lot easier to reuse views in other parts of the system, or other projects, etc. However once you start accessing specific models and their methods in views then they´re a lot less flexible, and you almost might as well do your output direct in a controller (extreme example, but you see what I mean)! Just playing Devil´s advocate... On Jun 6, 9:52 pm, MrTufty <[EMAIL PROTECTED]> wrote: > To weigh in on this one, presumably this limitation will go away once > Cake starts returning objects instead of arrays, which (last I > checked) was still slated for 2.0? From my point of view it's not a > big deal, it's a nice-to-have rather than a must-have. > > Chris is definitely correct - if you can't do it the way you want to, > you're probably pushing against the framework rather than working with > it. > > On Jun 6, 2:27 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > > > > > On 6/6/07, unimatrixZxero <[EMAIL PROTECTED]> wrote: > > > > He only wants to CALL the methods from the view, which is perfectly > > > fine. This does not contradict MVC in any way. In Ruby on Rails you > > > can do this. The reason this doesn't work in Cake PHP is simply one of > > > it's shortcomings. The ActiveRecord pattern is not done > > > 'correctly' (i.e. not all aspects are implemented). A row should > > > correspond to an object. > > > (http://en.wikipedia.org/wiki/Active_record_pattern > > > CakePHP has a set of rules, and one of those rules is "thou shalt not > > call models from your views". Yes, that sucks when you want to do it. > > I'm sure Craig is smart enough to figure it out using CakePHP's > > rules. I've often found that when you can't do something a certain > > way in any given application framework, chances are you are probably > > taking the wrong approach. Be flexible. :) > > > -- > > Chris Hartjes > > > My motto for 2007: "Just build it, damnit!" > > > @TheBallpark -http://www.littlehart.net/attheballpark > > @TheKeyboard -http://www.littlehart.net/atthekeyboard- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---