make much more sense, just to say in my word web2py is a house that may have
many windows and each window can be packaged into smaller components like
window glass, lock and frame etc?

On Tue, Aug 9, 2011 at 10:52 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> It is ok and I understand the confusion.
>
> web2py is an application from the point of view of a developer. It
> serves the purpose of developing web applications and it is required
> for those we applications to run. Yet web2py is not an application
> from the point of view of the end user.
>
> The end user may see a Blog, a CMS, an E-Store, etc. If they are
> written with web2py we call them "apps".
>
> One web2py can run many "apps" (which you can think of as many we
> sites). They are all distinct they just share one web server and a
> common set of libraries. There is only one web2.py but many
> index.html.
>
> All the apps are equivalent in the sense that the are distinct and
> none of them is privileged.
>
> Some times two apps (for example a Blog and CMS) may need to share
> some functionality that is not provided by the web2py libraries (for
> example a something that allows users to comment on a Blog entry or a
> CMS entry). This thing would be a component. Because apps are
> separated, a component is something that you write once and "copy"
> into multiple apps. It is a piece of code designed to be re-usable but
> not shared. Each app must have its own copy of the component so that
> you can customize it. Different apps may ship with different versions
> of the component and they should not conflict.
>
> A plugin is a subset of an "app". It could be the files which define a
> component. It could be the files with define the layout of pages. It
> could be the files which defined the database tables. Any subset of an
> app is a plugin. This concept allows you to packages the subset and
> ship it separately from an app.
>
> Here is a practical example:
>
> - This is one web2py (one web server, one python running)
>  http://web2py.com/demo_admin/default/site
> - It runs three apps:
>  http://web2py.com/demo_app1/default/index
>  http://web2py.com/demo_app2/default/index
>  http://web2py.com/demo_app3/default/index
> - Here are two plugins demo_app1
>  http://web2py.com//demo_admin/default/design/demo_app1#plugins
>
> I hope this makes some sense.
>
> Massimo
>
>
>
>
>
>
>
>
>
>
> On Aug 9, 10:31 am, Furqan Rauf <sfar.fur...@gmail.com> wrote:
> > just following this conversation, is it normal for a newb, to not
> understand
> > what are you guys talking about? and to my understanding you are saying
> that
> > web2py is an app itself and all we do create different components and
> deploy
> > it. and we assign one component as primary or how does this work i mean
> lets
> > say i created a web application that is using that calculator so I will
> just
> > install that plugin in my web2py and which ever view I want to use i will
> > use that load command?
> >
> > I am sorry for sounding stupid.
> >
> > thanks
> >
> > On Tue, Aug 9, 2011 at 9:56 AM, Gour-Gadadhara Dasa <g...@atmarama.net
> >wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > 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
> >
> > --
> > *-Furqan Rauf*
> > *Do you love your creator? Love your fellow-beings first. -Prophet
> Muhammad
> > *
> > *http://www.amway.com/furqanrauf*




-- 
*-Furqan Rauf*
*Do you love your creator? Love your fellow-beings first. -Prophet Muhammad
*
*http://www.amway.com/furqanrauf*

Reply via email to