I'm working on an application framework idea that I've had, and have ran into the following problem. My original (rough) design called for a monolithic core that provided the main functionality I was looking for, and would be extensible via plugins. I then realized, though, that my software would be much more flexible if I started out with a plugin framework, and made all functionality compartmentalized into plugins. That way if a user doesn't want some functionality, they don't need to install that plugin. The problem I'm running into is trying to figure out exactly how I am going to implement it. I've read a book on design patterns, and have done some good research on google, but it seems most of the documentation I'm finding is very basic (i.e. how to dynamically load a dll, and execute the code it contains.)
Here's where I'm at right now.
I can load a third party dll into my program and execute the code, but I can't quite figure out how to make it interact with dynamic data. Should I create large object that contain the data, and when the plugin is called, through an event of some sort, just pass in that object?
I'm also considering going through the MyPhpNuke code to see how they do it in PHP. Would this be helpful even though it's a interepreted language, and I'm using a compiled language (C#)?
I'm also looking at the option for doing all the extensions through a scripting language, but that seems to me to cause other problems. What I would really want is to have complex plugins that are encapsulated into a single dll. Distribution would be made via a zip file, which would contain the zip file, a SQL file ( containing any modifications to the database needed), a manifest file ( with version information ), documentation, and a xml config file that will hold any needed configuration settings.
Another option would be that I provide an interface to keep all configuration in a single place, which might be more elegant.
I've been reading through the RainbowPortal code to try to figure out exactly how they did it, but the fine points elude me. Does anyone know of any good documentation that can get me to the next step?
Thanks, Josh
This sounds kind of like a homework assignment. But, why not use an object model. If you are looking to make the data and the functions dynamic objects are the way to go, by encapsulating the functions and variables in the objects and thus allow them to be overridden. Even though I consider them over used. You could also use templating and the data formats are defined at run-time. Of course this costs you in processing. While you're making this modle don't forget the Linux world, you ought to give some thought to OS portability. Lastly, C# is an interpreted language. C is a compiled language. If C# was a compiled language then there would be no need for Mono on Linux, one could just build a C# compiler to be part of the gnu compiler family. Some might argue that C# is a compiled language because it cinverts the code to byte code, just like Java. But really you still need that byte code interpreter to run it. It may be a bit more optimized or compressed by this means making it more efficient than run-of-the-mill interpreted languages, but it's still interpreted. Ok, so maybe I'm a purist, but I don't see doctors calling aspirin a cure or a vaccine for headaches.
Brian Densmore
--- "Charles, Joshua Micah (UMKC-Student)" wrote:
I'm working on an application framework idea that I've had, and have ran into the following problem. My original (rough) design called for a monolithic core that provided the main functionality I was looking for, and would be extensible via plugins. I then realized, though, that my software would be much more flexible if I started out with a plugin framework, and made all functionality compartmentalized into plugins. That way if a user doesn't want some functionality, they don't need to install that plugin. The problem I'm running into is trying to figure out exactly how I am going to implement it. I've read a book on design patterns, and have done some good research on google, but it seems most of the documentation I'm finding is very basic (i.e. how to dynamically load a dll, and execute the code it contains.)
Here's where I'm at right now.
I can load a third party dll into my program and execute the code, but I can't quite figure out how to make it interact with dynamic data. Should I create large object that contain the data, and when the plugin is called, through an event of some sort, just pass in that object?
I'm also considering going through the MyPhpNuke code to see how they do it in PHP. Would this be helpful even though it's a interepreted language, and I'm using a compiled language (C#)?
I'm also looking at the option for doing all the extensions through a scripting language, but that seems to me to cause other problems. What I would really want is to have complex plugins that are encapsulated into a single dll. Distribution would be made via a zip file, which would contain the zip file, a SQL file ( containing any modifications to the database needed), a manifest file ( with version information ), documentation, and a xml config file that will hold any needed configuration settings.
Another option would be that I provide an interface to keep all configuration in a single place, which might be more elegant.
I've been reading through the RainbowPortal code to try to figure out exactly how they did it, but the fine points elude me. Does anyone know of any good documentation that can get me to the next step?
Thanks, Josh
__________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
You are over simplifying what C# and the Common Language Infrastructure (CLI) really is. Getting into the details of this could be an essay. If you are curious I recommend you read a bit more before taking what is written by "Jack" as fact.
Seriously, interpreted language? pfft. Big difference between python, perl, scheme, lisp, etc. and C#.
On Thu, 10 Mar 2005, Jack wrote:
Lastly, C# is an interpreted language. C is a compiled language. If C# was a compiled language then there would be no need for Mono on Linux, one could just build a C# compiler to be part of the gnu compiler family. Some might argue that C# is a compiled language because it cinverts the code to byte code, just like Java. But really you still need that byte code interpreter to run it. It may be a bit more optimized or compressed by this means making it more efficient than run-of-the-mill interpreted languages, but it's still interpreted. Ok, so maybe I'm a purist, but I don't see doctors calling aspirin a cure or a vaccine for headaches.
Brian Densmore
--- "Charles, Joshua Micah (UMKC-Student)" wrote:
I'm working on an application framework idea that I've had, and have ran into the following problem. My original (rough) design called for a monolithic core that provided the main functionality I was looking for, and would be extensible via plugins. I then realized, though, that my software would be much more flexible if I started out with a plugin framework, and made all functionality compartmentalized into plugins. That way if a user doesn't want some functionality, they don't need to install that plugin. The problem I'm running into is trying to figure out exactly how I am going to implement it. I've read a book on design patterns, and have done some good research on google, but it seems most of the documentation I'm finding is very basic (i.e. how to dynamically load a dll, and execute the code it contains.)
Here's where I'm at right now.
I can load a third party dll into my program and execute the code, but I can't quite figure out how to make it interact with dynamic data. Should I create large object that contain the data, and when the plugin is called, through an event of some sort, just pass in that object?
I'm also considering going through the MyPhpNuke code to see how they do it in PHP. Would this be helpful even though it's a interepreted language, and I'm using a compiled language (C#)?
I'm also looking at the option for doing all the extensions through a scripting language, but that seems to me to cause other problems. What I would really want is to have complex plugins that are encapsulated into a single dll. Distribution would be made via a zip file, which would contain the zip file, a SQL file ( containing any modifications to the database needed), a manifest file ( with version information ), documentation, and a xml config file that will hold any needed configuration settings.
Another option would be that I provide an interface to keep all configuration in a single place, which might be more elegant.
I've been reading through the RainbowPortal code to try to figure out exactly how they did it, but the fine points elude me. Does anyone know of any good documentation that can get me to the next step?
Thanks, Josh
Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ _______________________________________________ Kclug mailing list [email protected] http://kclug.org/mailman/listinfo/kclug
//========================================================\ || D. Hageman [email protected] || \========================================================//
D. Hageman wrote:
You are over simplifying what C# and the Common Language Infrastructure (CLI) really is. Getting into the details of this could be an essay. If you are curious I recommend you read a bit more before taking what is written by "Jack" as fact.
Seriously, interpreted language? pfft. Big difference between python, perl, scheme, lisp, etc. and C#.
Let's see:
rufus:/home/gerald$ find /usr/lib -name *.pyc | wc -l 1453
What's the difference between a pile of modules on my system that have been precompiled for Python's bytecode interpreter and a bunch of C# modules that have been precompiled for the .NET CLI (or a bunch of Java modules precompiled for the JVM?)
On Fri, 11 Mar 2005, Gerald Combs wrote:
D. Hageman wrote:
Seriously, interpreted language? pfft. Big difference between python, perl, scheme, lisp, etc. and C#.
Let's see:
rufus:/home/gerald$ find /usr/lib -name *.pyc | wc -l 1453
What's the difference between a pile of modules on my system that have been precompiled for Python's bytecode interpreter and a bunch of C# modules that have been precompiled for the .NET CLI (or a bunch of Java modules precompiled for the JVM?)
I would go for the fact that you can mix and match modules compiled for the CLI as opposed to sticking to one language (theoretically).
The precompiled python modules are just a intermediary step python uses to speed things up. They don't have to exist for python to be able to work. I can't comment more on them since I can't tell you what is exactly contained in each file.
I guess the main thing for me is that I can't sit down at any command line tool and iteratively interact with an interpretor writing C#. I can't send any a command line tool a single line of C# code and get back an evaluation. I suppose you could theoretically make one, but it would be very limited in its uses.
Seriously, I do not group C# into realm of interpreted languages. I would agree that the line is blurring now that we are starting to see the compilers for interpreted languages, but one can still use those interpreted languages as a simple tool to assist in quick shell tricks.
//========================================================\ || D. Hageman [email protected] || \========================================================//