Best Practices for Developing Solutions > Building ThingWorx Solutions Using Reusable Components > Best Practices for Packaging and Versioning Reusable Components
Best Practices for Packaging and Versioning Reusable Components
Use the following best practices while packaging and versioning reusable components.
Packaging Reusable Components
Consider the following points while packaging the components:
The version of a component should be based on the version of its extension.
It is important to finalize the name of the extension and the location of components in an extension. Once an extension is created, it is difficult to rename it and move the components in the extension. See the section Extension Name and Version Convention for more information.
If two components are dependent on a common third component, ensure that the common component is packaged as a separate extension.
For example, consider three components A, B, and, C, which are bundled as individual extensions. Based on these three components, two extensions are created with a combination of components.
Extension1—Contains components A and B.
Extension2—Contains components C and B.
In this case, Extension1 and Extension2 both are dependent on component B. Bundling component B as separate extension ensures that the dependencies are easily resolved.
See the section Packaging and Deploying Solutions Built on the ThingWorx Platform for more information on packaging extensions.
Versioning Reusable Components
Consider the following points while versioning the components:
Versioning is applied to extensions. To version components, you must bundle them in extensions.
Use the <major>.<minor>.<patch> format to version an extension. Extensions follow the semantic versioning rules. See Semantic Versioning for more information.
See the section Packaging and Deploying Solutions Built on the ThingWorx Platform for more information on versioning extensions.
Was this helpful?