AyaNova 5 - new feature for developers: Plugins

A very cool new feature of AyaNova 5 is plugins. We are implementing several of our previously external utilities as plugins in AyaNova 5.x and have a thoroughly documented developers example for creating your own plugins.

Plugins are exposed in AyaNova as a Plugin menu option inside AyaNova for windows. When an AyaNova user logs in, AyaNova will scan a /plugins sub folder under the AyaNova program files folder and any compatible plugins found will be polled to see if they want to participate for the current logged in user. This allows plugins to be available depending on the rights of the user and their user type.

Plugins will then be polled as the user navigates to various areas in AyaNova to see if they want to provide menu options for the given object type being edited.

Plugins are available in three areas of AyaNova:

  • from the main AyaNova menu as general purpose plugins not tied to a specific object type (i.e. general utilities, configuration of plugin etc)

  • from a single editable root object that has it’s own edit form such as a Client or a Unit (i.e. modification of object being edited)

  • from a read only main grid list of items in AyaNova. (i.e. modification or reporting on selected or all objects listed)

When a plugin is selected from a single object editable form, a live copy of the object currently being edited and it’s object type are passed to the plugin if invoked so it can make modifications directly to the live object being edited. Those modifications will appear instantly to the user within the AyaNova user interface.

When a plugin is selected from a read only grid list, a list of the user selected object id’s and their type will be passed to the plugin when invoked and the plugin can return a value indicating the list should be refreshed or not after the plugin is completed.

When a plugin is selected from the main AyaNova menu no object is passed to the plugin.

A plugin does not require the AyaNova business object files to be distributed with it, so you can distribute your plugin as a single small .dll file. Plugins are a class library that implements the IAyaNovaPlugin interface.

Examples will be provided for both C# and Visual Basic .net however as with the AyaNova business object API any .net language can be used to develop plugins.

The plugin interface still allows you to use the full AyaNova developers API, it just provides a way to integrate it into AyaNova itself and simplifies developing and distributing your application. In addition the AyaNova resources are passed to the plugin so your plugin can use all the resources in AyaNova such as the icons and bitmaps that are used in the AyaNova interface itself for consistency and professional appearance.

One important benefit of developing your add-on for AyaNova as a Plugin is that it shares the same connection to the database as AyaNova so if the user has a standalone Firebird database connection your app can run simultaneously with AyaNova where with a normal add-on running outside of AyaNova the user must close AyaNova before they can run your add-on due to embedded stand alone Firebirds limitation of one connection only.

Plugins can have a full user interface or be a simple utility with no visible interface.