How Superface works
Superface is a language and a protocol for abstracting integrations as application use-cases. It allows use-case discovery and distribution of integration code at runtime.
This approach gives you a framework to decouple the lifecycle of your application from the integrations it uses.
Build and publish the integration
The registry is a service, that allows use-case discovery and distribution of integration code at runtime. It also allows the authors to test the integration code that’s specific to each provider completely decoupled from any application code.
- Create use-case by defining application needs. It enables you to describe the business behaviour of an application without the need to go into detail of implementation.
- Define provider’s available services and authentication mechanisms.
- Write integration code to connect use-case to specific provider. It essentially maps the application (business) semantics into provider’s interface implementation.
- Publish to registry.
Application use-cases with specific integration code are published to the registry.
Use the client in your code
The client enables you to write your code around the use-case interface without the knowledge of any implementation details yet.
- Install a use-case from the registry.
- Install Superface client and use it in your code.
- Configure which provider APIs you trust and should be used in runtime.
- Bring your own credentials for the provider APIs you decide to use. Client uses these credentials to interact with the provider directly.
During app development use-case is installed to provide an interface to program around.
Run your code
Run your code with the client installed. Let the client obtain the latest integration code from the registry and interact with the provider API.
In runtime, the client obtains the latest version of integration code and interacts with the API.