Best Practices for Developing Applications > Packaging and Deploying Applications Built on the ThingWorx Platform
Packaging and Deploying Applications Built on the ThingWorx Platform
ThingWorx Platform is a complete end-to-end technology platform. You can use it to develop, deploy, and extend IoT applications.
The IoT applications can be deployed in two ways:
As an extension—An application can be packaged as an extension in a ZIP file. An extension is a collection of entities, resources, and widgets. Users can import extensions into the ThingWorx Platform to work with the IoT solution.
PTC recommends deploying your application as an extension. With extensions it is easier to manage the collection of ThingWorx artifacts. If you are building applications that will be distributed to your customers, it is recommended that you deploy the applications as extensions.
When you create extensions, define your design requirements well in advance. For example, in the initial stages of development, you need to decide whether you want to use a Thing Shape or Thing Template for your modeling requirements, what Organizations and User Groups you need, what permissions to give Users, and so on.
As a collection of entities—An application can be packaged as a collection of entities that can be exported as an XML or binary file if the application is an in-house lightweight solution.
* 
The recommended practice is to bundle the application as an extension.
What is an Extension?
An extension is a collection of entities, resources, and widgets that are used to extend the functionality of the ThingWorx Platform. This collection is packaged as a ZIP file that can be imported to any ThingWorx Platform. It is used to add new functionality.
Entities are created using the ThingWorx Composer. You can create widgets, resources, and Java code using external tools such as Eclipse.
You can use extensions as building blocks for delivering new services or applications for the ThingWorx Platform. You can deliver these building block extensions individually, or you can zip them together for an easy deployment.
Extensions can be deployed on the PTC Marketplace to make them accessible to the PTC customer community.
Why Build an Extension?
Some reasons to build an extension include:
Your solution includes multiple entities that are functionally interdependent.
Your solution depends on a Java library that is not accessible within the ThingWorx Platform.
You want to hide your source code from those who use the extension.
You want to use a custom widget that does not exist on the ThingWorx Platform.
You want a global service that is not associated with an entity resource.
Your organization wants to use a custom directory service or user authorization scheme.
Was this helpful?