Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

CMS Connector

edited May 2008 in Vanilla 1.0 Help
This is something I've been thinking about for a while. The persistent interest in integrating Vanilla with Wordpress or Drupal or eugen's Video CMS makes me think it would be nice to have a set of extensions that do nothing by themselves, but help other extensions to fetch data from a CMS. I kind of tried to do this when I wrote Janine by breaking the Wordpress-specific code out to its own class, and making it abstract enough to accommodate a Drupal/MediaWiki/whatever class without breaking the rest of the code. But packaging all those classes together would suck; any time one of those classes was updated, everyone would have to download a new Janine package. And anyone else writing a different Wordpress-specific extension would have to include their own interface class (redundant code, yuck).

Much better would be a "Wordpress Connector" extension with its own object that any other extension could create. Now everybody's Wordpress-specific code goes in one place (easier debugging) and it's only loosely coupled with extensions that actually do stuff (easier updating when Wordpress monkey-dicks with their table names again). Want to integrate with something else? Write a "Drupal Connector". Or a "MediaWiki Connector". Whatever. Even better, if they all agree to expose a few identical methods you now have a CMS "abstraction layer". I could sure as hell use that for Janine 2: Electric Boogaloo and I'm sure some other clever soul could think of other uses as well.

So, what do we think? I know how something like this could be written but I'm hoping for some design suggestions. Would other extension authors find this useful, and if so what features would you want to see?


  • Options
    I think what needs to be done in Vanilla is a script that can return output of various Controls in XML or something. It would then be a task of creating an extension/plugin/module for the CMS to retrieve the XML and output it. Being able to instantiate any Vanilla control and Render just the control would make it super portable, and you wouldn't have to do anything else after that.
  • Options
    An excellent idea has born! :-)
  • Options
    Interesting, although you're talking about moving data in the other direction (from Vanilla to the CMS).

    XML isn't as portable as you might think. It's not a matter of just dumping out XML to the browser, you would have to translate it to HTML which means first parsing the XML. In PHP this only happens through a module (that isn't always installed) or though a parser written in PHP (which would be huge).

    If all you wanted to do was cut/paste a Vanilla discussion into the place where your CMS renders comments, you could probably do that right now just using CSS to hide things like the Panel and jigger around the comments themselves to blend in better. But that means loading all of your CMS code and all of your Vanilla code to display a page with comments, and that's a lot of code.

    I'm suggesting that there are cases where it would be useful for Vanilla to reach out and snatch some data from a CMS's database (I just don't know what all of those cases are yet).
  • Options
    Oh... They always said I had backwards thinking ;)

    Yes, reverse-engineer a CMS model in to a bridge... I'll shut up.
This discussion has been closed.