Wednesday, November 11, 2009

Building a package management framework

One of the open source projects I’m currently working on is PiXI which you can learn more about here.

The project is essentially a framework which allows plug-ins to be added using MEF and MAF loaded out of a few plug-in directories. So writing a new plug-in for the framework is incredibly easy (I think…), however pushing plug-ins to users is still a real pain.

The current process would be:

  1. Create a WiX installer for your plug-in which deploys everything into the appropriate directories.
  2. Upload the plug-in somewhere.
  3. User downloads the plug-in from somewhere
  4. User installs it via the installer (which normally contains prompts and isn’t a background operation).

This is less than idea, in both distribution and developer effort, so moving to a new model is a good idea. And since MEF is really kicking off now a framework to more easily facilitate this process wouldn’t go amiss.

I would like this to follow a more unix like approach using the idea of packages. This is all available in Linux on more recently on smart phones however windows is greatly lagging behind in this respect. My current thinking for this process is split into three main areas:

image

The NPackageManager suite is a combination of tools, API’s and applications to allow for some flexibility in this process.

  • BUILD – This is aimed towards plug-in developers who need an easy means of packaging and deploying plug-ins. Currently NPackageManager contains a command line tool to package up a solution together with a package definition, similar to many Linux repo systems.
  • INSTALL – This is targeted towards the target application which needs to consume the plug-ins. Target applications need an easy way to setup the ability to consume generated packages and register associations in the registry. For all intents and purposed discovery of new plug-ins is left to the actual technology employed, for example MEF will take care of the integration aspect.
  • UNINSTALL – Again targeted towards the target application, a simple API to uninstall from a list of installed plug-ins should be provided (not there yet). This means an application can expose the functionality to the user without having to hand crank the un-installation code which should normally be similar between projects.

I’ve made a start on this (basically enough to move my own project forward) and will be blogging about improvements to this as time goes on.

http://bitbucket.org/naeem.khedarun/npackagemanager/

No comments:

Post a Comment