"Diethelm Guallar, Gonzalo" wrote:
> 
> Could anyone explain what the philosophy behind the idea of
> Services is? When would I want to implement something as a
> Service? 

I don't know the history behind why some things in turbine are services,
and some are not, but I think that the idea of a service is to create an
interface for "easily creating singletons."  It's for any code which
needs to be accessed by many different threads, or areas in your web
application, but needs only one instance probably for sharing memory....


In "Design Patterns", they say:

Singleton: Ensure a class only has one instance, and provide a global
point of access to it.

Use the singleton pattern where:

- There must be exactly one instance of a class, 
        and it must be accessible to clients 
        from a well known access point

- When the sole instance should be extensible 
        using subclassing, and clients should 
        be able to use an extended instance 
        without modifying their code.


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to