Alex, once more let me clarify. I am not opposing your proposal. I am just saying that the proposal is vague because (as far as I understand you) what you ask can already be done. I just have never posted an example because I do not like it. The fact I do not like it does not mean I want to prevent you from doing it.
The only difference between what can be done and what you prose is in the location of the files. I say "web2py/applications/plugins" and you say "web2py/plugins". The location is a false issue that can be addressed after the issue described below is clarified. I encourage you to try develop web2py level plugins in the way I suggest and if you hit any stumbling block, please post your questions here and I will be happy to help. You will certainly hit ablock. The problem of how the apps should communicate to the web2py level plugin globals variables. This is a problem that would exist even if the web2py level plugins were located where you suggest. I can solve this problem using a convention (it would not need change web2py) but that may not be what you want. I need to see you build an example of such plugin and I need to see which conventions/APIs you propose solving this problem. I need to see what is that you cannot do that would require me to change web2py. Massimo On Mar 15, 6:47 am, Alex Fanjul <alex.fan...@gmail.com> wrote: > 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<gr...@delarue-berlin.de> wrote: > > >> On Mar 13, 4:25 pm, mdipierro<mdipie...@cs.depaul.edu> 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. > alex.fan...@gmail.comwww.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 web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.