Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hello All,
What do you follow as coding best practices within Thingworx Platform. I see that there are Thingworx Modeling best practices videos available.
Can you share what you do as code review best practice in Thingworx?
Preeti
Being that coding in TWX is all Javascript, it's best to just leverage common best practices around Javascript development. For code review, I tend to enforce the following:
service named correctly (Services begin with uppercase)
service has a description
service has a header (at a minimum, developer name and date created)
service has appropriate comments
service has error handling
service input params named correctly (params begin with lowercase)
service has associated unit test
Thanks Wayne.
Wondering if anyone has any other suggestions?
Here you have exactly the same question: https://community.ptc.com/t5/ThingWorx-Developers/Thingworx-Coding-Best-Practices/m-p/615944
Hello,
My personal top-15:
That's all I have in mind for the general coding practices. There are plenty of tips-and-tricks for using different storage mechanisms, mashups, REST calls, etc. -- but the scope is too wide, so for this I would recommend you to take a training, read the docs and ask questions as they arrive. One of ThingWorx strongest points is its ability to prototype very quickly, so the best way to learn it is to practice more.
Regards,
Constantine