El 15/03/2010 10:40, mdipierro escribió:
I understand the argument. Each of the system have pros and cons.

If a plugin resides outside the app you have these problems:
1) app would not be portable because plugins would not be packages
with it
I heard this argument many times from you Massimo, but I don't agree with that at all, let me explain. If we are talking about plugins (real plugins) you should be able to plug and unplug them at anytime without too much modifications (apart from maybe som general configurations of the plugin). Tipically web applications (and even desktop ones) doesn't come with the plugins packed in it, ie. think of Eclipse IDE, Firefox, Magento, Wordpress, etc. All of them have the ability to share the base and install as many plugins as they require by some kind of "plugin panel" or so... In deed, that is the meaning of "plug-ins", isn't it?

Then, you should be able to download my core/basic application from my website, and install the latest compatible version of the plugins I used to make the app. There could be even required plugins -why not-. But you must to share the plugins to be portable (as you say) maybe we are not talking about plugins at all...(but components).
2) there would be problems if different apps require different
versions of the same plugins
Typically the plugins folders comes in the form of "plugin_name-1.2.x", maybe this way they wouldn't interference each other. Each app is an independet one, so it's responsability of the developer use the version he can/wants for each app and update them if he can/wants.
Anyway. You can do this already:

Create an app called plugins

     web2py/applications/plugins

Any other app can use the views and the static files of the plugins
installed under app plugins. Any other app can call services
implemented by actions of the plugins in app plugins. Any other app
can import modules defined by plugins in app plugins.

Some care must be taken in designing plugins designed to be shared
since there must be a mechanism for passing a request/response/session/
cache/T and databases to the plugin.

We do not have specifications for this. This is not a technical issues
(no more than is there were in fact a web2py/plugins folder instead of
a web2py/applications/plugins) but an issue about conventions. Feel
free to make a proposal in this respect.

Massimo

On Mar 15, 4:15 am, selecta<[email protected]>  wrote:
On Mar 13, 4:25 pm, mdipierro<[email protected]>  wrote:

If I understand you are asking for a web2py level plugin system vs an
app level plugin system. This has nothing to do with relocation of
plugins under an app subfolder. Am I correct?
Well maybe but consider the following

pseudo ls
/app1/.cvs
/app1/controller/.cvs
/app1/controller/plugin_useradmin.py

/app2/.cvs
/app2/controller/.cvs
/app2/controller/plugin_useradmin.py

now the plug-in useradmin is under version control of app1 and app2
this means that the plug-in is under two different version control
systems but if it would be like that

/app1/.cvs
/app1/plugins/useradmin/controller/.cvs
/app1/plugins/useradmin/controller/plugin_useradmin.py

/app2/.cvs
/app2/plugins/useradmin/controller/.cvs
/app2/plugins/useradmin/controller/plugin_useradmin.py

app1 and app2 could have seperate version control from the plug-in

I guess the problem could also be solved with at web2py level plugin
system but this solution would be easier to handle since I do not have
to mingle with setting things in the app so the plugin can use the
same db as the app etc.

--
Alejandro Fanjul Fdez.
[email protected]
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to