How to delegate? If, for instance, 5 public methods in objectA seem to be doing something related.
What can I do? Group those 5 methods up and delegate to a new objectB? and combine those 5 into one "createObjectB()"? Wouldn't that make the API less user-friendly? Thank you guys. Regards, Henry Ho On Jun 8, 11:21 am, Peter Bell <[email protected]> wrote: > Delegate some of the objects responsibilities to a composed object or > (if it fits better), split the object into multiple interacting > objects with different responsibilities. Try to think about the Single > Responsibility Principle and looking for highly cohesive, lightly > coupled objects. > > On Jun 8, 2009, at 2:13 PM, Henry wrote: > > > > > What techniques can one use when one found the # of methods in an > > object is too high? > > > Actually, when is it 'too high'? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" 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/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
