Hey guys, i've been thinking. I think we are missing something.
When we look at the possibilities of "extension" of cakePHP apps we have: -vendors: you can dump php classes here so you can create objects from them (actually i never used vendors so i don't really know). things you put in vendors generally are not made for cakephp so no models,controllers,.. here -plugins: mini apps that integrate into other apps, you can call their actions via requestaction, their models, controllers etc are their "own", although you can "import" them with the loadPluginModels() functions and the likes, plugins are meant to be separate apps, integrated into your main app. I think cake could use a 3rd option. Often you integrate into your app a component or a helper that you take from somewhere (the bakery for example), because you need to "inject" some functionality into your app. if it's only 1 or 2 files you can easily do that. But sometimes there are things that consists of maybe 10 files (models,controllers,components,helpers,views,...) an authentication system for example. I wouldn't want to make it a plugin because it is hard (to the degree that it becomes absurd, even) to fully separate auth logic from app logic. you could put it in a plugin, and use loadPlugin<xx>() functions so you get all the models, controllers in your app so you can use, or inherit from them. Considering the nature of "classes that integrate into your app" and not being a really seperate app Requestactions aren't needed and used here This would be sort of abusing the purpose of plugins, right?! But i do think we need a simple method to pack some classes, classes that will be in the "$path" of cake, so that it will read them every time a http request is made or only when necessary (lazy loading), just like it does for regular classes in your app. Basically this would be the same as just "injecting" all your files in all the right directories of cake, but with this method you can keep your files bundled, which gives all kinds of added benefits. I think the name plugin would be very suitabe for this (as this behaviour is even more "plug-in" then the plugins that we have now) but since that's already taken, we could call them "extensions" , "patches" or maybe even "injections" so your app would have a directory "extensions", just like it has plugins and vendors. and a directory you place in extensions would contain the normal layout (eg models,controllers, etc etc) what do you guys think? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
