How rubberduck-vba/mvvm works
This repository is an educational VBA MVVM framework for Excel user interfaces. Its main workflow connects a ViewModel to UI controls through an application context and binding managers, then handles user input, commands, and validation. The README also documents runtime-generated views. Relationships below follow the README; source excerpts were unavailable, so implementation-level wiring beyond those documented relationships is omitted.
Main entry points: BindingManager.cls Binding Manager · PropertyBindingBase.cls Property Binding · ExampleView.frm View / Controls · CommandManager.cls Command Manager
Components 17
Application Core
- View / Controls
src/ExampleView.frm - ViewModel
src/ExampleViewModel.cls - App Context
src/AppContext.cls
Property Binding
- Binding Manager
src/BindingManager.cls - Binding Path
src/BindingPath.cls - Property Binding
src/PropertyBindingBase.cls - Property Notifier
src/PropertyChangeNotifierBase.cls
Command Binding
- Command Manager
src/CommandManager.cls - Command
src/AcceptCommand.cls
Validation
- Validation Manager
src/ValidationManager.cls - Value Validator
src/RequiredStringValidator.cls - Validation Errors
src/ValidationErrors.cls - Error Adorner
src/DefaultErrorAdornerFactory.cls
Dynamic UI
- Dynamic Controls
src/DynamicControls.cls - Container Layout
src/ContainerLayout.cls - Dynamic View
src/ExampleDynamicView.frm
Other components
- User
Connections 21
- User → View / Controls: uses
- App Context → Binding Manager: exposes
- App Context → Command Manager: exposes
- App Context → Validation Manager: exposes
- View / Controls → Binding Manager: binds properties
- Binding Manager → Binding Path: resolves paths
- Binding Manager → Property Binding: creates bindings
- Property Binding → ViewModel: reads and writes
- ViewModel → Property Notifier: notifies changes
- Property Notifier → Property Binding: signals changes
- View / Controls → Command Manager: binds command
- Command Manager → Command: invokes
- Command Manager → View / Controls: enables control
- Property Binding → Value Validator: validates value
- Property Binding → Validation Manager: reports errors
- Validation Manager → Validation Errors: tracks errors
- Validation Manager → Error Adorner: shows cues
- Dynamic View → Dynamic Controls: generates controls
- Dynamic Controls → Container Layout: uses layout
- Dynamic Controls → Binding Manager: creates bindings
- Dynamic View → Binding Manager: applies bindings