Ok...I'm back with the final post about extension/plug-in loading in Silverlight. Well, at least I think it is the last as I have tried all obvious ways. I have previously showed how to it manually here and then how to do it "automatically" using MEF here. Both these have some upsides. The custom solution is tiny from a download perspective and offers a lot of control. MEF on the other hand automates a few pieces of the solution, still offering a lot of manual control. The download size does however grow a lot compared to the benefits gained. So, so far, I would say that the custom way is the winner. At least as long as the requirements are as simple as they are in this case...
This last post is all about doing it according to the Composite Application Guidance (CAG). CAG is a set of guidelines and patterns for building composite applications in WPF and Silverlight. The CAG is implemented by using the Composite Application Library or PRISM framework. CAG talks about how to do it, while CAL consists of assemblies helping the developer to actually do it. At least that is the way that I have understood it.
More...
In my previous post I wrote a demo application that used a custom implementation to load plug-ins from the server and place them in a shell. This implementation was very specific and limited in its functionality. It did however do what I needed for the simple task at hand. This post is all about how we can do the same thing using the Managed Extensibility Framework (MEF). MEF is of course a lot more flexible and powerful than my simple implementation, and then what I am about to use it for. But I will build the same application using MEF anyway, and show you how it works in comparison to the custom solution.
More...
Building an application based on discrete pieces (plug-ins) isn’t a new thing. It has been around for ages. Loads of applications support a plug-in model. So, obviously you can do the same using Silverlight. There are even a lot of different ways of doing it. They all have benefits and cool tricks up their sleeve, but they also come with bad things as well. I have decided to take a look at three of the more common ways of handling this whole thing. The first attempt I’m going to show is using the good old “I’ll do it myself” approach. I want to start out in this end, and then compare two other common approaches to the custom built one. This way I feel that you can thorough comparison.
The other two approaches I will show are Managed Extensibility Framework, commonly known as MEF, and Composite Application Guidance, also known as CAG or Prism. And to be honest, I don’t know if the third option should be CAG/Prism or CAL (Composite Application Library), but who cares. You know what I mean…
More...
15. February 2010
ZeroKoll
Silverlight
Silverlight 4 has now been out and about in beta for a couple of months and I still haven’t knuckled down and tried it out to any great extent. I have just been too busy at work with version 3. But I guess there is a time for everything, and now is the time for me to get started on version 4…
Silverlight introduces a heap of new and cool features. Everything from webcam support to more features when data binding and support for printing. This time however, I have decided to write about COM-interop.
More...
25. November 2009
ZeroKoll
Silverlight
As you might have noticed, Microsoft PDC ‘09 has “just” finished. Unfortunately, like with all other conferences, I didn’t get to attend. PDC did however give me a lot of good things. First of all, the most obvious, a new Silverlight beta. Silverlight 4 includes a lot of interesting stuff that will be really interesting to play around with. Among the interesting features to note is webcam support, COM integration, support for external devices, access to local files, support for showing HTML, RichText and lots more. Oh…yeah…they have also added a bit of commanding support… And a few nice Visual Studio enhancements for Silverlight, such as Intellisense for bindings…
Another cool thing about PDC was that even if I didn’t get to attend, I was still sort of there. I was involved in building three Silverlight applications for Microsoft. If you attended, or have looked at some of the videos from PDC, you might have seen one or two of them.
More...