|
Sweet Home 3D Forum » List all forums » » Forum: New versions » » » Thread: Wirings plugin » » » » Post: Re: Wirings plugin |
Print at Feb 2, 2026, 8:16:53 PM |
| Posted by Keet at Sep 30, 2025, 10:14:07 AM |
|
Re: Wirings plugin @Daniels118 Daniele, I haven't looked at the source code of the Wirings and Pan3Dview plugins but I suspect that the dependency of the Wirings plugin on the Pan3Dview plugin is because there are one or more functions in it that the Wirings plugin needs. A good reason to avoid double code and maintenance. The usual way in programming is to use a library for shared functions, This avoids double code and double maintenance. A plugin references that library and can use all functions it contains: a single function library that can be used by multiple plugins. It is not unusual that function libraries are big and the actual program that uses it is small. It also promotes 'good programming' because you will automatically (have to) program the functions in the library in a way that they are generic for common use. It looks like you are using the Pan3Dview plugin as a "library" for the Wirings plugin. If that is indeed what happens then I suggest that you move all generic functions into a library and have both plugins reference that library. I primarily program in C# and I have created multiple libraries that I can use for new programs. Over time creating new programs becomes easier and easier because a lot of work is already done in the libraries. And the good thing is: you can reference a hundred custom libraires and if your plugin only uses a single function from one of them only that function is loaded in memory, and only if it is actually called. It's called Dynamic Loading and I'm pretty sure Java does the same as C#. Another tip when using libraries: in your plugin you can inherit an object from the library and extend it for that plugin only. Something to think about when you design objects for your library. If there is another reason for the dependency, I am very interested to hear what it is. Keet ---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects |
|
|
Current timezone is GMT Feb 2, 2026, 8:16:53 PM |