* Naming Convetion * Guys, what do you think abou...
# suitescript
n
* Naming Convetion * Guys, what do you think about the classic naming convention <companyAbbr>_<scriptType>_<description> ? When you have multiple scripts (UE, Client & Suitelet) for the same "function", I feel that it's hard to sort them... Example : Netsuite says to use this type of naming... _abc_sue_example.js _abc_ssu_example.js _abc_cs_example.js I would prefer... _abc_example_sue.js _abc_example_ssu.js _abc_example_cs.js Thanks for your feedback 🙂
s
Keep related scripts together in the same folder (i.e. create a folder for this 'function'/project)
👍 1
n
Good idea too 😉
s
this becomes more important as things get more complex - e.g. you have library scripts that are shared between script types for the feature
n
I agree 😉 What's funny is that when we check all the scripts in our instance... The naming convention is not followed even for the bundles from Netsuite 😮
s
In my experience the most useful part of the file naming convention is that first part (the 'company name'). It helps both to find things that are often sorted alphabetically in the UI and to immediately identify scripts written by our company.
n
Sure, but what about in a public bundle ?
s
what do you mean? are you referring to controlling the project folder name?
n
Let's say I want to bundle a function, will I put my company abbreviation?
s
sure, why not? Also, I haven't built a public project using SDF but that's what I'd pick rather than bundles today
n
😄 dunno. Just making sure it was not inappropriate 🙂
s
having a unique name for files in a public bundle is probably more important than otherwise - since it will be installed in accounts for which you have no knowledge of other files?
✔️ 1