Monday, December 28, 2009

Coding plugin support into your app, because coding is for fun!

Coding4Fun - Creating An Application With Full Plug-in Support

“In this article, you’ll learn how to create an application with full plug-in support.

Arian T. Kulp www.ariankulp.com

Project site: http://utilrunner.codeplex.com/
Code It:
Downloads
Run It: Downloads

Difficulty: Intermediate
Time Required: 3 hours
Cost: Free!
Software Needed: Visual C# 2008 Express Edition or higher

Introduction

It’s been a number of months since I released the first version of my Utility Runner application. Utility Runner makes it possible to run system utilities with as little overhead as possible: Instead of lots of tray icons, numerous EXE’s, and the associated memory and startup time overhead, this application manages multiple utilities from one place.

To open this solution, you’ll need Visual Studio 2008 Express Edition (Visual C# or Visual Basic), at least. If you don’t have it yet, you should get it!

Working with MEF

Little has changed functionally from the last version of the application, beyond some refactoring that’s taken place since the new version of MEF was released. For one thing, the attribute for marking an export is no longer sealed, so you can now create a subclassed attribute that encompasses the export name and any other metadata included with it. Consumers can simply use your new custom attribute for a stronger-typed experience. In my case, I created a WpfServiceMetadata class. Read on for more information.

Managing Addins

My big challenge was figuring out how to implement an addin manager to support multiple utility addins, like in Firefox. …

image

…”

Why add plug-in capability into your apps? Well, um… duh? How many apps, programs and/or devices do you use because you can extend or add functionality to it? Yeah, like all of them (or so you probably wish ;)

So it’s time for you to really start thinking about YOUR app’s and how easy you or your users can extend them. This article may very well help you in this endeavor…

2 comments:

Anonymous said...

image link is broken
( href contains a closing "]" )

Greg said...

Good catch... thanks