On Thu, Oct 1, 2009 at 12:07 PM, mdipierro <mdipie...@cs.depaul.edu> wrote:

>
> I have thought about that but:
> - having a plugin folder means web2py would have to look for models in
> multiple places. It could me mimicked in admin (the developers should
> not see the plugin_* files under the [design] page but user a reparate
> plugin page where model/views/controllers/etc are organized by name.
>

I think that is a trivial implementation detail - the important thing is
which structure makes more sense;  "special naming" is brittle, and 35+
years experience makes me whince (albeit mildly in this case) against it.
I think this needs more thinking, more reason than "oh - I would have to
change web2py code!" .... ;-)


> - Why change the programming model and use a class?
>

In a word:  encapsulation and structure.  All the reason in the world.
Everyplace people ask the same questions over and over (discounting for the
moment those new web2py-ers who are not programming professionals) is
because of a structural reason.

Yarko


>
> Massimo
>
>
> 2) having plugins like a class
>
> On Oct 1, 11:41 am, Yarko Tymciurak <yark...@gmail.com> wrote:
> > I generally like the concept, but am uncomfortable with the structure (or
> > lack of) of the plugin.
> >
> > For example -  plugin_comment I would prefer to see as in a directory -
> so
> > that distribution and installation would be simpler (as well as coding).
> > The naming convention (while good, quick for proof of concept) I would
> like
> > to see more thought on.  I would prefer to see an application folder
> > "plugins" with all the requisite folders - models, controllers, etc. -
> where
> > you could install "comments" and "rankings" etc. (for example).   It
> might
> > be interesting to have site-wide (e.g. accross applications)  plugins,
> where
> > if your plugin is not found in the app area, then it is looked for in the
> > global area (so, perhaps there would be a web2py/applications folder, and
> a
> > parallel  web2py/components folder).
> >
> > From a programming perspective, I would prefer to see this managed as
> > classes, so for example I would have a new comments class which is a
> Plugin
> > (or Component - I actually like that term better), but I haven't thought
> > through this completely.  This would probably change all sorts of things,
> > perhaps even encapsulating the models and controllers (but that may be a
> bit
> > much).
> >
> > In any case, this is a nice start, and I would like to think about it
> some
> > more.  Perhaps we should have an alpha version, and collect experiences
> for
> > a while.
> >
> > - Yarko
> >
> > On Thu, Oct 1, 2009 at 10:53 AM, Pynthon <omar.webs...@gmail.com> wrote:
> > > I think the proposed system is minimally disruptive, programmers do
> > > not need to know anything about AJAX/JSON
> >
> > > That sounds very good. I watched the video and it looks very good!
> >
> > > 2009/10/1 mdipierro <mdipie...@cs.depaul.edu>
> >
> > >> I just mean that if we want plugin components to return JSON instead
> > >> of using the proposed mechanism, than people programming plugins would
> > >> not be able to return a dict() and have it rendered by a view as they
> > >> are used to, we would have to create a new programming paradigm and
> > >> new functions (API) to deal with it.
> >
> > >> I think the proposed system is minimally disruptive, programmers do
> > >> not need to know anything about AJAX/JSON and I should be able to
> > >> handle it with a single new chapter in the book. ;-)
> >
> > >> Massimo
> >
> > >> On Oct 1, 10:03 am, Pynthon Pynthon <forumx...@gmail.com> wrote:
> > >> > Maybe I did not understand the word API but that means you need to
> > >> rebuild
> > >> > everything? Or do you mean a new json API?
> >
> > >> > Sorry :$.
> >
> > >> > 2009/10/1 mdipierro <mdipie...@cs.depaul.edu>
> >
> > >> > > One rarely needs to return metadata (js/flash) with response and
> with
> > >> > > the proposed mechanism one would not need any special API to
> create a
> > >> > > plugin. If using json the response would have to be encoded in
> json
> > >> > > and this would require new api.
> >
> > >> > > On Oct 1, 9:25 am, AndrewLoot <andrew.luetg...@gmail.com> wrote:
> > >> > > > Whats the benefit of using headers for inter-component
> communication
> > >> > > > why not pass a json object in with the response?
> >
> > > --
> > > Please visit my blog pynthon.naar.info
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to