Skip to main content

Introduction

Before going deeper into the matter, we have to understand what a plugin is and what we can do with it.

What a plugin is (in the context of Web App 3):

  • A plugin is logic-only piece of functionality that should be concerned with mostly two scenarios:

    • making more niche Infinity functionality available - something that would be overcomplicating the user experience for the majority of customers but does make sense in this customer's world.

    • integrating a 3rd party functionality into the flow. An example could be a feedback form or a bespoke recording service.

  • It's worth mentioning that plugins can still create visual components to execute said functionality. The difference in concept compared to previous plugin APIs is the plugin would now, via a set of events, instruct the app to add UI elements on its behalf, compared to the plugin itself having access to the DOM. This has several advantages.

    • UX is kept intact

    • Branding is automatically applied

    • Since the UI aspect of a plugin is mostly just the means of making the sought after functionality available, we are delegating this task to the app and its developers in the hope of simplifying the process of creating a plugin.

What a plugin isn't:

  • The most significant change compared to the plugin system of WebApp2 is that major changes of the application's workflow are discouraged and not really supported. What constitutes a major change is still to be properly defined but the idea is that because that plugin developers won't have DOM & RTC object, the complication that a plugin can reach will be self-limiting. More complex workflow changes will be tackled as a build case eventually.

Plugin API design

Here we will give an overview on how the plugin is build & loaded.

  • A plugin is loaded as an iframe, allowing the application to sandbox its permissions

  • The plugin-to-app communication is done on top of the web message API. This is, however, hidden from the plugin developer and wrapped via a higher level API.

  • A plugin can & has access to:

    • Instruct the application to render UI elements

    • A set of Infinity API endpoints to call on

    • A set of Infinity Events to listen on