Re: jcontainer-interest digest, Vol 1 #191 - 5 msgs
Chad Woolley <lists-+3axmRx+iL57nQ4KK8CQzgC/[email protected]> Mon, 12 Jan 2004 18:29:13 -0700
| Newsgroups | gmane.comp.java.jcontainer.interest |
|---|---|
| Message-ID | <[email protected]> |
jcontainer-interest wrote:
> I haven't looked at the code in detail but off the to pof my head the way I
> would do it if I was you would be to organize it like the following;
>
> * Create an XML config file DTD
> * Create a VirtualMockConfig object that contains all configuration options
> * Create a ConfigReader that reads config file and creates a
> VirtualMockConfig object
> * Create a VirtualMockRuntime that sets up the runtime and is passed a
> VirtualMockConfig object
> (Alternatively create a VirtualMockRuntime and a RuntimeBuilder and pass
> VirtualMockConfig to
> the RuntimeBuilder and setup/configure VirtualMockRuntime)
>
> Note that in the above there is no static methods.
>
> As the above is a PITA to setup and configure it may be best to create a
> static utility class to help do all this in fewer steps. You may have
> something like a
>
> class VirtualMockFactory
> {
> static VirtualMockRuntime createRuntime() {...} //May read default config
> file from Classpath
> static VirtualMockRuntime createRuntime( InputSource in ) {...} //For ones
> that use non-standard config file
> }
Thank you for the feedback. Can you point me to any applications or
frameworks which use a similar approach, so I can shamelessly steal
their code - er, see some examples?
Thanks,
Chad