<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Intrepid Blog &#187; plugin</title>
	<atom:link href="http://blog.affien.com/archives/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.affien.com</link>
	<description>A few thoughts</description>
	<lastBuildDate>Mon, 01 Mar 2010 00:58:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Developing plugin-based applications</title>
		<link>http://blog.affien.com/archives/2004/12/21/developing-plugin-based-applications/</link>
		<comments>http://blog.affien.com/archives/2004/12/21/developing-plugin-based-applications/#comments</comments>
		<pubDate>Tue, 21 Dec 2004 20:40:40 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2004/12/21/developing-plugin-based-applications/</guid>
		<description><![CDATA[When you want to write an application, whether this is a website, or a database manager which is based on plugin provided functionality you should remember two things when programming:

Can I change this behaviour easily with another plugin? You want to be able to edit a menu item for instance.
Do I want to be able [...]]]></description>
			<content:encoded><![CDATA[<p>When you want to write an application, whether this is a website, or a database manager which is based on plugin provided functionality you should remember two things when programming:</p>
<ul>
<li><strong>Can I change this behaviour easily with another plugin?</strong> You want to be able to edit a menu item for instance.</li>
<li><strong>Do I want to be able to change this with another plugin?</strong> You don&#8217;t want a plugin to edit a menu item if it is meant to only be a simple format interpreter.</li>
</ul>
<p>Basicly there are 2 big groups of plugin based applications, the static and dynamic. Where the static plugins are the easiest to program and most commonly used. An example would be a plugin which would load and save an image from and to a &#8216;.jpg&#8217;. These plugins usualy contain one function (gateway) which exposes a few plugins which usualy expose a static interface.</p>
<p>On the other side there are the over-dynamic plugins, which rather should be called &#8216;modules&#8217;. These applications would use a high level slow &#8216;message&#8217; system where basicly everything is able to be intercepted, hooked up to, responded to&#8230;</p>
<p>Deciding what and how you want base behaviour to be able to be extended, edited or removed by plugins is the hardest part of developing a plugin based application. If everything should be able to be changed you get stuck with complicated code, and a lot of overhead due to extra &#8216;hookable&#8217; calls. If almost nothing is overridable you problably get stuck with worthless plugins.</p>
<p>While developing a plugin extendable application it is very helpfull to put the base code in several plugins themselves, which prevents a lot of mistakes.</p>
<p>I&#8217;ve found python and c# to be very capable languages to write plugins, although C# is a bit more trouble than Python, Python allows you to do too much and just call functions without knowing for sure with what object you are handling.</p>
<p>I&#8217;ve been working on a modular server (see <a href="http://blog.w-nz.com/archives/2004/12/11/modular-server/">the modular server article</a> I&#8217;ve posted), programmed in C#.</p>
<p>The base of the server is nothing more than a framework for loading / unloading libraries &#038; plugins, managing configuration files, and hosting &#8217;server&#8217; plugin instances. Every server plugin itself can load plugins (like for instance a custom authentication handler for a HTTP server). I&#8217;ve noticed that having a very dynamic configuration storage is very usefull for every instance of a plugin requires its own configurations and usualy its own plugins to be loaded. I&#8217;m currently using multiple tree based files which are merged at runtime, which I&#8217;ll replace with a concept format called XTL about which I&#8217;ll tell more lateron.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2004/12/21/developing-plugin-based-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
