On Thu, Dec 4, 2008 at 8:59 AM, Louis Ryan <[EMAIL PROTECTED]> wrote:
> If people object to @ImplementedBy then its clearly not a big deal to remove
> it but the truth is that the equivalent will be moved into module specific
> default configurations which implementers can override. We will continue to
> have a default guice module in common, gadgets & social packages because
> gadgets and social are designed to run as separate components.

It is not as buzzword compliant, but as we have specific pluggable
things, a clear and simple (to me anyway) alternative would be to
provide a factory interface for the pluggable components and a
reasonable default implementation designed to allow overriding the
things which need to be changed.

This provides a single place for shindig users to see what is
pluggable, folks who want to err on the side of extreme caution can
ignore the default factory and provide an implementation of the
interface, folks who are more comfortable with allowing new defaults
to sneak in can just override the things they want to provide their
own implementations of.

To give a simplified example:

interface SocialFactory:
   ActivityService getActivityServuce();


class BaseSocialFactory implements ActivityService:
   ActivityService getActivityService() { return new ExampleActivityService() }


Shindig can continue to use guice internally by using providers which
call the factory methods to obtain the actual instances.

-Brian

Reply via email to