Hi Joe,

I'm currently experimenting with Model-Glue:Unity. Totally agree with Eric's
last point.

Personally, I'm trying out to make my controller as dumb as possible. I do
this my having all my logic etc in a separate CFC away from the model. This
has been done deliberately as I'm expecting the spec for my project to
change anytime :-).

If this occurs, having this "service layer" could cause me less grief, than
if my controller contained the logic. Not saying this is the right way - but
this is my current train of thought.

Hope it helps.

- J

On 3/7/07, Eric Knipp <[EMAIL PROTECTED]> wrote:

Joe,

Suppose you started out using Mach-II, and later decided you wanted to use
Model-Glue (or anything else) instead.  A few questions ..

How would the strategy you outline below be affected by such a decision?

How would you transfer the required functionality to the new framework?

What is the impact of coupling paging/filtering functionality directly to
the controller, rather than leaving it in the model where it is decoupled
from layers above it?

While in fact you may never migrate to another framework - in practice I
would say migrating from Mach-II to Model-Glue is pretty unlikely unless
support for Mach-II just dries up one day - I believe it is good practice to
separate the model from the controller as much as possible.  In my
interpretation of your application I believe that the filtering/sorting you
mention is really part of the model and belongs there.  Having said all that
- I think any MVC is better than no MVC so I don't think you're doing
anything "wrong".

Clear as mud?

Eric

On 3/7/07, Joe Lakey <[EMAIL PROTECTED]> wrote:
>
>  I'm developing a survey application, and right now, I'm working on the
> reporting part of the app. The survey results are in a table 'Result'. The
> user's access is limited to certain records based on management level and
> organization. The user is able to filter results on fiscal year and quarter
> or on a date range.
>
> My thinking is that the database query should be in a CFC in the model
> layer and should return all survey results to which the user has access. The
> filtering (and sorting and paging) would be in a controller in the session
> scope. The controller would cache the entire recordset from the model layer
> and return the appropriate filtered, sorted data to the view layer (cfm
> page) as a query or structure in the Request scope.
>
> Is this a correct application of the MVC framework? Anything that could
> be done better?
>
> Thanks in advance,
>
> Joe
>
> You are subscribed to cfcdev. To unsubscribe, please follow the
> instructions at http://www.cfczone.org/listserv.cfm
>
> CFCDev is supported by:
> Katapult Media, Inc.
> We are cool code geeks looking for fun projects to rock!
> www.katapultmedia.com
>
> An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]
>



You are subscribed to cfcdev. To unsubscribe, please follow the
instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]



You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to