SmartApp Reusable Function Library


(fxstein) #1

Is there a way to create a dummy SmartApp that just functions as a library of re-useable functions?

There are various best practices around hex conversion, logging, and other common reusables I would love to package up into a library I can use in all of my Apps.

Also would there be a way to auto install such an app when another app requires it, but only do it once even if multiple apps rely on the library?

What would be the syntax to call a function/method of that library?


(Patrick Stuart [@pstuart]) #2

Top of my wish list too. Hopefully soon. Who knows.


(Edward Pope) #3

Yep it is on their wishlist, but they need to get some other things done first. However, maybe a collaboration of developers working with ST to get this accomplished, might help them move it to the top of the list.


(fxstein) #4

I took a stab at creating a SmartLib ‘HelloWorld’ skeleton. Even If I need to copy the functions into my Apps, at least I have a central place to maintain them.

Take a look and feel free to fork and send pull requests with shareable code you’d like to see in that library.

It is very basic for now. I would assume structure would evolve as more and more methods and functions get added.