What is the difference between a CompositionPoint and an ExtensionPoint?

asked 04 Jun '10, 06:47

BSalita's gravatar image

BSalita
276111417
accept rate: 22%

Can you mark my answer as correct (the checkmark) so I can have a karma of more than 1? :)

(13 Jun '10, 13:26) Scott Whitlock ♦♦

The difference relates to the fact that MEF can be used for both IoC (assembling your application out of known pars) and extensibility (assembling your application out of unknown parts). So CompositionPoints are for things that are provided by the framework or application, but could potentially be removed and replace by another module offering the same interface. ExtensionPoints are places where you can plug-in extensions.

In a practical sense, CompositionPoints use an MEF Import attribute (looking for exactly one instance) and ExtensionPoints use an MEF ImportMany attribute (looking for zero to many instances).

link

answered 04 Jun '10, 12:34

Scott%20Whitlock's gravatar image

Scott Whitlock ♦♦
696252833
accept rate: 52%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×1

Asked: 04 Jun '10, 06:47

Seen: 316 times

Last updated: 13 Jun '10, 13:26

Related questions

powered by OSQA