| || |
How to organize scripts.
So I just created a Function, inside an Action called LOGIN,which accepts some parameters. I can call it
myLogin("username","password") and it logs in and it works great.
My question is, where should I put this function? Right now it lives inside an action
But what if I want to call this function from other scripts? I guess it should be inside a Library function file right? But.. when I put it there, where does the repository lives? it lives in the action... so I can't really call the login function from my library without sharing the repository..
What are the best practices to organize the scripts, functions, actions?
Re: How to organize scripts.
I would vote for putting it in a resource Library function.
Normally, I would classify things as functions that would typically be INDEPENDENT from the OR.
Do you have OR's as per Action? If you use Shared OR you'd bypass this issue and be able to use your function at will - which can be very useful.