Hey Clifford,

You are definitely running into a design problem. If you feel like you've
got too much into one controller, you probably are doing too much inside of
the controller.

In the world of Model Glue, the controller has a very small job. It's job is
to:


   - Get the user input ( form, URL) and put it into an object. (this is
   probably a bean-style object you created)
   - Pass the object into Model objects (Services, Managers, DAOs, Gateways,
   whatever)
   - Deal with the results of the Model Call (put things into the Event
   object, Add a result, Throw an error, whatever)

So, if the methods in your controller have more than 5-50 lines of code in
them (at Maximum) that's a sign you aren't breaking out the logic
appropriately into Model objects. This causes your codebase to become
unorganized and causes copy-paste style coding. It will definitely reduce
some of the benefit of using Model Glue, because you've got too much
unreusable code.


It might be best for you to go over the Model Glue training, found here:
http://docs.model-glue.com/wiki/Training#WelcometoModel-Glue3Training

I'd recommend taking the time to actually install the training files and
follow all of the lessons. You'll find the answers to a lot of your
questions in the training.

( You'll likely remember a lot of this from our Training Class at
CFObjective. )


Post back with any questions and we'll do our best to answer them,



DW







On Tue, Sep 28, 2010 at 9:56 AM, Clifford Moon <[email protected]>wrote:

> Greetings,
>
> What do I need to do to split up the controller.cfc into more
> manageable "smaller" files.  I've attempted several things, but still
> wind up with the methods not being found in Controller.cfc.  Is there
> anything special that one needs to do to make it recognize subordinate
> controller files.  I've duplicated the <cfcomponent> tag in
> another .cfc in the controller directory, but didnt work, and I wind
> up with the following error:
>
>
> Message The method needGenericAdminForm was not found in component D:
> \Website\aa\EventManagement\controller\Controller.cfc.
> Detail  Ensure that the method is defined, and that it is spelled
> correctly.
>
>
> Thanks in Advance,
>
> Cliff
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<model-glue%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en




-- 
William Osler - "We are here to add what we can to life, not to get what we
can from life."

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to