Removing AbstractUI requirement from Cores and the SDK #144
Arlodotexe
started this conversation in
General
Replies: 1 comment
-
Since we've received no feedback on this, we'll be moving forward with it based on our own best judgement. See issue #187 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
When designing the core interfaces, one of the questions that we had to ask ourselves is "How will cores provide a generic settings UI to the user in a way that doesn't tie us to a UI framework?"
Ultimately, this led to the creation of AbstractUI, a set of models that represented simple UI elements, and could be abstracted as pure data (to account for out of process cores).
Where we are now
AbstractUI is used in all current cores as creating an AbstractConfigPanel is a requirement to implement
ICore
.Headless cores have always been at the back of my mind during the development of the SDK. Though we've never actually instantiated a core headlessly, it's something I've been creeping towards while evolving the architecture.
While writing documentation for creating a core the other day, in order to make headless cores a standard thing, I made it a suggestion for all cores to expose a configuration object (usually the actual core settings) in the constructor. Again, we hadn't needed this, but I knew we were going to, especially if we published in a nuget package.
Then it dawned on me: The AbstractUI panel only serves to set these settings internally in a core. Why not just set them directly, before the core is ever instantiated?
Proposed changes
With the above in mind, my proposal is to remove
ICore.AbstractConfigPanel
and all dependency on AbstractUI from the SDK.There's a few clear benefits to this:
CoreState.NeedsConfiguration
state to know if you should show the config panel.And also some cons:
Beta Was this translation helpful? Give feedback.
All reactions