From SeedCode Documentation

DayBackForFileMaker: HowItWorks

With no relationship between the calendar and the events table, how exactly does this work?

The calendar interface is drawn in a webviewer, so all the things that would normally make up the layout (the buttons, columns, and portals) are rendered in HTML, CSS, and JavaScript. (The particular flavor of JavaScript being used is AngularJS.)

This means most of the complexity of the calendar is also tucked away in the webviewer, though you can still change the look and feel of the calendar by editing its CSS.

The calendar reads your event data by performing finds and then gathering the results of it's find request up as text (the find script is "Event Find" but if you want to filter which events come into the calendar, you can edit its filters directly without diving into that find script.

Finally, any edits you make are passed back into FileMaker as regular FileMaker script calls. So you can edit the way DayBack behaves by editing the FileMaker scripts instead of the JavaScript. In fact, if you have FileMaker Advanced, you can use the calendar with the Script Debugger on and see which scripts are being called, just as if it were a "regular" FileMaker layout.

Why JavaScript?

FileMaker is great at many things, but very complicated layouts (like grids and calendars) can be tough to build and even more difficult to maintain. By putting the layout difficulties off on to HTML, we hand the display difficulties off to a framework better equipped to handle grids and large numbers of objects. This also means the calendar renders much more quickly in the webviewer than it does in a native FileMaker layout.

With JavaScript we also get to include behaviors that we've only been able to approximate in our native FileMaker layouts: things like sliding drawers and drag-and-drop finally feel completely native... because they are native in JavaScript.

And, since we're using FileMaker as a backend, we still get to take advantage of all the great stuff that FileMaker gives us for free: calculated fields, record locking, and access privileges all work here just as you'd expect them to.

For more on why we chose JavaScript and why we think this is good news for developers modifying our calendar, check this out:

https://youtu.be/Kh-lilixLQA

The Future

This also means that DayBack will eventually be able to work with other backends in addition to FileMaker (think about showing your Google Calendars or iCal calendars alongside your FileMaker events). It also means that we should be able to deploy the calendar outside of FileMaker layouts: running DayBack in a browser and still connecting to your FileMaker tables via FielMaker Server.

We're very excited about the possibilities: stay tuned.

Learn more about FileMaker and JavaScript on our blog: seedcode.com/javascript

Retrieved from http://archive.seedcode.com/pmwiki/index.php?n=DayBackForFileMaker.HowItWorks
Page last modified on May 19, 2023, at 04:33 PM