Re: Fat Models vs. App Controller

2011-02-27 Thread AD7six
On 27 feb, 00:02, Eric Anderson wrote: > Hi everyone, > > Just wondering when it comes to performance and any other factors you > may deem important, what's the better option for storing functions > that I will use among many controllers: A function in the model that I > can then access via $thi

Re: Fat Models vs. App Controller

2011-02-26 Thread Sam Sherlock
I have just finished moving some a controller method to a model just now (if the same logic had to be used by multiple models then I would have made a helper) my app manges a list of jobs held in a db (an external system puts them in - another reason why behaviours would not work in my case; my sy

Re: Fat Models vs. App Controller

2011-02-26 Thread Eric Anderson
Awesome article. Thanks! I think I'm going to move everything over to my model, via either an available function I can then call from other controllers or place the function in beforeSave, afterSave, etc. Should work great. Eric On Feb 26, 5:59 pm, Sam Sherlock wrote: > to me it sounds list beh

Re: Fat Models vs. App Controller

2011-02-26 Thread Sam Sherlock
to me it sounds list behaviours all controllers extend the app controller - choose carefully what you put here if the stuff is entity related it goes in model you can add to app model (& helper & error also) in the same way as you can with app controller fat models, skinny controllers and athle

Re: Fat Models vs. App Controller

2011-02-26 Thread Eric Anderson
Ya a component doesn't necessarily work because I'm interfacing with the DB (inserting, deleting, querying) a lot. I'm thinking from articles I've been digging up (Mark Story's personal site) that putting these functions in my Activity controller makes the most sense, then I can just grab feeds, sa

Re: Fat Models vs. App Controller

2011-02-26 Thread euromark
usually you would put functions you use in multiple controllers in either the model (data?) or a component (logic?) you can also use libs to "dry" your code :) On 27 Feb., 00:02, Eric Anderson wrote: > Hi everyone, > > Just wondering when it comes to performance and any other factors you > may d

Fat Models vs. App Controller

2011-02-26 Thread Eric Anderson
Hi everyone, Just wondering when it comes to performance and any other factors you may deem important, what's the better option for storing functions that I will use among many controllers: A function in the model that I can then access via $this->Model->Model->function() or a function inside of m