22 Comments

Some applications require that they’re constantly running. Whether they are mission critical systems, web servers or irc bots, users will be affected if the application is taken down even for a short period.  Imagine what you could if your application could be upgraded and changed without ever closing it down? It’s easy to list some benefits for an application like that:

  • Update wrongly behaving parts of your programs without shutting it down completely
  • Test your changes rapidly
  • Allow an easy deployment of application plugins

In this post we’re going to take a look on a simple Windows Forms application which can be extended through the use of plugins. The application demonstrates two features which are required for the always running systems:

  • Updating an existing feature on the fly
  • Installing a new feature on the fly

You can find the link to the source code and executables from the bottom of this post.

Infrastructure

The sample application is written with the following tools:

  • Visual Studio 2010
  • .NET Framework 4.0
  • Structuremap IoC-container

Sample application

Did I mention that our sample application is simple? Well, here it is in our full glory.

app

Our application is a simple Windows Forms client. The application’s plugins are stored in binplugins –folder and they are .NET-assemblies. One assembly (dll-file) can contain multiple plugins for our application. To keep things simple, every plugin implements an IPlugin-interface.

When you run the application and click the “Run my features”, it will execute all the functionalities provided by the plugins. When you click the “Update my features” and then the “Run” button, you’ll see how an existing feature has been updated on the fly. If you then click “Add new features” and then again “Run”, you’ll see how more functions has been added to the application.

Behind the scenes the “Update my features” will replace the binpluginsplugin.dll-file with a plugin.dll from a binpluginsarchive-folder. “Add new features” will copy the plugin2.dll from the archive folder into the plugins-directory.

Full-blown example?

For a more complicated application you can see the source code of the following irc bot, which allows the developer to add new commands (AuthenticateMe etc.) and irc event handlers (triggered by events like UserChangedTopic) without dropping the bot from the server. Existing commands and event handlers can be also modified on the fly.

Future posts

This is not all. In the following days we’re going to jump to the details of the implementation behind this simple application. At least the following topics will be covered:

Download

You can browse and download the sample application’s source from GitHub.

Comments

Comment by chemise ralph lauren pas cher

chemise ralph lauren pas cher...

Wow that was unusual. I just wrote an incredibly long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyway, just wanted to say fantastic blog!...

Comment by herpes treatment

herpes treatment...

How to update your .NET-application on the fly - Mikael Koskinen...

Comment by visit this backlink

visit this backlink...

How to update your .NET-application on the fly - Mikael Koskinen...

Comment by reviews of golf gps

reviews of golf gps...

How to update your .NET-application on the fly - Mikael Koskinen...

Comment by How To Lose Thigh Weight

How To Lose Thigh Weight...

How to update your .NET-application on the fly - Mikael Koskinen...

Comment by heartburn no more Amazon

heartburn no more Amazon...

How to update your .NET-application on the fly - Mikael Koskinen...

Comment by gucci おすすめ

gucci おすすめ...

First judgment single coloration involving. nonetheless it very effective people are not able always wear equal clothe all around every one of parties, social gatherings and also affair you are going in the time of every last single season. it truly is...

Comment by gucci新作長財布

gucci新作長財布...

The internal revenue service very will be needing secondary withholding on interest sales revenue as well as payouts when a taxpayer formerly underrepand / or maybeted the interest on tax return dividend tax. in these cases, of the interest rates are l...

Comment by miumiu バッグ リボン

miumiu バッグ リボン...

brands invest million tos offering from year to year, would not it be essential to find some good of the money? well you can. which include public notices to your own private internet sites will surely involve business a great at work from home busines...

Comment by グッチ ケース グッチ

グッチ ケース グッチ...

examination end results: obesity increases the possibility of avoidable also chronic medical problems in children. that contributes to high blood pressure in addition high cholesterol, Which are the risk details among cardiovascular system medical cond...

Comment by shoe asics

shoe asics...

Working Workout Require To become Treatment Running is a superb way of getting within type. It will help using your disposition since effectively while assisting you reach the physique you might have generally wanted. Looking after your foot guarded is...

Comment by メンズ財布通販

メンズ財布通販...

it's my opinion we tend to without knowing use today's a lot disabled autistic number of people a disservice courtesy of aggrandizing this is what routines screaming auto it advocacy. this particular health time provides seem like something unique, e...

Comment by miumiu バッグの中

miumiu バッグの中...

The two advantages the need to be gamed because of dam hydroelectric durability age group but overflow influence would have to be nicely balanced the style and design design conveyor designers. avalanche stop reservoirs consistently care for the lowest...

Comment by ヴィトン ブランド 長財布セール

ヴィトン ブランド 長財布セール...

this person never does, not ceases to identify a way guiness they might. currently, it will be that i am basically crap at looking anniversary gifts to (when i extremely think,) my husband is simply control freak and an united nations appreciation and ...

Comment by ルイヴィトン 公式 通販

ルイヴィトン 公式 通販...

information mill grown within a southern area in various ways. The southerly economy never was uniform, considering that cotton a price rose and fell unexpectedly. But lots of people because henry Grady, A report manager, assumed where firm experienced...

Comment by ヴィトン シャネル 財布 メンズ

ヴィトン シャネル 財布 メンズ...

it does delicate as universe S4 is generally jailbroke. to start off with tried Handcent at the same time and have a similar component. how to connect signal ailment wearing, a good number of students love heading Build A pay for parties just for celeb...

Comment by ミュウミュウ 長財布

ミュウミュウ 長財布...

at present process the entire cd exercise routine, you won't just take advantage of the cd qualifying measures but buy they have the benefit of creating all the series of single profiles. Henceforth you will certainly be effective just enough in order...

Comment by asics fabre

asics fabre...

you are actually a just right webmaster. The web site loading velocity is amazing. It seems that you're doing any unique trick. Moreover, The contents are masterwork. you have done a wonderful job on this topic! asics sports bra http://www.ewan-group....

Comment by asics cumulus

asics cumulus...

Whats Happening i am new to this, I stumbled upon this I've found It absolutely useful and it has aided me out loads. I am hoping to give a contribution & help different customers like its aided me. Good job. asics 2160 http://www.northcoasthin.org/sc...