Some plugins define components (plugin_wiki does) and some do not.

A component is a set of models/views/controller designed to work
together.
For example consider a web2py file "controllers/plugin_calculator.py"
which contains

def adder():
     form = SQLFORM.factory(Field('a','integer'),Field('b','integer'))
     c = (form.vars.a+form.vars.b) if form.accepts(request) else '...'
     return DIV(form,'result=',c)

The file is the plugin. The function is the component. It is a
component because anywhere in your app you can do:

{{=LOAD('plugin_calculator','adder',ajax=True)}}

and embed the component into any page. Typically components are more
complex but are used and packaged in the same way.


On Aug 9, 9:31 am, Gour-Gadadhara Dasa <g...@atmarama.net> wrote:
> On Tue, 9 Aug 2011 07:13:33 -0700 (PDT)
> Massimo Di Pierro
>
> <massimo.dipie...@gmail.com> wrote:
> > One web2py installation can contain many apps (what web2py calls an
> > app is what django calls a project) and different apps share nothing
> > by default. A reusable subset of a web2py app is what we call a web2py
> > plugin. (loosely speaking a web2py plugin is a Django reusable app).
>
> That's helpful. Thank you.
>
> > The difference is not just in the terminology. In one web2py instance
> > you can run as many apps as you like even if they contain different
> > conflicting version of the same modules. In Django you need distinct
> > projects, i.e.distinct instances.
>
> Heh, it seems that I've had good smell to choose one over another. :-)
>
> > Web2py plugins are less structured than Django reusable apps. It is a
> > relatively new concept and there is not many of them. i
>
> When we're on this topic...can we say that component is something like 
> (custom)
> content-type which can be put on the page and one can use several of such
> (content-type) blocks on one page?
>
> Some CMS-es are fond of inline-editing feature where one can move those blocks
> around, edit them etc. Personally, I do not find it is required to have it
>
> Sincerely,
> Gour
>
> > For example Django+Pinax is loosely equivalent to
> > web2py+plugin_wiki.
>
> I had expected lot from that project, but it looks it is not advancing very
> rapidly as it was planned. Pinax talk was long ago...
>
> Sincerely,
> Gour
>
> --
> “In the material world, conceptions of good and bad are
> all mental speculations…” (Sri Caitanya Mahaprabhu)
>
> http://atmarama.net| Hlapicina (Croatia) | GPG: 52B5C810
>
>  signature.asc
> < 1KViewDownload

Reply via email to