Skip to main content
Open

Make templates with assigned parameters safer to use

Related products:Software Factory
  • September 16, 2019
  • 1 reply
  • 100 views

When a template has an assigned templates paramater your template code will look something like this:

select 1 from [parameter]

In a small piece of code the parameter is obvious. In a large code template this parameter is less obvious. Now it's very easy to break this logic and setting a hardcoded value to this parameter. If you always work from template this should not happen however, we live in a world of copy/paste so accidents do happen (especially in a large chunk of code)

To make template parameters safer to edit i suggest the following two changes:

  1. during creation add a validation. This validation will give a warning if a template has no parameter set but the parameter is assigned in the assigned templates. In this case someone probably broke the template parameter logic.
  2. In functionality - templates give some kind of indicator that a parameter is being used for the template. Now you would only know by looking at the assigning screen and selecting the specific program object in assigned templates.
Did this topic help you find an answer to your question?

1 reply

Robert Jan de Nie
Thinkwise blogger
Forum|alt.badge.img+5
Great idea, and really easy to implement, I'd think.

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