We may be conceptualizing plugins differently, but I think they would
need views for layout as well as supporting resource files (js,
images, css).  I am imagining plugins as things like commments, openID
login, menus, wikis, etc... It sounds like the current design is going
forward so I won't worry much more on it. Massimo's designs in the
rest of the framework have been very good thus far so I will err on
the side of confidence. Besides, thanks to the current design it is
easy enough to write my own plugin system if it doesn't work how I
need it to :)


On Oct 22, 3:10 pm, Yarko Tymciurak <resultsinsoftw...@gmail.com>
wrote:
> Or what about one plugin file, where each plugin is a class - perhaps one
> for controller, one for model - no views allowed (only app or gluon
> facilities; could worry about separate view plugins as that is different
> enough)....
>
> On Thu, Oct 22, 2009 at 2:58 PM, mr.freeze <nat...@freezable.com> wrote:
>
> > I see how it would be a performance hit to enumerate all of the files
> > in those folders.  What about a compromise where all plugins live in
> > one subfolder so we get the separation. Thinking out loud:
>
> > applications
> > --myapp
> > ----plugins
> > ------models
> > --------plugin1.py
> > --------plugin2.py
> > ------views
> > --------plugin1_index.html
> > --------plugin2_index.html
> > ------controllers
> > --------plugin1.py
> > --------plugin2.py
> > etc...
>
> > Do you think plugins should be accessible by URL outside of their
> > parent app or just take parameters and render html? Also, is/should
> > there be a mechanism to apply auth to a plugin?
>
> > On Oct 22, 1:48 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> > > One issue is models:
>
> > > Let's say we have a normal model
> > >    models/db.py
> > > and two plugin models in
> > >    plugins/p1/models/a.py
> > >    plugins/p1/models/x.py
> > >    plugins/p2/models/e.py
>
> > > In which order should they be executed? whatever order we use we would
> > > have to merge the results of multiple listdir and then sort them.
> > > Takes some extra time. Now that everything is one folder things are
> > > straightforward.
>
> > > Another issue is controllers? What would be the url for a function
> > > index in the controller below?
>
> > >    plugins/p3/controllers/default.py
>
> > > Mind that we cannot break backward compatibility!
>
> > > Massimo
>
> > > On Oct 22, 1:38 pm, "mr.freeze" <nat...@freezable.com> wrote:
>
> > > > That's not as limiting as I thought at least.  Did you already try the
> > > > sub-app approach and hit obstacles or is it something that might be
> > > > worth prototyping so we can compare performance/benefits/drawbacks?
>
> > > > On Oct 21, 7:20 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > > Yes you would be limited to one model file, one controller file but
> > as
> > > > > many views as you have actions and as many modules and static files
> > as
> > > > > you need.
>
> > > > > On Oct 21, 6:08 pm, "mr.freeze" <nat...@freezable.com> wrote:
>
> > > > > > Man oh man! I've been at a SharePoint conference all day (hey, I
> > have
> > > > > > to make money!) so I'm still sifting through all of the discussion
> > but
> > > > > > I have another question: With the current implementation plugins
> > would
> > > > > > be limited to one view, one controller, one model, etc., because of
> > > > > > the naming convention, correct? If so, do you think this will be
> > too
> > > > > > constraining?
>
> > > > > > On Oct 21, 11:39 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > > > > Physically plugins are not in the own folder because it would
> > make
> > > > > > > web2py very clunky, it would have to search for plugins in the
> > folder
> > > > > > > structure.
>
> > > > > > > Logically the are listed as separate.
>
> > > > > > > On Oct 21, 11:16 am, "mr.freeze" <nat...@freezable.com> wrote:
>
> > > > > > > > I like how the plugin system is shaping up but have one
> > question about
> > > > > > > > the folder structure. It seems more manageable to structure it
> > like
> > > > > > > > this:
>
> > > > > > > > applications
> > > > > > > > -- my app
> > > > > > > > ---- models
> > > > > > > > ---- views
> > > > > > > > ---- controllers
> > > > > > > > ---- plugins
> > > > > > > > ------ myplugin
> > > > > > > > -------- models
> > > > > > > > -------- views
> > > > > > > > -------- controllers
>
> > > > > > > > This way a plugin would basically be a sub-app, making it
> > easier to
> > > > > > > > install/uninstall/upgrade and could also have multiple
> > models/views/
> > > > > > > > controllers.  I remember some discussion about it but can't
> > remember
> > > > > > > > what the reasons against it were.
>
> > > > > > > > On Oct 21, 10:18 am, mdipierro <mdipie...@cs.depaul.edu>
> > wrote:
>
> > > > > > > > > The new web2py in trunk (1.68.2) also contains an improved
> > > > > > > > > experimental solution for plugins.
> > > > > > > > > Here is a new video about it
>
> > > > > > > > >http://www.vimeo.com/7182692
>
> > > > > > > > > It includes suggestions from various people but I am sure it
> > still
> > > > > > > > > needs a lot of work. Anyway, give it a try and let us know
> > what else
> > > > > > > > > would you expect from a plugin system.
>
> > > > > > > > > The interface for uploading/downloading plugins is missing,
> > among
> > > > > > > > > other things.
>
> > > > > > > > > Massimo- Hide quoted text -
>
> > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -
>
>
--~--~---------~--~----~------------~-------~--~----~
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