cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Add documentation and examples to ThingWorx Code Snippets

Add documentation and examples to ThingWorx Code Snippets

As a recent post by The Great Vladimir reminds us, there are an enormous amount of valuable code snippets available in ThingWorx.

 

In my view, these built-in code snippets are a major part of the ThingWorx value proposition - however are mostly unusable as they do not have sufficient documentation and examples in order to a) know what they do, and b) be able to apply them to tasks in your own code.

 

My suggestion would be that SHORT documentation and examples be added within ALL of the code snippets.  This way the snippets and their doc/examples are managed within the code and do not require a separate documentation section which may get out of date, needs translation, etc.

 

Here are some examples of what the documentation should include:

  • What the snippet does
  • Required and optional parameters
  • Explanation of the parameters (what does the input data look like, what will be output)
  • Example working code snippet with input data

 

Certain explanations on commonly used input parameters should also however be improved as the have been lacking in the past (query, filter, ...).

 

5 Comments
VladimirRosu
18-Opal

I also suggest we should enhance the snippet documentation (either by adding a specific section in the help center or by improving the snippet description itself).

There are three big reasons why we need investment here:

-snippets are crucial for rapid development in the platform; as a developer you need to be able to understand them fast to be productive.

-many people, especially when starting fresh with the platform are not aware of the large amount of snippets, and because of this I have seen they duplicated the snippet functionality many times.

-A proper one stop shop documentation for all of the snippets would greatly benefit everybody. Many of these are documented in Knowledge Support Articles (kudos here to my Tech Support collegues, I know I've used many times their articles). However, that results in two locations where a person must search, which I believe should not be the case.

olivierlp
Community Manager
Status changed to: Under Consideration

Will consider for future release.

StefanBode
10-Marble

Sounds great for me, too. My expectation to find more info and help is a right-click on the snippet and then get directly routed into the thingworx 9 documentation where specifically this snippet is explained in detail with examples and so on.

VladimirRosu
18-Opal

Spot on, yes, that would be perfect.

atiwari-4
12-Amethyst
Status changed to: Under Consideration

Hello, ThingWorx community users,

This idea is under consideration and we're looking to prioritize adding examples and documentation to frequently used code snippets first. This is currently targeted for the CY2024 timeframe. Thank you.

 

Regards,

Ayush Tiwari

Director, ThingWorx Product Management