Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Oct 2 '12 at 13:50

This question came from our site for professional and enthusiast programmers.

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

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.

share|improve this answer

Plugin is new, IModule is old.

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

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

You must log in to answer this question.