Author Topic: 'Utility' plugin - or multiple separate plugins?  (Read 10485 times)

Tenebrous

  • Newbie
  • *
  • Posts: 10
'Utility' plugin - or multiple separate plugins?
« on: May 03, 2016, 09:06:21 AM »
Hello!

I'm working on a few utility plugins and wondered what everyone's opinions were on combining them all into one, or having them separated out?

A couple of things I'm working on are:
  • Log file monitor
    Tell the plugin which log file(s) to monitor and you can set up an event loop to read any new lines as and when they appear
    I'm currently using this to monitor the SteamVR log files and announce via TTS when my headset or controllers lose tracking (for example).

  • String processing
    Basically works using the same token commands that VA uses, but in 'reverse'.
    e.g. Give it "Hello world how are you?", and the formatting instruction "Hello {STR:Who} how are {STR:Person}?" and it'll return the variables Who=world and Person=you

Would it be better to have these small plugins seperate, or combine them into one VAUtilities plugin (or such like)?

Slan

  • Global Moderator
  • Newbie
  • *****
  • Posts: 30
Re: 'Utility' plugin - or multiple separate plugins?
« Reply #1 on: May 04, 2016, 05:51:15 PM »
I would say keep them distinct plugins as they do distinctly different things.

That way one large plugin is less likely to break something :)

Just a note on the string processing. I think Luca D, one of the more prolific plugin authors did something with string processing, but I am getting old and my memory is not what it was.
Might be worthwhile checking with him/on the old forums so you do not duplicate effort or waste your time.

Antaniserse

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 87
    • My VA plugins
Re: 'Utility' plugin - or multiple separate plugins?
« Reply #2 on: May 05, 2016, 12:09:30 AM »
Just a note on the string processing. I think Luca D, one of the more prolific plugin authors did something with string processing, but I am getting old and my memory is not what it was.
Might be worthwhile checking with him/on the old forums so you do not duplicate effort or waste your time.
Luca here... I mostly did stuff that involved file manipulations, but not this kind of "reverse token" parsing, so no time wasted there ;)

Personally, i started with smaller, distinct plugins, but went on to aggregate more into a single entity (as long as the concept of the functions is roughly the same, in my case mostly file handling) so that i had not to duplicate a bulk of the code i was using...

Also, but this is just a speculation on my part, I was of the idea that when you start to mixing up call to different functions in your profiles, there would probably be a slighly small overhead if they were all on the same DLL, instead of split into multiple plugins
"I am not perfect and neither was my career. In the end tennis is like life, messy."
Marat Safin

Tenebrous

  • Newbie
  • *
  • Posts: 10
Re: 'Utility' plugin - or multiple separate plugins?
« Reply #3 on: May 05, 2016, 03:12:28 AM »
I think both ways have pros and cons.

Having them all in one plugin is easier to manage code/developer-wise.  Having them separate allows people to pick and choose which ones they want.

I'll keep them separate for now.

And I don't think there's any difference in overhead when calling - I'm assuming that VA does all the reflection needed when it starts up and checks the plugins.