Doggetto.com

March 5, 2010

Faux-WordPress Plugin Note II

Filed under: Personal,symfony Framework,Technology — NoCoolName_Tom @ 2:02 pm

Okay, I think I’ve got the repository nonsense worked out.

Feel free to checkout or browse the code at:
https://svn.xp-dev.com/svn/tpdFauxWPPlugin/trunk/

As I said, I’m still working on this, so be careful: the code might not actually be working all the time. Feel free to read the logs for more info, I try to at least type something when I commit.

For those who are interested in how to convert your project into a plugin, it’s actually quite simple. A plugin is like a little mini-application: it holds a lib directory for filters, forms, and models; it holds a modules directory for modules (these have to be explicitly activated in each application); and it can hold other directories like web and config. Each of these directories functions the same as in a full application. One nice thing a lot of plugin developers will do is to add a third layer of inheritance above the plugin model classes so that future developers can extend the plugin without having to muck about inside of the plugin code (You might have seen this if you’ve played around with sfGuard: the normal model classes are all empty and extend the Plugin classes which extend the base classes).

Anyways, gather all of that together, and you have the directory structure of a plugin, ready to be used in Symfony. As for the actually business of packaging I’ll have to leave that for later. It can be very simple, but to pull off some really cool things requires a bit of work.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress