Re: Lookig for tutorials on how to build a plugin system

2011-05-03 Thread John M Bliss

Are you using a framework for your app?

On Tue, May 3, 2011 at 2:49 PM, Richard Beck richardb...@gmail.com wrote:


 I was wondering if anyone had any tutorials, sample code or links on how to
 build your own plugin system. I am looking to build an App and would like
 to
 make it extensible via plugins.

 I've search high and low and couldn't find anything.

 thanks


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344192
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Lookig for tutorials on how to build a plugin system

2011-05-03 Thread Richard Beck

Are you using a framework for your app?





No, I am not using a framework. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344194
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Lookig for tutorials on how to build a plugin system

2011-05-03 Thread John M Bliss

Hm.  Well, I'm not sure this is the easiest/best answer...but...you could
look at a popular framework/app, dig into the source code, and see how they
handle plugins.  Two that spring immediately to mind are:

http://cfwheels.org/plugins/
http://cfwheels.org/plugins/http://www.mangoblog.org/docs/plugins

On Tue, May 3, 2011 at 2:49 PM, Richard Beck richardb...@gmail.com wrote:


 Are you using a framework for your app?
 
 
 
 

 No, I am not using a framework.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344197
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Lookig for tutorials on how to build a plugin system

2011-05-03 Thread Richard Beck

Right, I've done some of that already. I was hoping to find a barebones 
tutorial so i wouldnt have to sift through other stuff.

Hm.  Well, I'm not sure this is the easiest/best answer...but...you could
look at a popular framework/app, dig into the source code, and see how they
handle plugins.  Two that spring immediately to mind are:

http://cfwheels.org/plugins/
http://cfwheels.org/plugins/http://www.mangoblog.org/docs/plugins



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344198
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Lookig for tutorials on how to build a plugin system

2011-05-03 Thread Russ Michaels

I have not seen any tutorials like that but I would take a look at Mangoblog
as a good example, this seems to be a very easy app to write plugins for.

One key thing is to use CFC's and make use of the EXTENDS attribute, this
allows any plugins to simply extend your core components.
Custom tags seem to have been dismissed by menu in favour of CFC's, but they
are still immensely useful, especially for outputting dynamic content.
One trick that I use is to use cfimport without a prefix then you can
create custom tags that will replace all occurrences of HTML tags.
e.g.

cfimport prefix= taglib=customtags

create a file called div.cfm in your taglibs folder

every time a div tag is encountered it will be replaced with your CFML :-)

I find this very extensible as you can use a different taglib on every page
so great for plugins.

Also make sure you make all your variables easily accessible, either by
putting then in application scope or via methods in a cached component.

just a few ideas


On Tue, May 3, 2011 at 8:59 PM, Richard Beck richardb...@gmail.com wrote:


 Right, I've done some of that already. I was hoping to find a barebones
 tutorial so i wouldnt have to sift through other stuff.

 Hm.  Well, I'm not sure this is the easiest/best answer...but...you could
 look at a popular framework/app, dig into the source code, and see how
 they
 handle plugins.  Two that spring immediately to mind are:
 
 http://cfwheels.org/plugins/
 http://cfwheels.org/plugins/http://www.mangoblog.org/docs/plugins
 
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344200
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm