On Tue, 9 Aug 2011 07:38:50 -0700 (PDT)
Massimo Di Pierro
<massimo.dipie...@gmail.com> wrote:

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

Interesting...

> 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. 

Thanks a lot for illustration.

> Typically components are more complex but are used and packaged in the same
> way.

Ahh...I believe I got it..There are "Component plugins' are plugins that define
components." and that makes difference between 'just plugin'. I'm anxious to
see new version of paper book to buy it asap!!

Web2py is so well-designed that I'm really impressed. ;)


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


Attachment: signature.asc
Description: PGP signature

Reply via email to