Where Does This Fall in the MVC Architecture?

2008-12-09 Thread Tony Thomas
I'm working on an application to store information on lab specimens. The lab receive specimens which are divided into aliquots which are then put into boxes and in turn stored in freezers. I want to create a function to find all unstored aliquots and display a message on every page to alert the

Re: Where Does This Fall in the MVC Architecture?

2008-12-09 Thread Jon Bennett
Hi Tony, I'm working on an application to store information on lab specimens. The lab receive specimens which are divided into aliquots which are then put into boxes and in turn stored in freezers. I want to create a function to find all unstored aliquots and display a message on

Re: Where Does This Fall in the MVC Architecture?

2008-12-09 Thread Jon Bennett
I would: * create a method in your model to fetch the data * create a method in your controller to access this data * create an element that calls via 'requestAction' the data from the controller * insert this element into your layout and add array('cache'='1 hour'); take a look at

Re: Where Does This Fall in the MVC Architecture?

2008-12-09 Thread Joe
You could also just query the db and assign the value in your app_controller.php and make it so your layout always checks if that value is 0. If it is, display a warning. On Dec 9, 7:35 am, Tony Thomas [EMAIL PROTECTED] wrote: I'm working on an application to store information on lab

Re: Where Does This Fall in the MVC Architecture?

2008-12-09 Thread Jon Bennett
You could also just query the db and assign the value in your app_controller.php and make it so your layout always checks if that value is 0. If it is, display a warning. ahh, yes - that's not a very cake way though! adding 'uses' to your app_controller is a really bad idea, slow things

Re: Where Does This Fall in the MVC Architecture?

2008-12-09 Thread Tony Thomas
Fantastic. That worked! On Dec 9, 9:30 am, Jon Bennett [EMAIL PROTECTED] wrote: I would:  * create a method in your model to fetch the data  * create a method in your controller to access this data  * create an element that calls via 'requestAction' the data from the controller  *

Re: Where Does This Fall in the MVC Architecture?

2008-12-09 Thread Dave C
Tony, One approach you could use: As suggested by Jon Bennett: * create a method in the model to fetch the data * create an action in the controller to request the data in the model Then: * create a JSON or XML view for the action * create a JavaScript control for your display that will