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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Documentation of code - ThingWorx best practices

hortemt
3-Newcomer

Documentation of code - ThingWorx best practices

Hi, I work for an FDA regulated company that requires a stringent documentation process of code. Is there a best practice or strategy for using the 'documentation' section of each entity?

ACCEPTED SOLUTION

Accepted Solutions

Hi Thomas,

I don't think so.

The options you have to documentate code:

  • Entity level Documentation as you said
  • Services
    • Description field at Service Level
    • Each Input parameter has it's own Description section
    • Output has it's own Description section
    • Code
      • You can use standard Javascript comments ( /* */ and // )
  • Properties
    • Have a Description field
  • Subscriptions
    • Doesn't have any Description Section you will have to relay on Inner Javascript comments or enforce to always on the inner code call a Thing's Service which it's documented
  • Events
    • Have a Description Section

Just one last perk, when you save an entity on the composer if you click on the button next to Save you can write a comment on what's modified.

As you can see TW it's well designed to documentate everything, where it fails it's then if you want to generate a "printable" version of everything you had write on previous parts. But you can enter on "Server" view and see everything you documented: "yourServer"/Thingworx/Server

View solution in original post

3 REPLIES 3
CRArko
17-Peridot
(To:hortemt)

Hi, Thomas.

I'm not sure that we have specific documentation that calls this out. Let me see what advice I can get for you here.

Thanks,

-- Craig A.

Hi Thomas,

I don't think so.

The options you have to documentate code:

  • Entity level Documentation as you said
  • Services
    • Description field at Service Level
    • Each Input parameter has it's own Description section
    • Output has it's own Description section
    • Code
      • You can use standard Javascript comments ( /* */ and // )
  • Properties
    • Have a Description field
  • Subscriptions
    • Doesn't have any Description Section you will have to relay on Inner Javascript comments or enforce to always on the inner code call a Thing's Service which it's documented
  • Events
    • Have a Description Section

Just one last perk, when you save an entity on the composer if you click on the button next to Save you can write a comment on what's modified.

As you can see TW it's well designed to documentate everything, where it fails it's then if you want to generate a "printable" version of everything you had write on previous parts. But you can enter on "Server" view and see everything you documented: "yourServer"/Thingworx/Server

This is helpful, thank you!

Announcements


Top Tags