What is best way to consume service without knowing the service provider


#1

when you have a package which would like to consume the service provided by other’s but would not know who would be providing the service. because it would be the user who would install the service provider package based on his taste…so the base package can use it if there is a provider available else it doesn’t do anything…

so my solution for this would be to have the base package as the service provider but actually using the service from other packages registering with it.

Does atom have a framework to handle this…


#2

The whole point of the service system is so that you don’t have to know who the provider is. You specify an API, the provider provides the implementation of the API and the consumer consumes the implementation of the API. One doesn’t have to know about the other … so long as they both agree on the API.