New Remote Connector Plugin

We were recently working with a client that had a large ColdBox app that we need to intergrate with Mura. As some may know, it's very normal in Mura to use frameworks that have a front controller to build sub apps that can then be exposed either as a plugin or simply included into content with the mura tag.

[ mura]dspInclude('path/to/app/index.cfm')[/mura ]

In this case the ColdBox app was very robust and did not seem to call out "sub app". We decided that it would be best to keep Mura and the ColdBox app separate in order to allow them to cluster independently with there own hardware. So we looked for a different solution and as usual found a interesting blog post by Ben Nadel about maintaining session across multiple cfhttp requests.

After a little bit of playing around we found that instead of putting the ColdBox app under Mura we could simply talk to it where it currently lived.

We even created some new events on the remote ColdBox app to allow Mura to log users in and return a struct serialized with JSON to let Mura know who just logged in and sync or create a local account for that user.

I'm guessing that there is a more pure Coldbox way to achieve the same thing, but I really like this approach because it is more universal in it's application.

So if anyone would like to play around with it you can download it here.

The first thing that you need to do is intall it. There are two main settings that you will need to provide the plugin. Make sure to assign it to the site that you want to use it on.

remote URL: http://www.yourremoteapp.comremote app key: remoteApp

Next you can embed that app on a mura page with:

[ mura]event.getValue('remoteApp').call()[/mura ]

The plugin will send all the url and form vars over to the remote app in the form vars.

You can also override url and form vars by passing a struct in to the call method: