I dont know the source of the Plugin Interface in detail, because I am very new in developing plugins for vvvv via C# but there are some things I recognized, that may be improved. I dont know how hard they are to be realized, but I just want to list some things.
-
Values of Pin Inputs can be passed via Return Value and not as out reference (would save a lot of lines of code an variable declaration) Instead of {CODE(ln=>2)}double tValue;^ {CODE(ln=>2)}FInputPin.GetValue(OnDevice, out tValue);^ you can pass it like this {CODE(ln=>2)}double tValue = FInputPin.GetValue(OnDevice)^
-
Another thing is how to make the edges typesafe without developing a lot of new interfaces for each new edge type the user want to use. Instead of declaring the type of an input via {CODE(ln=>2)}private IValueIn FSomeInput^ and creating the input via the Host method **{CODE(ln=>2)}FHost.CreateValueInput(…^**I would suggest to use Generics for the type safety for an edge, maybe like {CODE(ln=>2)}private INodeIn FSomeInput^ in combination with the creation **{CODE(ln=>2)}FHost.CreateInput<“double”>(… (" excluded)^**This would reduce the amount of needed interfaces and in addition, the users can define their own edge types on the fly without creating a new interface. I know the parameter list depends on the edgetype, but it should just be a first hint, in which direction it could go.
-
Another thing I recognized was the creation of the EnumInputs, actually they are no enums, they are arrays of strings. This is always risky, because of the fact, that you have to compare strings all the time in you plugin, and this is always a risk for spelling mistakes, so why not passing a real enum and use Reflections for reading the enum values to create the input strings. Of course, we would have to handle how the selected enum value could be passed to the user in the evaluate loop.
As I said, I got no detailed background knowledge about the Plugin Interface framework, because I didnt got the time for a detailed view. All these things just should be suggestions to give you guys my view on the items, that might be improved.
Sometimes, a foreign eye on the code might see things, that a developer, who wrote the code cant see, I made those experiences on my own a lot of times.
CYA