One of the features that people really love about Umbraco is
just how extensible it is, you can create your own applications
(back office sections), data types, macros, you name it. But there
is one thing that Umbraco 4 has suffered from, and that is a lack
of best-practice around how we provide extensions to other
developers.
For example if you're creating a custom DataType where do you
put it? Well the DLL will go into the ~/bin folder, but if you have
a user control (ASCX), CSS files, etc where do they go?
Also, if you're putting every extension into the ~/bin folder it
can become quite large quite quickly.
This has been a source of confusion among Umbraco developers and
something that we want to address in Umbraco 5.
Introducing the Managed Extensibility Framework (MEF)
Shannon has already done a good blog about MEF and
how we're looking to use it for controllers in Umbraco 5, and
currently MEF is going to be playing a big roll in how we go about
producing a plugin engine.
If you're not familiar with MEF it's a framework which
Microsoft added to .NET 4 (but was available earlier previews of
MEF supported .NET 3.5, but that's beyond the scope of this blog)
and it's a way which you can create applications which are of a
pluggable nature. In fact MEF is actually quite widely used,
Windows Live Writer (which I'm writing this in) uses MEF to create
extensions, and Visual Studio 2010 uses MEF for plugins. So
naturally this seems like a logical way to go with Umbraco 5 and a
plugin model.
What we're currently thinking
Here's what we're currently thinking with regards to how we can
use MEF to make extensibility easier for Umbraco. Imagine if you
will the following structure in your Umbraco 5 install:
- Plugins
-
- DataTypes
-
- MyCustomDataType.dll
- uComponents.DataTypes.dll
- Trees
-
The idea behind this is we'll break down the plugin components
into logical blocks, separate folders for DataTypes, Trees, etc.
This allows a much quicker view of your file system and what is
where. For example I will know that if I want to
find my DataTypes they are all in the ~/Plugins/DataTypes
folder.
We want YOU
Obviously at the moment we're far from a final set decision on
how this will look in the final shipped version of Umbraco 5 and
most of us on the core are not extensive package developers so
we're really looking for feedback on this.
As I said extensibility is a very important part of Umbraco and
we want to make everything easier for developers so if you have
some thoughts please let us know.
PS: This blog is more about the design of the Umbraco 5
plugin model, not the implementation (other than we're looking at
MEF for this). Technical implementation (i.e. - how to code it) is
a topic for another day ;)