I am looking for some explanation or reference info on the service provider design pattern as i came across this while studying the Grapht @defaultImplementation code (http://grepcode.com/file/repo1.maven.org/maven2/org.grouplens.grapht/grapht/0.5.0/org/grouplens/grapht/annotation/DefaultImplementation.java)
This annotation is used with annotations in the LensKit implementation as in 28:57 of this video: https://www.youtube.com/watch?v=ug_JfORWK7w
I am looking for explanation or references to learn & understand the utility of this design pattern.
Please advise
Thanks
What are Service Design Patterns? Service design patterns are the basic building blocks that make up services — things like proving your identity, sharing your information, making a payment, or getting a notification.
The provider model is a design pattern formulated by Microsoft for use in the ASP.NET Starter Kits and formalized in . NET version 2.0.
Service Locator - Service locator is a design pattern that allows a service to be decoupled from its consumer by using a “service locator” to retrieve it. In Java an interface or abstract class is used to define the structure of the service.
An application is an aggregation of cohesive services. While an application offers a broader set of functionality in terms of application programming interfaces (APIs) and classes, a service provides access to some specific application functionality or feature. The service defines the interfaces for the functionality and a way to retrieve an implementation. For example, consider an application that provides a variety of information about a geographical location, such as real estate data, weather information, demographics, etc. The weather service, a part of the application, may define only the interface for retrieving the weather information (more on this example shortly).
A service provider interface (SPI) is the set of public interfaces and abstract classes that a service defines. A SPI may be represented by a single interface (type) or abstract class or a set of interfaces or abstract classes that define the service contract.
Source Service Provider Interface: Creating Extensible Java Applications
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With