Thursday, April 28, 2011

On Applications, Plugins and Packages

I am having a bizarre discussion on the git mailing list about whether it is ok for an application (git, say) to provide its own plugin installation command.

E.g.:

  git install gitwork.

The idea has been described as 'horrid', 'utterly horrid' and 'crap'.

Bizarre.

The concept of a division of responsibilities between 3 roles seems to be misunderstood.

There are 3 roles:

application, plugin and package.

  • The application provides the plugin manager.
  • The distribution provides the package manager.
  • The package manager packages the plugin as a OS-specific package.
  • The package manager installs the package, containing the plugin.
  • The package manager calls the application's plugin manager to activate the plugin

Optionally, the application delegates plugin installation request to one or more package managers.

Simple, isn't it?

Yes, Ruby got it wrong. Why did it get it wrong?

ruby got it wrong because ruby has a plugin manager (gem) that wants to be a package manager.

Just because Ruby got it wrong, doesn't mean git can't get it right and be a better platform for it.