TREGAN Fabien wrote:
> 
> Depending on the samples, there are to different way of resolving 
> the source
> URL :
> 
> 1- The Factory send the whole location to the Source's constructor, wich
> deal with it
> 2- The Factory parse the location, and call the constructor with typed
> parameters (or trhows MalformerURLException)
> 
> Is there one of this you considere as preferable ?
> 
It depends. For most cases I personally prefer 1) where the factory is 
only a real factory for creating components and therefore passes everything
on to the Source object.

Solution 2) can be/is used where it is possible to reuse concrete Source
implementations. This means for example two different factories use the
same Source implementations and therefore create the necessary parameters
and pass them on.

HTH
Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to