01-14-2008 02:44 PM
by ACTwiz on 12-11-2007 12:48 AM
The Missing Link :
I have been developing with the APFW SDK for a few months now and there is something that missing that I think we as developers should be able to come to an agreement on. There is no way to tell a plug-in to load or not to load for a specific DB. The scenarios for APFW plug-ins is quite different from the Act for Windows scenarios, where you install a plug-in and expect it to be there all the time. But in APFW, a single APFW server could have many databases on it, especially in a hosting environment. You may not, or your customers may not want a plug-in loading in every database that is on that APFW server. Sure we each could develop our own ways of setting this up, but I think we need a unified configuration that would be used just for this purpose( to load or not to Load), not to store you applications preferences, etc
So what I propose is pretty simple. Let us take a page from the APFW developers and this should be pretty easy. APFW uses a XML file to tell the APFW websites which databases to list in which Virtual Directory etc. This format is perfect for what we need. So I propose a slightly different Node name but the meat is the same. See Attached for an example. So when your APFW plug-ins “Init” method gets called is should check this XML file first before it does anything else, if your plug-in is not configured for that database then don’t load. The Xml File should be located in the Dir “C:\Program Files\ACT\Act for Web\APFW\Plugins“. We all use the same XML file.
Why should we be unified?
By agreeing on a standard we help the community of ACCs know how to configure APFW plug-ins and this makes their lives easier and hopefully the clients happier. I also think that if you plan on developing a APFW plug-in and expect any of the ACT! Hosting companies out there to actually install your plug-ins, you are going to have to provide a method to turn your plug-in off on a Database-by-Database level. I know that someone out there will only want certain users to have the plug in and that’s a legit concern and request, but let us see if we can get this first step accomplished and then we can work up to that level of configuration, if it is really needed.
So In order to hopefully get all ACT SDK developers out there to participate in this proposed standard, I am willing to give you the code to make all this work, Attached is kind of the wrapper that would go around your APFW plug-in. I know my code is not perfect but its working, and it probably could use a tweak or two, but that’s where we all come together and we make this code the best it can be and we all benefit from it. I choose not to implement a serialized class since that would have been more code and more over head than the simple read XML methods.
So what do you think, I look forward to your thoughts.
01-14-2008 02:45 PM
by dswisstack on 12-19-2007 2:31 PM
I'd first like to thank you for the post above. It was very well written and your ideas are concise and well thought out.
We have discussed the concept of enabling/disabling plugins based on a database and we agree that it should be added to the model. We also agree with your concept of basing it on an XML configuration file.
Your request will more than likely be included in our 11.0 release (no promises) but will be varied slightly from how you have designed it. We will embrace your concepts and features but we will probably add a little bit of control for managing it better and maybe the location of the XML information.
Thanks again for your AWESOME post! It is very encouraging to see people like you telling us what you want and then going a step further and designing it. Keep up the great work!
Dustin Swisstack - ACT! Premium for Web, Lead Developer
01-14-2008 02:46 PM