Ok, That all sounds really good Cliff. Have you thought of using multiple controllers? I've got 10-15 controllers in one of my applications, each one with a different purpose.
ChallengeController.cfc MembershipController.cfc etc.... On Tue, Sep 28, 2010 at 10:42 AM, Clifford Moon <[email protected]>wrote: > Hey Dan, > > I've actually (IMO), got a very light controller.cfc, (the max lines I > have of any method in there is 20 lines. most are 5-10). It's just > got a LOT of methods, and I wanted to make it easier to put all the > stuff (controller methods) dealing with "this part of the app here" > and all the methods dealing with this part of the app into this > file.. > > I actually followed the training that you indicated. It's what > finally got me over the hump on using ModelGlue.. > > I gotta be truthful with you. I left the CF world for about 5 years > and worked in Oracle APEX almost exclusively. When we were told we > were moving back to CF, I wasn't real keen on the idea. > ModelGlue after I got my feet under it changed all that... Love > coding in it now.. And it simplifies it on so many levels too.. > > Thanks, > > Cliff > > On Sep 28, 9:02 am, Dan Wilson <[email protected]> wrote: > > 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]> > <model-glue%2bunsubscr...@googlegrou ps.com> > > > 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]<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
