I have a rather complicated problem to solve. In the application I am building there are some objects, each object can have some parameters each one has one or multiple values (let's keep it simple for now and pretend each parameter can have only one value).

Now, parameters can be grouped into templates, and when you create/edit an object you can use a template to quickly populate the object, a little bit like Masters in InDesign.

Here is a quick viz to make it a bit clearer.


Now the problem is managing the relations between templates (or masters) and their instances. In fact it is possible that at a given point in time, the user wants to override a object parameter value, or viceversa, edit the template.

I am considering to break the relationship template-children when a object parameter is edited, and prompt with an update request when a template that has children is edited.

Is it the right way to go? If so, how should I notify the user and when? If is not the right way to go, how would you do it?

  • Why do the template's parameters have values? Are they actually default values? – Danny Varod Feb 26 '12 at 13:34
  • Can you add some more concrete details about what these abstract Objects, Parameters, Values and Templates actually are? It's hard to guess how users might react in these scenarios when the context is so abstract. – peteorpeter Feb 28 '12 at 22:00
  • Is a programming interface, Objects Parameters and Values are the actual concrete details that I am talking about. And yes the template has values because there are default values. – Davide Feb 29 '12 at 9:56

As far as I understand your question, there isn't a single answer. A good answer however could be based on the way the team over at Balsamiq has implemented Symbols. To relate this to your example:

Object == Mockup
Template == Symbol
Parameter == Objects
Values == Properties of the objects

When you edit the Object, Parameters that were added as part of a Template will have a different background colour, to indicate their inheritance. When editing the Values of these Parameters, only the values that are edited have a different font colour.

Balsamiq pulled off two other neat things:

  • Unedited Values maintain their inheritance even if other Values in the same Parameter lost theirs after changes.
  • It is easy to revert the change and re-inherit Values from the Template

Multiple templates can also be grouped to make up another Template, while remaining independent Templates in their own right. Parameters also generally have multiple Values.

Here's their full guide on Working with Symbols if you want to find out more.


Let me attempt to approach to a solution, although this is not 100% related to this forum.

Understanding with an analogy

Let's say you are trying to create a recipe(final product) and the Objects are the "ingredients", the Parameter for every Object can be "measure"[sticking with your assumption each parameter has one value for now], and what amount of the ingredient is to be used in the recipe is the "value" of the measure of that ingredient. To summarize:

  • Objects == Ingredients
  • Parameter == Measure of Ingredient[one of tbsp/grams/litres/count]
  • Value == Amount of Measure of Ingrdient [half tbsp of salt/one litre of water]

I am assuming that a template refers to parameters of a single Object.


Predefined templates can be shown green in color, when dragged/dropped while preparing the recipe. When the user picks the template as-is, then throughout the usage you can keep its color as green. When the user tries to modify an existing template, you can change the color of the component, and ask the user to save it for re-use later.


Your templates for each object can be implemented as factory method design pattern.A good example for this implementation can be the BorderFactory class in JAVA, where for creating a border, various parameters like Type/Thickness/Shadow-Color/BG-Color etc are provided in a method and a concrete border is provided through this design-pattern.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.