Building an AF Hierarchy - Start with the basic building blocks

Blog Post created by dfsoll on Oct 20, 2017

Before building an AF hierarchy, an implementation should start by building templates, specifically Element Templates.  Templates are AF's way of making your work simpler and easily repeatable.  After performing numerous AF implementations, we have found that the best way to start defining AF templates is to start with a base template, upon which all other templates are derived.  Doing this allows you to add common components to all templates by simply editing the base template.  Note that there is nothing wrong with starting out with a base template that is completely empty as you may not initially have anything that you feel should show up globally in every element.


It is important to understand that there are two distinct hierarchies within AF (when referring to Elements and their templates): The element template inheritance hierarchy and the element instantiation hierarchy.  The element template inheritance hierarchy (viewable by selecting "Arrange by Template Inheritance" from the Element Template's right-click menu) represents how one template inherits components (such as attributes, AF Analytics, and Notifications).  This has nothing to do with the physical structure of the elements themselves.  The physical hierarchy is the layout of the elements themselves, no matter what templates they use. 


There are a number of best-practice recommendations involving the use of AF Element templates, the first of which is that you should never (or at least rarely) create an element that does not inherit from a template.  There are a number of reasons for this: many tools use the template to determine similarity between elements for things like visualization.  Another reason is that it makes adding components (such as  an attribute) simpler since you can edit the template and the element will automatically inherit it.


Another best-practice is to create a "master" or "base" template upon which all other templates are based.  If you follow these two best-practices, it means that you will easily be able to add or modify all elements in a hierarchy by simply editing the base template.