Apigee naming conventions

We are thinking of building a collection of stand-alone shared flows to use as basic functional building blocks. The idea is to build a sort of library. We want to make it clear which parameters are input, which can be used as output and which are internal. We want to avoid naming conflicts and be clear about input and output parameters. We are aware about the naming conventions.

We were looking to do something among the lines of this:

Variables in shared flows:

  • in.<shared-flow-name>.<var-name>: for input parameters
  • out.<shared-flow-name>.<var-name>: for variables that are meant to use in other subsequent parts of the proxy
  • <shared-flow-name>.<var-name>: for variables that are used internally in the shared flow. We intend to clear them at the end of the shared flow

Variables inside the proxy:

  • main.var-name: the name main is a reference to for example the main loop in a Java/C/C++/… program, indicating that this is a variable from the proxy and not from any used shared flow.

Our question is what do others use? Do you have other ways of naming variable to keep a clear overview from where variables come from, especially in proxies where lots of shared-flows are used. Also, how is the naming done for Key value maps/caches, …? We were thinking along the lines of: policy/shared-flow-name.descriptive-name.

Looking forward to your recommendations, best practices and experience. All feedback well appreciated.

4 2 338
2 REPLIES 2

I'm interested in seeing the replies here.

Nice proposal!

One small suggestion: would not use main.var-name but proxy.var-name...

Hope to see fedback from others.