It depends. (always the expected answer with an OOP design question =) Generally, if the method you are calling on class A does not work on/effect the state of a specific object, its a canidate to be a static (class) method. However, you should be careful about coupling your objects and understand what you are doing when you do. If you feel comfortable for that method be a static method, though, you're probably good to do so. Generally....depending....
=) Hope this helps. Steve On Thu, Jan 29, 2009 at 12:54 PM, kropotkin <enquir...@mms-oxford.com> wrote: > > Hi > > In general is it better to use a class method or object method? E.g I have a > class A which provides certain functionality. I just want to use one of its > methods in another class B. Is it better to inistantiate class A and do and > object call or just do A->myMethod() ? The method doesn't need a reference > to itself passed in so from that point of view it doesn't matter > > Thanks > > Justin > -- > View this message in context: > http://www.nabble.com/Class-method-or-Object-method--tp21732172p21732172.html > Sent from the mod_perl - General mailing list archive at Nabble.com. > >