You should strive for a sustainable solutionbe careful with the Google Apps Script functional examples
Having seen this at +Autodesk
it inspired us to share an important experience with you. Some of you will not aim for a solution that can be adapted to new requirements without putting the running apps at risk. But if you are keen to master Google Apps Script in order to deliver a solution for a more complicated workflow, you may benefit from this hint.
First have a look at the image. Would you cut the cord, blend a washing machine with a bicycle ergometer and present the design to the public? There is a ton of problems to be solved prior to a comercial product, but the most important problem is acceptance by the customer and the second problem is to be faster than competition.
How can you test acceptance without exposing your solution in public?
With the implementation style of the exmples you can implement the working prototype of many Google Apps Script applications, but do not expect it to be easy to change them. Just write something down, show it, collect feedback and make sure there is a demand.
As soon as you know how the app should work and look like, make an object class design, even for the smallest object such as a folder name or a file name if you e.g. apply specific naming conventions.
We lost momentum because we tried to deploy a solution based on libraries and functions. Encapsulation is mandatory and without inheritance, it will be very difficult to adopt to changing requirements.
If you are interested in the details of what we found out, just leave a comment with a specific question to this post.