[Lazarus] WebDataProvider's Factory Support

Leonardo M. Ramé l.rame at griensu.com
Sun Oct 24 20:55:28 CEST 2010


On 2010-10-24 20:44:28 +0200, Michael Van Canneyt wrote:
> >It is possible to define the WebDataProviders in their own unit (by
> >code), then, in the TFPWebProviderDataModule register all providers with RegisterProvider,
> >to let the module know about them?.
> 
> You can do this.
> 
> How we work at my job is: create N datamodules with
> WebDataProviders, and at program startup, register all the
> datamodules in the factory.
> 
> There is exactly 1 TFPWebProviderDataModule which has the option set
> to check the factory registry. It is registered with URL /Providers.

Ok, that way all datamodules (except the one that you mentioned) are just 
containers of WebDataProviders, until the moment where a request
needs one of them, then, the factory creates an instance of the required
one.

Much clear now, thanks Michael.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list