Open hugodahl opened 5 years ago
The pattern that feels most obvious or natural to me at this time, is to Have a directory structures (source and deployment) along these lines:
+-----------------------------------------------+
| |
| [Project Root] |
| + |
| | |
| +---+ Root files* |
| | |
| | |
| +---+ /Actions |
| | | |
| | +--+ /MyCustomAction01 |
| | | | |
| | | +---+ [Compiled code files for Action] |
| | | | |
| | | +---+ /Assets |
| | | | |
| | | +---+ /PluginInspector |
| | | |
| | | |
| | +---+ /MyCustomAction02 |
| | | |
| | | |
| | +---+ /MyCustomAction03 |
| | | |
| | | |
| | +---+ /MyCustomAction04 |
| | |
| | |
| +---+ /PluginInspector |
| | |
| | |
| +---+ [Shared PI files] |
| |
+-----------------------------------------------+
+--------------------------------------------------------------+
| |
| [Build Root] |
| + |
| | |
| +----+ manifest.json |
| | |
| +----+ Plugin.exe |
| | |
| +----+ [other files supporting the .exe] |
| | |
| +----+ /PluginInspector |
| | |
| | |
| +---+ [Shared PI files] |
| | |
| | |
| +---+ Actions |
| | |
| | |
| +---+ /MyCustomAction01 |
| | | |
| | +---+ [Copy of src/Actions/MyCustomAction01/PI] |
| | |
| | |
| | |
| +---+ /MyCustomAction01 |
| | | |
| | +---+ [Copycofrsrc/Actions/MyCustomAction02/PI] |
| | |
| | |
| +---+ /MyCustomAction01 |
| | |
| +---+ [Copycofrsrc/Actions/MyCustomAction03/PI] |
| |
+--------------------------------------------------------------+
Two notable issue with this layout is that there is additional management needed to take the Property Inspector directories from the individual actions into the deployed PluginInspector
directory, and similarly with the images.
Preface
I wanted to bring this up for discussion before making any changes since the implications are quite far-reaching. I also I didn't feel it would be a wise use of time, nor would it be considerate, to start applying or imposing a pattern without community involvement.
The Issue With the Current Structure
In working through the multiple action support, and then having @codingbandit's changes integrated, it dawned on me that our current directory structure, in both the sample as well as the template, is not sustainable for a few reasons.
xxxAction.cs
file in the same root directoryplugin_inspector
directoryBenefits of the Current Structure
There are benefits which we can take from the current structure and apply as a good example or best/recommended practice. The one which immediately comes to mind is the plugin inspectors, and how they can share common resources -
*.js
,*.css
,*.html
, and such files.Needs
What we really need is to a) identify and prioritize potential pain points and pitfalls, b) determine which issues must be addressed through best practice examples, and which are acceptable with simple guidance provided, and c) implement the changes as agreed upon.
Issues (in no specific or ranked order)
.cs
file, the root directory can get to feeling cluttered very quicklyConnectionManager
,BaseStreamDeckAction
) from the rest of the implementation of the custom actions?Closing
I have some thoughts (and opinions) on how I envision the project being structured, which I will detail in a later comment, however, I would also like to get some feedback and comments on whether this really is an issue which should be addressed at this time (am I a gun jumping alarmist?), and so, thoughts, opinions, and feedback on possible structure.