Jamie - yes, it does feel good to know someone else is doing things
the way you did. I'm sure others are too.

AD7six - You said:

> what do you do when in app project you don't want something you're inheriting?

You 404 all actions you don't want to inherit.
AppController::Return404(  array( ... controller/action pairs you
don't want  ...)  );


> if your base/core functionality is behavior based you don't include the 
> behavior that does "<that>" and you're done.

All you're doing is turning the function calls in your afterSave()
into a list of behaviors in an $actsAs. In the first case one copies
the afterSave() into app/ and removes the notification call. In your
case, you copy the $actsAs from the base and remove the notifcation
behavior from the list.

Both cases involve copying some code, which may change in base, and
thus need to be propagated to app/. If the ordering of how the base
fires off it's behaviors needs to change, for example, you would have
to also change your $actsAs to reflect the new ordering.

If you are saying to not have any base models at all, just behaviors,
then you are right, there would be no code copying at all, just don't
include the notification behavior. But, that adds more work to develop
a client app, as you need to create all the models and $actsAs lists.

You've raised some interesting points, AD7Six.

You seem to be advocating a base comprised almost exclusively of
behaviors/components, with a minimum of controllers/models, so that
things can be assembled in the most flexible way for the client. The
inclusion of controllers/models, as you say, adds "rigidity" to the
base, making it less flexible.

I can see that in some cases.

In other cases though, many other cases, functionality literally can
remain unchanged across many client apps, so the "rigidity" of having
prepackaged controllers/models becomes an asset, not a liability, as
it's ready to go with almost no additional work. You gain in time
savings what you lose in flexibility.

I guess the real trick is knowing (if anyone can really know) what can
be deployed as is, and what will need to be recombined in different
ways before deployment.

AD7Six, how much of a behavior/component purist were you when you
developed your MIBase? Did you include any controllers/models, or is
it composed exclusively of behaviors/components?

Thanks for this enjoyable discussion.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en

Reply via email to