The Relationship Graph in SeedCode Complete

We’ve been asked to provide a descriptive overview of how the relationships graph in SeedCode Complete is structured and why. So I’ll try to do that without getting into too much technical detail, or philosophy. (For some of the philosophy here, checkout Jason’s posts on the origins of the Selector Connector pattern and why he chose “cards” as the design metaphor in Complete.)

SeedCode Complete Template

There are four distinct models in use on the SeedCode Complete graph:

  1. anchor-buoy
  2. separation of data and interface
  3. selector-connector
  4. virtual list

Anchor-Buoy

This is a well established graph model that should be very familiar to any FileMaker developer. Countless FileMaker solutions built since FileMaker 7 feature multiple anchor-buoys or “TOGs” (table-occurrence groups), where each “anchor” represents a “base table”, and is connected to multiple “buoys” (usually positioned to the right of the anchor), representing instances of other tables as they relate to that anchor. FWIW, I always loved the term “squid”, which for some reason never quite caught on as an alternative name.

On the SeedCode Complete graph, you’ll find the familiar anchor-buoy pattern starting below the “Layouts (Anchors and Buoys)” text note. The first one has the “Contact” base table as the anchor, with numerous connected buoys off to the right (ContactNotes, ContactAssociationsEdit, etc.). Two things may seem odd there: the vertical relationship line connecting Contacts to other “base table” TOs, and what seems to be a separate TOG, starting with the “ContactGlobals” TO, just below Contact. That vertical line connects all of the base tables to the Connector TO (see the “Selector Connector” section below). The ContactGlobals table contains the global fields that would otherwise be in the Contacts table (see the “Separation of Data and Interface” section below). Its buoys facilitate searchable portals featuring “type-ahead” on the main Contacts layout (e.g., “ContactGlobalsNotes_Ascending”).

Separation of Data and Interface

AKA “the separation model”, mainly aims to have data tables contain only data fields (text, number, date, time, timestamp and container), while fields that are strictly used for interface (typically globals) would go in tables dedicated for that purpose. Often the data tables and the interface tables are in separate files, which can make updating your solution a breeze for some types of deployments. The theory is that all ongoing development is done in the interface file (scripts, layouts, relationships, calculation fields, etc.), while the data file schema doesn’t change. That way an update just involves swapping out the interface file. No need to import data, no user interruptions.

All of the “anchor” TOs described above represent data tables, which are all stored in the SeedCodeModel file (that’s our data file). Many of the table occurrences on the graph in the SeedCodeComplete file (that’s our interface file) are for local tables containing only global fields (Home, SelectorFilters, SettingGlobals, etc.).

SeedCode Complete also uses a Control file which isn’t really a data file, but isn’t technically an interface file either: think of it as an interface file that only scripts use. In other development environments, the Control file would be the “controller” part of a Model-View-Controller architecture. In FileMaker it’s useful because it lets developers run scripts in this Control file–scripts that may need to navigate to new layouts, etc–without losing focus on where the user is at in the interface file. That may seem like a small benefit for adding a whole new file to your solution, but keeping the layout hopping in the Control file is one reason why SeedCode Complete feels to smooth, even on WebDirect.

More on why we use separation in Complete can be found in our docs here.

Selector Connector

This technique has been gaining a lot of traction recently in blog posts, videos and DevCon sessions, mainly coming from Todd Geist and SeedCode’s Jason Young. Even FileMaker, Inc. has recognized its significance with a “development leadership” award given to Geist Interactive this past July in Las Vegas. Follow some of those links for much better explanations than I could give, and way more detail than this post has space for. The main benefit of using Selector-Connector in SeedCode Complete comes when extending SeedCode Complete by adding a new module, for example. That’s because when you copy/paste field objects from one layout to another, those objects’ field associations remain intact. One such application is with “pickers”, used extensively in SeedCode Complete to search for records in another table to establish a link between records in related tables.

As mentioned previously, all of the base tables are related to the “Connector” TO, which in turn is linked to the “Selector” TO (and others). An instance of each data table is linked to the Selector TO via a global primary key, which allows for a direct link to any individual record in any of those tables from virtually any layout.

Virtual List

A popular advanced technique, the virtual list is a fast and flexible way to display data from any table in a list view or portal. SeedCode Complete uses virtual lists to display search results on the home screen. The “Rows” anchor TO and linked buoy TOs (RowsAddresses, RowsCompanies, etc.) support the virtual list technique in SeedCode Complete.

Using Virtual List means there aren’t a ton of little table occurrences everywhere you might need a portal of contacts or open projects. This, combined with the selector-connector pattern for making virtual rows accessible from anywhere, really reduces the number of table occurrences on the graph: and means there are likely fewer table occurrences for you to create as you make new modules.

For a nice introduction to Virtual List, check out our virtual list example file.

Conclusion

The relationship graph in SeedCode Complete is large and may seem complex at first. But when you recognize the methods described in this article, you’ll find it’s very well organized and follows a predictable pattern, with easy-to-understand naming conventions. Thus, adding a new module, while not a trivial process, is mostly an exercise in duplicating and renaming tables, fields, TOGs on the graph, scripts and layout elements. With a little patience you’ll end up with a new module that matches SeedCode Complete’s design and UX standards, and that can be custom tailored to suit your needs.

Of course we recognize that not everyone has the patience and attention to detail required to add a new module into SeedCode Complete, so we are here for you and happy to help. Feel free to get in touch so we can help you customize SeedCode Complete into the perfect solution for you.

Featured Posts

Follow Along

Stay up to date with the latest news & examples from SeedCode

5 Comments

  • john renfrew

    john – really helpful precis.
    does the control file run on or off-screen then??

    • seedcode

      It runs in a “hidden” (un-drawn?) window. So the user experience is the same as an offscreen window. But the *debugging* experience is better since the window isn’t off screen: if you stop a script and call focus to the window, for example, you can actually see where you are =)

  • Nice summary but you omitted to credit Bruce Robertson who invented and donated the virtual list technique to the world.
    Using virtual lists as the means of displaying results from many tables in a single Ui is a good albeit complex technique until the lists become long when the list building overhead becomes too much of a performance load on mobile.
    Our research indicates that the ultra narrow single table technique, being essentially very simple, provides better performance.
    Cheers, Nick

    • seedcode

      Bruce is the man. I know the “five point palm exploding heart technique” but what’s the “ultra narrow single table technique”?

Leave a Reply

Your email address will not be published. Required fields are marked *

Check out some of our other posts ...

New Week Views in DayBack for FileMaker

You can now expand DayBack’s week views to show two or three weeks at a time. We’ve been using this internally in beta mode for a few weeks, and it’s very helpful to see what’s coming up next week while navigating this week’s work. Find tips on how to work with these new views on the DayBack blog.

To-Do Lists in FileMaker – New in DayBack Calendar

Now create and manage FileMaker to-do lists directly from the Unscheduled Items sidebar in DayBack Calendar. Our latest extension brings to-do behavior to any FileMaker table. Like unscheduled items, this behavior is based on a new checkbox field in your table, so some or all of your records in the table can be treated as to-dos. Mark your to-do’s done as you complete them, or drag them into the calendar to schedule time to work on them. See it in action here: Customize Your To-Do Lists This extension was designed to be pretty a scaffold onto which you could build your own, more specific to-do behaviors by customizing the action itself or the FileMaker scripts tha manipulate events. Here are some ideas to get you started. Add To-Do Lists to Your FileMaker Calendar If you haven’t already enabled the unscheduled sidebar along DayBack’s right edge, you can learn how to turn that on here: unscheduled items in DayBack. Then, download the custom action and learn how to configure it here: To-Do Lists in DayBack Calendar.

Improved Resource Selection

We’ve made some big changes to how you filter and assign resources when editing events in DayBack. These changes will make it much easier to work with large numbers of resources, especially for folks assigning multiple resources to the same event. Watch a video of the new behaviors and learn more here: Adding Multiple Resources to an Item. If you haven’t looked at your resource field mapping in a while, here is how you set that up: Mapping the Resource Field in FileMaker. Please get in touch if you have any questions about this; we’re here to help.

Suggesting Appointment Slots

Show Available Slots that Match Multiple Criteria Schedulers often look for gaps in their schedules to find the open resources for each opportunity. But sometimes, gaps don’t tell the whole story. You may have invisible criteria like skill-matching, cleaning requirements, or multiple resources to schedule at once. Or you may be on the phone with an opportunity and must suggest available times as quickly as possible. In these cases, DayBack can suggest the best slots that match all of your requirements. Scheduling Criteria Are Often Invisible In the movie above, schedulers can see openings for the two technicians, but they can’t easily see if the required rooms and equipment are free at the same time. While DayBack can show different types of resources simultaneously, as the number of criteria increases, it can be hard for schedulers to see everything at once and still make good decisions. Our customers often have rules that constrain when an otherwise open slot can be scheduled. Here are some of the invisible criteria we’ve built out for customers: Because DayBack is highly scriptable, it can scrub open slots against a variety of criteria to render just the slots that fit all your requirements. When multiple slots match, DayBack can even rank them so you can present the most ideal slots to your clients first. You Have to *See* Slots in Context to Make the Best Decisions Many scheduling apps present possible appointments as a list of dates and times. Without showing more information about each slot, schedulers can book days too tightly, always suggest the same providers first, or create huge gaps in some provider’s schedules. Ranking slots can help, but we’ve found that highlighting ideal slots alongside existing appointments gives schedulers the information they need to make the best decisions. We’ve seen schedulers quickly offer to split appointments or to slightly change services when they see available slots in the context of other appointments, trainings, vacations, and breaks. Getting Started We customize the recommendation of slots for each deployment as part of DayBack’s implementation packages. Please get in touch if you think DayBack could make a big impact on your team.

COMPANY

FOLLOW ALONG

Stay up to date with the latest news & examples from SeedCode

© 2024 SeedCode, Inc.