-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DynamoCore Modularization #3449
Conversation
@lukechurch This new PR refers to the local branch |
} | ||
|
||
public PackageLoader(DynamoLoader dynamoLoader, ILogger logger, string overridePackageDirectory) | ||
public PackageLoader(string overridePackageDirectory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signature change. No longer requires DynamoLoader or Logger.
} | ||
|
||
public ConnectorModel AddConnection(NodeModel start, NodeModel end, int startIndex, int endIndex, PortType portType = PortType.INPUT ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AddConnection
has been made entirely obsolete: ConnectorModel.Make
performs all of these tasks.
The Big Idea
The architecture of Dynamo was previously a tangled mess of dependencies. This PR refactors
DynamoCore
into a modular, layered architecture, where the boundaries of the various components of the application are clearly defined.Or, in a nutshell, we are no longer accessing
DynamoModel
from remote parts of the application. This means that:What's been changed?
NodeGraph
NodeFactory
has been overhauled; previously we were doing weird string parsing to determine how to create new nodes. Nothing was consistent, the API was cumbersome to use, and there was a ton of duplicate code.NodeFactory
. Different types of nodes registerINodeLoader
instances with theNodeFactory
. For special kinds of nodes (Custom Nodes and Zero Touch Nodes), there are specialINodeLoaders
that handle the necessary extra logic for creating instances. This means thatNodeFactory
no longer needs to know about theFunction
andDSFunction
classes.NodeModel
are now instantiated using a pre-compiledExpression
, as opposed to relying on anActivator
. This means that instantiating large numbers of new nodes should be significantly faster (copy/paste, undo/redo, loading files).CustomNodeManager
has become the primary interface for dealing with Custom Nodes.CustomNodeWorkspaces
, instead of justCustomNodeDefinitions
.CustomNodeWorkspace
now emits events when theCustomNodeDefinition
andCustomNodeInfo
has changed.CustomNodeWorkspace
defines what theCustomNodeDefinition
andCustomNodeInfo
are.CustomNodeManager
, which then forwards them toDynamoModel
, which then propagates them to theEngineController
, Search Library, and Custom Node Instances.Function
) Instances are now created fromCustomNodeManager
, in order to ensure that they are kept in sync with theirCustomNodeDefinition
.HomeWorkspaceModels
are the only kind of Workspaces that can be evaluated,EngineController
has been moved toHomeWorkspaceModel
Consequentially, all logic originally onUnfortunately,DynamoModel
associated withEngineController
has now been moved toHomeWorkspaceModel
CodeBlockNodeModels
have a dependency onEngineController
for Auto-complete. Further work can be done to decouple Auto-complete fromEngineController
, which would allow for total removal ofEngineController
fromDynamoModel
.HomeWorkspaceModels
active at once.Reviewers: