Atomic Components
Atomic components are made up of ThingWorx modeling entities. User interface widgets are examples of atomic components.
Types of Atomic Components
The types of atomic components are:
Model
Services
Data Adapter
User interface
Creating Model Atomic Component
Consider the following best practices when you create the model atomic component:
To create a component with configurable parameters, use configuration tables on Thing Templates. In the configuration table, you can define and collect data for parameters that should be configurable.
Things represent physical devices, assets, products, systems, people, or processes that have properties and business logic. An application should work even if the Things just implement all the required Thing Shapes without extending the out-of-the-box Thing Templates.
A Thing can have Data Tables and Value Streams associated to it. If the Thing along with the model entities is shared with a group of physical assets, then the Data Table and Value Stream must also be shared.
Extend and customize the component, as required. See the section Extending and Customizing a Component, for more information.
Creating Service Atomic Component
Consider the following best practices when you create the service atomic component:
It is recommended to use Thing Templates and Thing Shapes to create services for an atomic component. Whenever possible, define the services in Thing Shapes. See the section Creating Components Using Thing Shapes, for more details.
If possible, implement services in JavaScript.
Users should be able to override the services. This enables the users to replace the out-of-the-box services with their own customized services.
It is recommended not to share the services. If you want to reuse services defined in a Thing Shape or Thing Template in an application, you must create a new Thing implementing the Thing Shape or Thing Template that contains the required service.
Extend and customize the component as required. See the section Extending and Customizing a Component, for more information.
Creating a Data Adapter Atomic Component
The best practices recommended for services also apply to data adapters. In addition, consider the following best practices when you create the data adapter atomic component:
Implement security, authentication, and access control in this layer.
Minimize the business logic related to the application in this component.
Data adapter is a pure data fetching layer. It does not implement any business logic.
While working with large data sets, the data adapter must support pagination.
An adapter can be shared with various components such as models and services.
Data aggregation happens at the service component level.
Creating a User Interface Atomic Component
Consider the following best practices when you create the user interface atomic component:
Use ThingWorx widgets to create the user interface. The widgets should not contain any ThingWorx services because the user interface should not contain any business logic.
* 
These widgets are the out-of-the-box ThingWorx widgets. They have not been created using the SDK.
Develop the user interface using JavaScript.
The following visualization elements should be non-editable to support upgrades:
Media
Style
State definition
Static menu
Was this helpful?