No - the point of MVC is really to separate the manipulation of model
data from the view through the use of a controller. There's nothing
wrong with reading data from a model in a view, unless you like
needless overhead. Lots of respected frameworks do it (like the Zend
Framework).

On Nov 16, 10:50 am, cricket <zijn.digi...@gmail.com> wrote:
> The whole point of the MVC pattern is to separate the Model from the
> View through the use of a Controller.
>
>
>
>
>
>
>
> On Tue, Nov 16, 2010 at 3:45 AM, Joshua Muheim <psybea...@gmail.com> wrote:
> > Also an interesting idea, Miles. Thanks for mentioning it.
>
> > On Fri, Nov 12, 2010 at 8:00 PM, Miles J <mileswjohn...@gmail.com> wrote:
> >> I dislike this also. Cake really should have more than 1 model type:
> >> DAOModel and DataModel.
>
> >> One deals with database interactions, while the other manipulates a
> >> dataset for the view.
>
> >> However, there is nothing stopping you creating these extra models.
>
> >> $this->set('data', new UserDataModel($this->User->find()));
>
> >> On Nov 12, 5:23 am, Joshua Muheim <psybea...@gmail.com> wrote:
> >>> I'd like to warm up this topic again. :-)
>
> >>> I decided to pass model instances to the views instead of just their
> >>> $data attributes. So is there a way to tweak the paginator to do
> >>> exactly this?
>
> >>> Thanks,
> >>> Josh
>
> >>> On Thu, Oct 28, 2010 at 8:26 PM, euromark <dereurom...@googlemail.com> 
> >>> wrote:
> >>> > i tend to do those things "on demand"
> >>> > using a behavior to add new keys or even doing it in the model
> >>> > afterFind() etc often results in additional work without actually
> >>> > needing this information
> >>> > but of course this depends on the particular case
>
> >>> > On 28 Okt., 20:10, cricket <zijn.digi...@gmail.com> wrote:
> >>> >> On Thu, Oct 28, 2010 at 10:03 AM, euromark 
> >>> >> <dereurom...@googlemail.com> wrote:
> >>> >> > thats not correct for PHP5 anymore
> >>> >> > in PHP4 you needed to do this
> >>> >> > but in PHP5 it is passed by reference by default, afaik
>
> >>> >> Agreed on passing the model to the view. But this could also be
> >>> >> accomplished in afterFind(), adding new key => value to the data
> >>> >> array.
>
> >>> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> >>> > with their CakePHP related questions.
>
> >>> > 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
> >>> > cake-php+unsubscr...@googlegroups.com For more options, visit this 
> >>> > group athttp://groups.google.com/group/cake-php?hl=en
>
> >> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> >> with their CakePHP related questions.
>
> >> 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
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> >> athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to