george stewart wrote:
> 
> --- Dave <[EMAIL PROTECTED]> wrote:
> >
> >
> > Brett McLaughlin wrote:
> >
> > > I am a bit torn on:
> > >
> > > public void set(Object ob);
> > >
> > > -or-
> > >
> > > public void add(Object ob);
> > >
> > > If you can come up with 3 cases of services where
> > that would be used, I
> > > am OK with adding it in.  That is my benchmark; if
> > there are 3 times it
> > > can be used, it makes sense to add it; less than
> > that it is too specific
> > > to be in a generic contract.  add() could also be
> > your update, as you
> > > check for a name/id of an event and either
> > add/update.
> > >
> >
> > I know of at least 2 off the top of my head :
> > Scheduler, GlobalCache.
> > Someone else know a
> > third?
> >
> > So to this point, this is kinda what it may look
> > like -
> >
> > public interface Service {
> >
> >   public void setName(String name);
> >
> >   public String getName();
> >
> >   public void init(Object ob);
> >
> >   public Object get();
> >
> >   public void set(Object ob); //I can do an ADD and
> > UPDATE here if
> > needed
> >
> >   public void release(Object ob);
> >
> >   public boolean execute() throws ServiceException;
> >
> >   public void destroy();
> >
> > }
> >
> > It's getting closer.  Here's what I see -
> >
> > Service developer - Low level. Gotta think about it.
> > what's a get, set,
> > release, execute, etc... mean
> > to my service and how does my service fit that mold.
> >
> > Service user - No brainer. service.init(o) -
> > service.execute() ...
> > later!
> >
> >
> > On track?
> > dave
> >
> 
> Brett, you could consider putting any addded methods
> in a separate interface keeping a thin design with the
> first.  Might be cases where execute won't be useful.

Actually, I think execute() should always be useful.  In addition, I
have some other tricks up my sleeve for having the methods defined in
one contract interface.  I want to be able to do more than provide a
common interface just so all services look the same; i want to be able
to do:

Service service =
TurbineServiceManager.getInstance().getService(passedInRequestParam);
service.init(userObject);
service.execute();

This lets us build a truly interactive workspace where users can request
services (like scheduling) and the app can discover what services should
be loaded at runtime.  For this reason, I would like the Service
interface to be standard, so that any service can be used with it
completely.

Make sense?

-Brett

> 
> Regards, george
> 
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to