Epic Objective
This epic tracks the complete decoupling of the legacy pNode class from the Windows Forms UI framework, specifically the TreeNode dependency, by implementing the SOLID-compliant architecture and migration strategy described in issue #67.
Goal
- Achieve a fully testable, UI-agnostic core node data model
- Ensure the core library (
pWordLib) contains no direct references to Windows Forms or TreeNode
- Provide a migration path with minimal disruption to the existing codebase
Tasks (Sub-issues)
- Create SOLID Core Interfaces
- Implement
INodeData and related interfaces in a new Interfaces folder.
- Implement Pure Data Model
- Develop
PNodeData in Implementation folder with no UI dependencies.
- Build Adapter Pattern for UI
- Implement
ITreeNodeAdapter and PNodeTreeAdapter in an Adapters folder to bridge with Windows Forms as needed.
- Add Initial Unit Tests for pWordLib library PR 70
- Build working tests that are debuggable are runable.
- Write Comprehensive Unit Tests - Create a test suite for
PNodeData focusing on data manipulation, attributes, and operations.
- Refactor Existing Code to Use New Interfaces
- Gradually replace direct usage of
pNode/TreeNode with INodeData/adapters throughout the codebase.
- Implement Dependency Injection
- Refactor constructors/services to accept abstractions instead of concrete classes.
- Migrate Serialization and XML Logic
- Move XML/serialization logic out of UI classes into pure service classes.
- Remove Legacy Windows Forms Dependencies
- Deprecate/remove all Windows Forms references from
pWordLib except in adapters.
- Document the Migration and API Changes
- Update documentation to reflect the new architecture and usage patterns.
- Final Cleanup and Legacy Code Removal
- Remove/deprecate the old
pNode class and related obsolete code.
Each of these tasks will be tracked as a sub-issue under this epic. The epic is considered complete when all sub-issues are resolved, and pWordLib is UI-framework agnostic.
Reference: See Refactor pNode to align with solid principles for full context, architecture, and migration phases.
Acceptance Criteria:
- No direct references to
TreeNode or Windows Forms in core library code
- All functionalities covered by unit tests
- Adapters are the only UI-specific bridge
- Documentation and codebase reflect the new design
This issue serves as the parent epic. Please link all related sub-issues here.
Epic Objective
This epic tracks the complete decoupling of the legacy
pNodeclass from the Windows Forms UI framework, specifically theTreeNodedependency, by implementing the SOLID-compliant architecture and migration strategy described in issue #67.Goal
pWordLib) contains no direct references to Windows Forms orTreeNodeTasks (Sub-issues)
INodeDataand related interfaces in a newInterfacesfolder.PNodeDatainImplementationfolder with no UI dependencies.ITreeNodeAdapterandPNodeTreeAdapterin anAdaptersfolder to bridge with Windows Forms as needed.PNodeDatafocusing on data manipulation, attributes, and operations.pNode/TreeNodewithINodeData/adapters throughout the codebase.pWordLibexcept in adapters.pNodeclass and related obsolete code.Each of these tasks will be tracked as a sub-issue under this epic. The epic is considered complete when all sub-issues are resolved, and
pWordLibis UI-framework agnostic.Reference: See Refactor pNode to align with solid principles for full context, architecture, and migration phases.
Acceptance Criteria:
TreeNodeor Windows Forms in core library codeThis issue serves as the parent epic. Please link all related sub-issues here.