Hi All,

On Jan 8, 12:41 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> anselm wrote:
> > I do like the idea - but why make them different from plugins and add
> > another file structure to the system ? Plugins could choose to be
> > "closed" plugins, or "open" plugins ? Or plugins could have even select
> > which part of their API they decide to make public.

> Okay, i like this idea.  Actually it's very similar to my idea, except
> that i differ between plugins and extensions, and you differ between
> open and closed plugins.  When working with your approach, plugins
> would need to have a certain file or naming method that makes it clear
> wether they are open or closed.
> When working with my approach you don't need that, but you add another
> directory to the app structure.
> Your solution has the added benefit that plugins can have the workings
> of plugins+extensions at the same time, while in my case, this wouldn't
> be possible.I was in a hurry while i typed this :)
now that i've put a little more thought in it
-extensions can "work like plugins", they just directly integrate in
the app so you can call all the logic you want from them, you can use
the models, .. from a programming/scope side of view, it was af is the
code files were inside your app just like the others, so this gives
very much freedom.  (same goes for "open plugins" offcourse)
-plugins that want to "expose/inject their code into the app" might be
better off being built as extensions, when you want to expose your code
to the app you're suggesting a strong , deeply integrated connection
between the plugin and the app.  Plugins aren't meant for this.  they
are meant to be little applications working on their own, the main app
shouldn't have to implement, or inherit from the plugin.  However, if
you want to "improve" a plugin, i think you should be able to.
(without the need to alter the original plugin).  Inheritance seems
like a good way for this, i don't know if several plugins can inherit
from each other (i doubt it) (this also shouldn't be necessary, giving
the purpose of plugins (being "seperate apps"))  but there should be
some way in which you can create a new plugin, that "includes" another
plugin to inherit from it.  Though, this is another problem then the
one i described.  (however, having an "extensions" directory in a
plugins directory would be pretty neat too, if you can follow my
thoughts)

I wonder cake already does what is wanted. Has anyone considered or
tested using additional controller/view includ paths? It's a genuine
question, I don't know if it solves everything required here.

Here are a few group threads:
http://groups-beta.google.com/group/cake-php/search?group=cake-php&q=controllerPaths&qt_g=Search+this+group

If you can add a hook the paths for your extension/merge-in/plugin(but
not a plugin) to the app bootstrap file, such that you add to the
configure instances paths.....

Here's where paths get checked when looking for a controller:
http://api.cakephp.org/1.2/basics_8php-source.html#l00219

For a view file:
http://api.cakephp.org/1.2/view_8php-source.html#l00593

For a model file:
http://api.cakephp.org/1.2/basics_8php-source.html#l00159

For a component file:
http://api.cakephp.org/1.2/basics_8php-source.html#l00362

For a helper file:
http://api.cakephp.org/1.2/basics_8php-source.html#l00306

The only possible flaw in this logic (but it's the same for all
solutions), is that if you want to keep all your files in one place for
easy file management (and so you can say put this here, add this to
your bootstrap file), you still have to put the css and js files in the
webroot and remember to delete/update them should you remove/update
your extension. In 1.2 you can use cake to serve css and js files from
the vendors css/js folders - but atm there is no
vendorPaths/cssPaths/jsPaths/ vars (that I am aware of).

Comments?

HTH,

AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :) You may get your answer quicker by asking on
the IRC Channel (you can access it with just a browser
here:http://irc.cakephp.org).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to