By Kris Weyling, 7 October 2016
What follows is a tale of a developer. Like many tales it twists and turns, guiding the protagonist to embark on a journey of discovery. This journey of discovery is not conducive to a linear tale, but the richest of experiences is always a product of re-evaluation, self-discovery and enlightenment.
One of the great things about FileMaker is its willingness to bring other friends to the party; it doesn’t restrict us to a proprietary end-to-end environment. There are many great ways to introduce integrations and other technologies. The most powerful of which has got to be plugins.
A FileMaker plugin is a file, created in C or C++, given the appropriate extension. The plugin can then be loaded into FileMaker Pro to expand the set of functions available. There are also third party plugins that allow you to develop your own plugins in PHP or Java.
Or, we can develop our own plugins using our very own Reactor! But more on that later...
While the FileMaker platform allows us to build and deploy powerful business applications extremely quickly, it doesn’t give us the degree of control that allows us to build ‘anything’ in FileMaker Pro natively.
But this is a good thing!
Because were that not the case, we wouldn’t be able to build and deploy applications as quickly as we can.
However, FileMaker Pro is happy to hand the job onto someone else. There are two ways to use develop a client-side interface using web technologies; in a WebViewer, and using Reactor.
There have been many moments when building portals in FileMaker Pro that this developer wished they could drag around portal rows to re-sort them. It occurred to me that building a portal in HTML+JS could allow me to manipulate the portal anyway I desired.
“Why don’t you just use Reactor?” I was asked by one of my fellow colleagues.
That quip gave me pause. While I certainly knew of Reactors existence, I had never had first-hand experience of developing for Reactor and how powerful it truly was.
At Digital Fusion, we pride ourselves on our Fusion Reactor plugin. Most plugins are developed to perform a certain task or reach a certain goal; be that to integrate with your accounting package, or to perform file operations on a local disk. The Fusion Reactor plugin provides a gateway. What lies beyond that gateway is entirely up to you - the developer.
Reactor is a plugin developed by some wizards at Digital Fusion Ltd, well before my time. Basically it’s a plugin that allows us to build our own plugins using front-end web technologies. Reactor allows us to install and run these things called BlackBoxes. Far from a flight-data recovery tool (which I should avoid dwelling on - as I write this from 35,000 feet over the Tasman sea) it is a web app. I was able to write the source for the web app, and deploy it into a BlackBox that could then be installed onto any machine that has Reactor installed.
Like all great tales, the Sortable application basically boiled down to three acts:
So far, all we have done is move objects about a portal. The next step is to actually have it do something. When the element is dragged to a different location, we call an asynchronous function. This is really nice because the users experience is truly seamless. We loop through every item in the portal, updating the FileMaker Pro data with the new sort order. We do this by calling a script, passing through the UID of the record, as well as the new sort order.
I emerged triumphant. I had achieved my goal in developing a solution that was modular and portable, and learned a lot of about a powerful tool that paved a new way to a world of exciting possibilities.
In particular, I'm very keen and excited to explore other great front-end augmentations and features that can be made possible with other components of the JQuery UI library. Sortable is just one of them:
Interactions and Widgets
We can use the JQuery UI suite to add classes to objects, therefore adding effects. For example, we can animate an object to transition from one color to another, animate the easing of an object (gradually show/remove), or animate any effect at all such as bouncing, dropping, shaking, pulsating, etc.
Effects such as these are all over the web to augment the users experience, and using Reactor they can be added to any FileMaker Pro application to do the same!