1

I started to touch Petrel Ocean just now, and what to know what is the difference between the Plug-in and the Module.

At least for now, they look the same.

Can anyone please give me some ideas?

1
  • Despite the answers, this question is not a good fit for SO.
    – High Performance Mark
    Oct 1, 2012 at 9:06

4 Answers 4

1

The Plugin class contains properties which provide identity to the plugin and used by plug-in manager. Plugin contains all Modules in IEnumerable Modules. The IModule interface defines methods of the module lifecycle phases. During the Petrel startup, the Ocean Core will load modules as defined in a configuration file by plug-in manager based on Plugin class.

1

Plugin is new, IModule is old.

Plugin Manager deals with Plugin so that is the one you should use.

0
1

If you plan to deploy your plug-in through the Ocean Store then you will be required to derive from the Plugin class. Of course your plug-in MUST also implement IModule since that is where the methods controlling the lifecycle reside.

0

Plugin is an aggregating entity for IModule, i.e. one Ocean plug-in may consist of several modules, each of them licensed separately.

Plugin contains additional information - Author, Contact, PluginUri, which helps Petrel to inform users better, when a plug-in causes an issue (e.g. unhandled exception). By the way, Plugin is an information container only, as it does not contain any methods to override.

Plugin lets you declare Dependencies, to define the order of Ocean plug-ins loading in Petrel.

And finally, an Ocean plug-in with Plugin class defined and packaged as PIP, contains a metafile in XML format, with all the Plugin properties, letting Petrel to check for certain conditions upfront, without actually installing it. An example is AppVersion property, which define the version of host application (e.g. Petrel), that this plug-ins is compiled with.

You must log in to answer this question.