Re: Understanding the "M" in MVC?

2011-02-04 Thread AD7six
On Feb 4, 10:29 am, Jeremy Burns | Class Outfit wrote: > I take your point, and I'll admit that my controllers are often too fat. I > call model functions as much as possible, but find myself dipping back into > the controller when I need to use the Auth component, the Session, redirect > and

Re: Understanding the "M" in MVC?

2011-02-04 Thread Jeremy Burns | Class Outfit
I take your point, and I'll admit that my controllers are often too fat. I call model functions as much as possible, but find myself dipping back into the controller when I need to use the Auth component, the Session, redirect and so on (although I do collect as much info as I can and pass it in

Re: Understanding the "M" in MVC?

2011-02-04 Thread AD7six
On Feb 4, 8:45 am, Ryan Schmidt wrote: > On Feb 4, 2011, at 01:13, Jeremy Burns | Class Outfit wrote: > > > Create a function in your controller that firstly creates the connection > > object. Then have the function get the data from the model, which returns > > an array to the controller and

Re: Understanding the "M" in MVC?

2011-02-04 Thread AD7six
On Feb 4, 8:13 am, Jeremy Burns | Class Outfit wrote: > Create a function in your controller that firstly creates the connection > object. Holy MVC sacrilege batman. I hope you meant to say model. $stuff = $this->Model->somefunction() is about as far as a controller should go AD -- Our ne

Re: Understanding the "M" in MVC?

2011-02-04 Thread AD7six
s. I appreciate > Cake's file organization, the way layouts are controlled, among other things, > but I seem to be having a difficult time in the way I should be understanding > the "M" in MVC. I've done enough web development in the past to be familiar > with PHP, b

Re: Understanding the "M" in MVC?

2011-02-04 Thread Jeremy Burns | Class Outfit
Shell scripts are beyond my experience, so can't contribute to that one. Sounds like this ought to go in a component though, if you want to do it from multiple controllers. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Feb 2011, at 07:45, Ryan Schmidt wr

Re: Understanding the "M" in MVC?

2011-02-03 Thread Ryan Schmidt
On Feb 4, 2011, at 01:13, Jeremy Burns | Class Outfit wrote: > Create a function in your controller that firstly creates the connection > object. Then have the function get the data from the model, which returns an > array to the controller and is stored in a variable in the controller. Now >

Re: Understanding the "M" in MVC?

2011-02-03 Thread Jeremy Burns | Class Outfit
Create a function in your controller that firstly creates the connection object. Then have the function get the data from the model, which returns an array to the controller and is stored in a variable in the controller. Now parse that array running your controller/component function against you

Re: Understanding the "M" in MVC?

2011-02-03 Thread Ryan Schmidt
On Feb 3, 2011, at 23:36, Sam Sherlock wrote: > On Feb 3, 2011, at 23:22, Ryan Schmidt wrote: > >> It's still unclear to me what the best way is to, for example, define >> additional variables that go with a particular record. My first impulse was >> to define an instance variable in the Model

Re: Understanding the "M" in MVC?

2011-02-03 Thread Sam Sherlock
was determined on finding a stable, > community supported framework to help speed up the process. I appreciate > Cake's file organization, the way layouts are controlled, among other > things, but I seem to be having a difficult time in the way I should be > understanding the "

Re: Understanding the "M" in MVC?

2011-02-03 Thread Ryan Schmidt
Welcome! On Feb 3, 2011, at 08:12, Michael Carriere wrote: > • How "magical" is the find() function? Should I be able to run one > exhaustive query and get back all the nested data that I need for a View to > spit out? I guess a better question would be: do you find yourself calling > f

Re: Understanding the "M" in MVC?

2011-02-03 Thread Jeremy Burns | Class Outfit
ase was in dire need of a rewrite, I was determined on finding a stable, >> community supported framework to help speed up the process. I appreciate >> Cake's file organization, the way layouts are controlled, among other >> things, but I seem to be having a difficult ti

Re: Understanding the "M" in MVC?

2011-02-03 Thread ibejohn818
speed up the process. I appreciate > Cake's file organization, the way layouts are controlled, among other things, > but I seem to be having a difficult time in the way I should be understanding > the "M" in MVC. I've done enough web development in the past to be famil

Re: Understanding the "M" in MVC?

2011-02-03 Thread andy_the ultimate baker
led, among other things, > but I seem to be having a difficult time in the way I should be understanding > the "M" in MVC. I've done enough web development in the past to be familiar > with PHP, but more recently I've worked in object-oriented, compiled > languages

Understanding the "M" in MVC?

2011-02-03 Thread Michael Carriere
olled, among other things, but I seem to be having a difficult time in the way I should be understanding the "M" in MVC. I've done enough web development in the past to be familiar with PHP, but more recently I've worked in object-oriented, compiled languages, as well as a