I'm wondering if anybody has any experience or links to documentation/examples to using node.js (or something like it) to have live updates to websites that use Filemaker Data through PHP.
If you find any information about this topic on your own, I'd be grateful if you could post what you find. I have not personally expored this topic yet, but I have been interested by it.
Very best regards and thank you,
Hopefully someone else that has some degree of experience trying to use the two will jump on this thread...
I've done some research.
I found a course on Lynda.com titled Node.js- A first look. With it I have understood that it is a lot more than I thought it was. Among other interesting points:
var io = require('socket.io').listen(80);
After having a better understanding of what it is, I can see that there is a great relation between socket.io's functionality and Filemaker's native functionality with the client and webDirect, but NOT with CWP. The reason I'm looking into this is that there are some "layouts" (pages) that I need to render in HTML for two reasons:
I decided on using MBS plugin Server Socket Feature, that in many ways works like socket.io, but restricts the solution to full FM clients (no go, on FM-Go), which is why I'm looking into Node.
The beauty with FM is that all this "live" data is already there... except when you have a found set you wished would be updated when a certain criteria was met. So if one chooses to go down the Node.js path, you have to build the emits/broadcast/on(event,function) into your logic. Which is what I have had to do with the plugin I currently use anyway...
My ideas on how to implement:
This certainly sounds like a very interesting endeavor, and I am grateful to you for sharing some of the details of your thoughts about it.
If I understand correctly, it seems that the motivation behind pursuing the use of node.js would be to allow a more "real-time" and interactive exchange between data being served from FMS/FMP, and being read by an FMGo client?
If this is indeed the case:
I'd like to share one tidbit that I was playing around with at home a few weeks ago. I did not post about it, because I did not pursue it far enough to see how robust it might be, as well as for the fact that in non-FMGo cases, the same effect could be achieved more reliably with the use of a plugin (as I believe you have done). It is in the case of FMGo, where client side-plugins are not an option, that this idea has some small appeal.
The gist of the idea is:
Utilize a visible webviewer on a layout being rendered in FMGo, and have the contents of that webviewer involve a trigger field stored in a table on the server side. When the trigger field is modified, the webviewer updates, and can therefore be used to trigger an FM script on the FMGo client via the FMP URL protocol. As such, it is possible to have the FMGo client be triggered into action from the server side, or by another FM client. I believe that this idea could possibly be of use to you, though I am not certain, and moreover as I mentioned, I have not pursued the idea very far. It is interesting --- you actually came to mind a few weeks ago when I was working with this idea, as someone who might be interested in it.
I will attach an extremely simple sample file to this post. Please feel free to send me questions if you have any, and no worries at all if this is not something which you find useful.
Best regards and thanks again for sharing,
Instructions for sample file:
- Host the file somewhere where it can be accessed via both FMP/A and FMGo
- Open the file simultaneously in FMGo and FMP/A
- Use the "Trigger" button on the desktop client to trigger a script in FMGo
- If all goes well, the trigger button clicked on the desktop client should cause a script to run in the FMGo client
Hi! I just came across 3 packages on npmjs.com
Can anybody shed some light on these , and how node.js can be used more for CWP .
Also will it be able to be a good alternative for those who already have worked with node.js ?
from this 2016 DevCon:
Retrieving data ...