in reply to Re: Passing Database handles to other modules. #2
in thread Passing Database handles to other modules. #2

It is indeed oop, and thats a method that i've played with!
  • Comment on Re: Re: Passing Database handles to other modules. #2

Replies are listed 'Best First'.
Re^3: Passing Database handles to other modules. #2
by adrianh (Chancellor) on May 12, 2004 at 14:10 UTC
    It is indeed oop, and thats a method that i've played with!

    In that case, if you're still finding that you're creating lots of instances of your validation object in different places, I'd suspect that there is a layer of abstraction that's being missed somewhere.

    Are their other arguments that are similar between multiple instances? Would it make sense to make a factory object of some kind for creating similar validation objects?

    I'd tend to want to keep passing in the ref somewhere because it keeps everything decoupled and makes testing easier.