Greetings,
When my data is updated in my sql server database there are a number of jobs
that my current process performs that analyzes the new data. This only
happens once a day very early in the am.
When I want to add a new job I have to add new code to the current process.
You probably know where I'm going with this but what I would like to happen
would be to store the "jobs" info in a table on the database and have my
process read that table to determine what jobs to perform when and where the
dll is that contains the code to execute the job.
I think I'm looking at a strategy type pattern here but I'm not sure how to
get around the references I would need to add to the project. Is this a job
for reflection? I've only read a little about it but I think it might be
able to help.
Any thoughts?
thanks
David Browne - 30 Nov 2006 17:24 GMT
> Greetings,
>
[quoted text clipped - 16 lines]
>
> Any thoughts?
Basic steps:
1)Define an interface that each of your plugins will implement.
2) Code your shell program to load a list of types given the assembly name
and type name.
3) For each loaded type,
-Create an instance of the type through reflection.
-Cast the instance to the interface type
-Operate the plugin through the interface
See
Let Users Add Functionality to Your .NET Applications with Macros and
Plug-Ins
http://msdn.microsoft.com/msdnmag/issues/03/10/Plug-Ins/default.aspx
Creating an Extensible Windows Service - Part 2: Plug-In Development
http://www.15seconds.com/issue/021015.htm
David
Jason - 30 Nov 2006 18:31 GMT
>> Greetings,
>>
[quoted text clipped - 39 lines]
>
> David
Awesome Thanks !!!!