Skip to main content

Linked Custom Transformers - looking for feedback

  • February 17, 2025
  • 5 replies
  • 50 views

virtualcitymatt
Celebrity
Forum|alt.badge.img+34

I have a number of workspaces, lets say 5, but this could expand.

Each of these workspaces is like a validation check / test.
 

There is a lot or duplication between the tests and I’m thinking about creating some linked customer transformers in order to not have to make changes 5 times in a row. I know this is usually good practice in programming in general.

I’m a little hesitant though because adding linked custom transformers can add complexity (passing attributes 7 parameters etc etc) and makes testing/edits kind of annoying.  

I’m interested to hear others experience with working with linked customer transformers -pain points, whats great, when you use them over when you don’t

 

5 replies

geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • February 17, 2025

I tend to embed (not link) custom transformers whenever possible.

That way I have the benefits of both a generic custom transformer in my repository and the ability to tailor the transformer to the needs of that particular workspace.

And when I feel the need to change my custom transformers I don't have to worry about all the workspaces that are linked to it, and that might stop working after the change.


virtualcitymatt
Celebrity
Forum|alt.badge.img+34
geomancer wrote:

I tend to embed (not link) custom transformers whenever possible.

That way I have the benefits of both a generic custom transformer in my repository and the ability to tailor the transformer to the needs of that particular workspace.

And when I feel the need to change my custom transformers I don't have to worry about all the workspaces that are linked to it, and that might stop working after the change.

Does that not mean though that if you have 5 workspaces which use that custom transformer that you have go through all the workspaces and make the same change 5 times? 


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • February 17, 2025

Yes, I would have to open and change those 5 workspaces. But only if the change affects those workspaces, and that hasn't happened to me (yet???).

In that case it may be faster to remove the old version of the custom transformer and add the new version. Or, depending on the changes, just some copy-paste of the affected transformers within the custom transformer.

 


hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • February 17, 2025

I really support the idea of having a centralised location of custom transformers; for a couple of reasons:

  • Ability to share repeatable logic throughout an organisation
  • Modularising common tasks
  • Centralising business logic, so when it changes, an update only need to be done in one place.

I can also see scenarios where it might not be appropriate, such as hyper specific processing that needs to be done multiple times in one workspace. I have seen cases where initially this was the case, then that logic needed to be used elsewhere, so was copied, then one copy was updated, and the other wasn’t, and results were different and caused a real headache.

 

For custom transformers that are a shared resource, my view is that the should be specific and do a discrete task. If you’re having to change one part of a custom transformer for each process then maybe the custom transformer is too broad and you should look at narrowing down the purpose of the custom transformer


virtualcitymatt
Celebrity
Forum|alt.badge.img+34
hkingsbury wrote:

I have seen cases where initially this was the case, then that logic needed to be used elsewhere, so was copied, then one copy was updated, and the other wasn’t, and results were different and caused a real headache.

This is exactly the situation I’m facing. 

I developed and deployed a prototype to meet the initial requirements - initially a lot of stuff was hard coded for each use case. Bits were copied from one and moved into the next, which was moved into the next etc etc.

The expanding requirements means that my initial structure mean that the number of workspaces would blow up, so instead I made the processes much more generic meaning I could reduce the number of processes I needed to create/maintain. 

The parts around handling the generic stuff is all pretty much just copies. But of course each time I find a new thing I want to change in these areas I need to also make the changes to the the other 4 workspaces. It’s driving me nuts haha.

Would be super nice if I was able to apply changes to a linked CustomTransformer from within a workspace using it. As it is I’m just not quite ready to move to linked custom transformers and will just stick with copy and paste but if feels like a lot of overhead at the moment


 


Reply


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