Upgrading components without updating Chirpy

Dec 6, 2011 at 10:58 AM

Hi

I was wondering if it would be possible to update the version of one of the engines by simply placing the newer version of the dll in the same folder.

Assuming the interface hasn't changed Chirpy should be able to work with it. If it has changed (or it doesn't find a newer version) it could then fall back to the built in version.

Just from a conceptual point of view, Chirpy is ideal for this type of dynamic composition.

What are your thoughts?

Dec 7, 2011 at 3:55 PM

Here is a basic implementation of composing engines using MEF

https://github.com/jamesfoster/ChirpyMEF

As you can see from the example, you can override the built in implementation just by dropping the dotless dll into the same folder. You can even have one engine rely on another simply by [Import]ing the IEngineResolver.

All you need to do to create an external engine is reference ChirpyInterface, implement IChirpyEngine, decorate your class with the [Export] attribute and the [ChirpyEngineMetadata(...)] attribute passing in the name of the engine, a category and a default file extension. (the attributes of the metadata object are provided mainly for example)

With this setup you can extend existing engines and even add new engines without having to recompile Chirpy.

You will obviously want to expand the IChirpyEngine interface to allow all the behviour you need. You could even expose a method for each engine to supply its own configuration options and use that to build dynamic config pages? (I don't know, I've not done any VS plugin development before.)

Cheers

Developer
Dec 17, 2011 at 11:16 PM

Config page is create with xml file (Zippy.Addin).

Each tab is node SubCategory.

Dec 18, 2011 at 12:36 AM
Hi ploufs

Did you check out the project? What did you think?

Thanks
Developer
Dec 18, 2011 at 2:08 AM

Did you check out the project?

No

Check project probably next week.

This week task : Sass and scss support.

Developer
Dec 29, 2011 at 3:41 PM

Great work "tgmdbm'..

Suggest:

  •  Valid your code with styleCop
  • Add comment.