Skip to main content
Solved

FME Form (desktop) best practices and style


tva
Contributor
Forum|alt.badge.img+12
  • Contributor

Hi,

I was wondering if there are some best practices and or style guides / examples on for workspaces. Some questions that I have about this (besides the obvious: avoid crossing as much as possible, annotation, clear transformer names etc)

 

  1. Like is there an agreed style for public and private parameters (casing, under scores, ...)
  2. Is there an advise on how many transformers can be put in the main part and how many in a custom transformer?
  3. How many custom transformers can be nested into each other or is it advised to not do this to deep (performance impact)
  4. Any other good to implement styles?

Best answer by jdh

david_r wrote:

You'll find some topics covered in the (old) training manual, but it's by no means an official guide. I think most experienced users end up with some preferences and/or pet peeves, but tastes and preferences differ.

To answer your first three specifically, based on my own preferences:

  1. Parameters, public or private, are always UPPER case with underscores in my workspaces. That makes them easy to spot.
  2. I try to keep it down as much as possible (there used to be a standing joke about more than 3 transformers), but I've got no hard limit. However, I believe that an increased number of transformers merit an increased effort for annotations, bookmarks and a structure that is easy-ish to follow.
  3. Personally I don't like to nest custom transformers, but for no particular reason other than trying to keep things transparent.

I'm sure there are other users here on the community that can chime in with their own preferences.

To contrast with David,

 

1. I prefer CamelCase for my parameters. I don't use a style difference between public and private. I do try and keep the names consistent between workspaces. ie OutRoot is one I use often for the Ouput Folder Root Directory.

 

2. Custom transformers should be based on functionality rather than number of transformers. If you don't need to repeat it (either within the same workspace or different ones), just put them in a bookmark and optionally collapse it. Ie keep the transformers in main, unless you are repeating multiple blocks of them.

 

3. As far as I am aware there are no performance impacts with nesting custom transformers (CT), but consider the pros and cons of linked vs embedded. If you use a linked CT, changes to it could break your primary CT, whereas going through and updating embedded transformers could be a real pain. I personally use embedded CT when nesting, but in my case most of these CT are "helper functions" for example I have a custom transformer that returns the unit of the feature's coordinate system because knowing whether it's in meters or degrees can affect the workflow.

I would try to avoid nesting custom transformers that access external resources.

 

4. Bookmarks are a good way to differentiate different sections. I often nest bookmarks, though it is rare that I collapse them. I know some groups colour code their bookmarks (data input, different types of processing , data output) but I don't with the exception of using red to indicate a section that requires user intervention before processing (we have a few cases where the workspace needs to be customized to the data in a way that is too complicated for published parameters)

 

Use the workspace parameters overview to describe the purpose of the workspace. Give a high level overview of the actual processing, either here, or as an annotation in the main workspace.

 

When creating custom transformers make sure that interim attributes don't override existing attributes. ex if using an areaCalculator make sure to change to output so that it is not simply _area which could easily already exist on the feature. I start all interim attributes with an !. Many prefer a unique prefix per custom transformer. Likewise make sure to cleanup all interim attributes.

 

Use junctions to help simply the lines.

 

I personally don't like to rename transformers, other than to occasionally change the numbering. I'll use an annotation if warranted.

 

 

 

 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

13 replies

david_r
Celebrity
  • May 4, 2023

You'll find some topics covered in the (old) training manual, but it's by no means an official guide. I think most experienced users end up with some preferences and/or pet peeves, but tastes and preferences differ.

To answer your first three specifically, based on my own preferences:

  1. Parameters, public or private, are always UPPER case with underscores in my workspaces. That makes them easy to spot.
  2. I try to keep it down as much as possible (there used to be a standing joke about more than 3 transformers), but I've got no hard limit. However, I believe that an increased number of transformers merit an increased effort for annotations, bookmarks and a structure that is easy-ish to follow.
  3. Personally I don't like to nest custom transformers, but for no particular reason other than trying to keep things transparent.

I'm sure there are other users here on the community that can chime in with their own preferences.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • Best Answer
  • May 4, 2023
david_r wrote:

You'll find some topics covered in the (old) training manual, but it's by no means an official guide. I think most experienced users end up with some preferences and/or pet peeves, but tastes and preferences differ.

To answer your first three specifically, based on my own preferences:

  1. Parameters, public or private, are always UPPER case with underscores in my workspaces. That makes them easy to spot.
  2. I try to keep it down as much as possible (there used to be a standing joke about more than 3 transformers), but I've got no hard limit. However, I believe that an increased number of transformers merit an increased effort for annotations, bookmarks and a structure that is easy-ish to follow.
  3. Personally I don't like to nest custom transformers, but for no particular reason other than trying to keep things transparent.

I'm sure there are other users here on the community that can chime in with their own preferences.

To contrast with David,

 

1. I prefer CamelCase for my parameters. I don't use a style difference between public and private. I do try and keep the names consistent between workspaces. ie OutRoot is one I use often for the Ouput Folder Root Directory.

 

2. Custom transformers should be based on functionality rather than number of transformers. If you don't need to repeat it (either within the same workspace or different ones), just put them in a bookmark and optionally collapse it. Ie keep the transformers in main, unless you are repeating multiple blocks of them.

 

3. As far as I am aware there are no performance impacts with nesting custom transformers (CT), but consider the pros and cons of linked vs embedded. If you use a linked CT, changes to it could break your primary CT, whereas going through and updating embedded transformers could be a real pain. I personally use embedded CT when nesting, but in my case most of these CT are "helper functions" for example I have a custom transformer that returns the unit of the feature's coordinate system because knowing whether it's in meters or degrees can affect the workflow.

I would try to avoid nesting custom transformers that access external resources.

 

4. Bookmarks are a good way to differentiate different sections. I often nest bookmarks, though it is rare that I collapse them. I know some groups colour code their bookmarks (data input, different types of processing , data output) but I don't with the exception of using red to indicate a section that requires user intervention before processing (we have a few cases where the workspace needs to be customized to the data in a way that is too complicated for published parameters)

 

Use the workspace parameters overview to describe the purpose of the workspace. Give a high level overview of the actual processing, either here, or as an annotation in the main workspace.

 

When creating custom transformers make sure that interim attributes don't override existing attributes. ex if using an areaCalculator make sure to change to output so that it is not simply _area which could easily already exist on the feature. I start all interim attributes with an !. Many prefer a unique prefix per custom transformer. Likewise make sure to cleanup all interim attributes.

 

Use junctions to help simply the lines.

 

I personally don't like to rename transformers, other than to occasionally change the numbering. I'll use an annotation if warranted.

 

 

 

 


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • May 4, 2023

Here we go! Best practices 2023:

1. NO. I use Camel Case for Parameters, writer dependent case for attribute names: all lowercase for PostreSQL, DWG, CamelCase for Geopackage, dot separator for Geopackage, underscore separator for GDB

2+3. I don't know! The deepest level I have gotten to is 3. I don't use custom transformers unless I must loop something. Somewhere in time Safe mentioned that collapsing bookmarks is better for memory usage than using custom transformers, so that is what I do.

4. I change the color and width of crossing connections; I don't use tunnels or hide connections unless I send something to production, and I want it to look clean and create space for annotations.


bobw
Contributor
Forum|alt.badge.img+5
  • Contributor
  • April 25, 2025

With five different people building workspaces, some consistency (protocol) is required for understanding.  And just within my own workspaces, complexity requires a set of rules.
I do rename transformers but only append to the original name.  e.g.  “Tester_acctid” and “Tester_not_null”  They sort correctly in Navigator that way, making them easy to find.
I do collapse bookmarks for performance.

We annotate a lot, both for sharing and recall, using standardized colors for balloons and bookmarks.  Here’s the cheat sheet that everyone follows:
 

Annotation colors

 


runneals
Contributor
Forum|alt.badge.img+22
  • Contributor
  • May 7, 2025

I’ve put together a guide with links that I encourage you to take a look at (and provide feedback on). Check it out https://github.com/runneals/GISProjects/tree/master/fme/FME%20Best%20Practices


redgeographics
Celebrity
Forum|alt.badge.img+49

I've just shared our Best Practice Guide during my presentation at the Peak of Data and AI: https://redgeographics.ac-page.com/best-practice-guide-en


redgeographics
Celebrity
Forum|alt.badge.img+49
runneals wrote:

I’ve put together a guide with links that I encourage you to take a look at (and provide feedback on). Check it out https://github.com/runneals/GISProjects/tree/master/fme/FME%20Best%20Practices

I am very much against renaming transformers. That is what annotations are for. (back me up here ​@hkingsbury)


runneals
Contributor
Forum|alt.badge.img+22
  • Contributor
  • May 7, 2025
redgeographics wrote:

I've just shared our Best Practice Guide during my presentation at the Peak of Data and AI: https://redgeographics.ac-page.com/best-practice-guide-en

I added a link on my github to yours ;) I will say yours is a lot more simpler and user friendly for newer users. My guide is pretty overwhelming but super useful for power/advanced users.


hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • May 8, 2025
redgeographics wrote:
runneals wrote:

I’ve put together a guide with links that I encourage you to take a look at (and provide feedback on). Check it out https://github.com/runneals/GISProjects/tree/master/fme/FME%20Best%20Practices

I am very much against renaming transformers. That is what annotations are for. (back me up here ​@hkingsbury)

 Just because you can, doesn’t mean you should! 😅


runneals
Contributor
Forum|alt.badge.img+22
  • Contributor
  • May 8, 2025
hkingsbury wrote:
redgeographics wrote:
runneals wrote:

I’ve put together a guide with links that I encourage you to take a look at (and provide feedback on). Check it out https://github.com/runneals/GISProjects/tree/master/fme/FME%20Best%20Practices

I am very much against renaming transformers. That is what annotations are for. (back me up here ​@hkingsbury)

 Just because you can, doesn’t mean you should! 😅

Next time I go through and update this, I’ll try and remember to credit where I got the best practice from. I will say that this is my collection of “best practices” I’ve come across (some may contradict each other and I may or may not follow all of them 😅). A lot of them came from people that seemed more knowledgeable than me at the time. I think (glancing through some of my sources) that this disputed “best practice” specifically came from ​@lars_de_vries


bobw
Contributor
Forum|alt.badge.img+5
  • Contributor
  • May 12, 2025
hkingsbury wrote:
redgeographics wrote:
runneals wrote:
 

I am very much against renaming transformers. That is what annotations are for. (back me up here ​@hkingsbury)

 Just because you can, doesn’t mean you should! 😅

What’s easier to find in Navigator and on the canvas:  FeatureWriter_1 and FeatureWriter_2, or FeatureWriter_PostGIS and FeatureWriter_Excel?  Renaming is cool!

Thanks for the Best Practices links!


hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • May 12, 2025
bobw wrote:
hkingsbury wrote:
redgeographics wrote:
runneals wrote:
 

I am very much against renaming transformers. That is what annotations are for. (back me up here ​@hkingsbury)

 Just because you can, doesn’t mean you should! 😅

What’s easier to find in Navigator and on the canvas:  FeatureWriter_1 and FeatureWriter_2, or FeatureWriter_PostGIS and FeatureWriter_Excel?  Renaming is cool!

Thanks for the Best Practices links!

An approach like that is good, it’s when it gets renamed to ‘PostGIS’ or ‘Excel’ it becomes a problem. Especially in cases where you no longer know what the transformer is just by looking at it.

For example:

I have a HoleCounter, VertexCounter, AttributeCreator and AttributeTrimmer here - which is which?


redgeographics
Celebrity
Forum|alt.badge.img+49
bobw wrote:
hkingsbury wrote:
redgeographics wrote:
runneals wrote:
 

I am very much against renaming transformers. That is what annotations are for. (back me up here ​@hkingsbury)

 Just because you can, doesn’t mean you should!

What’s easier to find in Navigator and on the canvas:  FeatureWriter_1 and FeatureWriter_2, or FeatureWriter_PostGIS and FeatureWriter_Excel?  Renaming is cool!

Thanks for the Best Practices links!

As long as you do the renaming on the end of the name, keeping the original transformer name intact, it’s not so bad. But to be honest, I never lost a transformer in my workspaces and I’d still prefer to use annotations and bookmarks for explanation.

One of the things I recommend is using special bookmark colors for readers and writers, but that extends to transformers that read or write as well, such as FeatureWriters. So in this example I would still be able to find them quite easily because they’re in special bookmarks.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings