The power of plugins
Article posted by Joel Moss on 13 Nov 2008   |  
Since I discovered the DebugKit plugin for CakePHP that is currently in early development by Mark Story and others (including me. well, one commit still means I helped ;)), I have been left rocked about the power of plugins. I always thought that plugins were simply a way to create a Cake app that can be plugged in to an existing application. But It seems I underestimated their power. So I began to think about how I could refactor Migrations into a plugin, rather than a bunch of files that you drop into your vendors directory. And that took me all of 20 seconds! I didn't have to change a thing. Thanks to this latest commit, you can now use a shell script from any plugin. So I just drop the migrations directory directly into my plugins directory, and wham bam thank you maam! I created my first Cake plugin. Of course, I can still drop the migrations shells into my global vendors/shells directory, but I just like the way I can plug it in. So a plugin is now the recommended way to use Migrations.

This site contains the musings of Joel Moss, and is powered by Codaset pages; a simple, yet powerful way to host your static site. Just commit and push your site to your free Git repository at Codaset, and that's it!