10 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:01:46.484728+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | e01b1b94fbb8ea7a |
Components
Documentation: View and ViewModel Interfaces for Assembly/Tile/Group UI Components
1. Purpose
This module defines a set of interfaces that establish the contract between UI views and their corresponding view models for hierarchical presentation of assembly, tile, and group data. It supports two distinct UI presentation patterns—single-item views (e.g., IAssemblyView, ITileView, IGroupView) and list-of-items views (e.g., IAssemblyListView, ITileListView, IGroupListView)—each paired with a matching view model (*ViewModel). These interfaces are part of a layered architecture where views are UI-layer abstractions (likely bound to XAML or similar), and view models mediate data and commands. The module enables consistent composition of UI hierarchies: a list view contains a list of item views, each backed by its own item view model.
2. Public Interface
View Interfaces (UI Layer Abstractions)
-
IAssemblyView
Namespace:DTS.Common.Interface
Inherits:IBaseView
Represents a single assembly UI view (e.g., a control or panel displaying one assembly). -
IAssemblyListView
Namespace:DTS.Common.Interface
Inherits:IBaseView
Represents a container view for a list ofIAssemblyViewinstances (e.g., a scrollable list of assembly panels). -
ITileView
Namespace:DataPro.Common.Interface
Inherits:IBaseView
Represents a single tile UI view (e.g., a card or grid cell for a tile). -
IGroupView
Namespace:DataPro.Common.Interface
Inherits:IBaseView
Represents a single group UI view (e.g., a section header or container for grouped items). -
ITileListView
Namespace:DataPro.Common.Interface
Inherits:IBaseView
Represents a container view for a list ofITileViewinstances. -
IGroupListView
Namespace:DataPro.Common.Interface
Inherits:IBaseView
Represents a container view for a list ofIGroupViewinstances.
ViewModel Interfaces (Data/Logic Layer Abstractions)
-
IAssemblyViewModel
Namespace:DTS.Common.Interface
Inherits:IBaseViewModelIAssemblyView View { get; set; }– The view instance bound to this model.string GroupName { get; set; }– The group name associated with this assembly.List<AssemblyNameImage> AssemblyList { get; set; }– List of assemblies (typeAssemblyNameImagedefined elsewhere) to display.
Behavior: Manages data for a single assembly view.
-
IAssemblyListViewModel
Namespace:DTS.Common.Interface
Inherits:IBaseViewModelIMainViewModel Parent { get; set; }– Reference to the top-level view model.IAssemblyListView View { get; set; }– The list view instance.List<IAssemblyView> GroupList { get; set; }– List of views (not view models) representing individual assembly groups.
Behavior: Manages a list of assembly views; note thatGroupListholds views, notIAssemblyViewModels.
-
ITileViewModel
Namespace:DataPro.Common.Interface
Inherits:IBaseViewModelITileView View { get; set; }string GroupName { get; set; }List<AssemblyNameImage> AssemblyList { get; set; }
Behavior: Manages data for a single tile view.
-
IGroupViewModel
Namespace:DataPro.Common.Interface
Inherits:IBaseViewModelIGroupView View { get; set; }string GroupName { get; set; }List<AssemblyNameImage> AssemblyList { get; set; }
Behavior: Manages data for a single group view.
-
ITileListViewModel
Namespace:DataPro.Common.Interface
Inherits:IBaseViewModelIMainViewModel Parent { get; set; }ITileListView View { get; set; }List<ITileView> GroupList { get; set; }
Behavior: Manages a list of tile views;GroupListholds views, notITileViewModels.
-
IGroupListViewModel
Namespace:DataPro.Common.Interface
Inherits:IBaseViewModelIMainViewModel Parent { get; set; }IGroupListView View { get; set; }List<IGroupView> GroupList { get; set; }
Behavior: Manages a list of group views;GroupListholds views, notIGroupViewModels.
Note on naming consistency:
DTS.Common.Interfacenamespace is used for assembly-centric interfaces.DataPro.Common.Interfacenamespace is used for tile and group-centric interfaces.
This suggests a historical split between two subsystems (DTS and DataPro) that share similar UI patterns.
3. Invariants
- View–ViewModel Pairing: Each
*ViewModelinterface declares aViewproperty typed to its corresponding*Viewinterface (e.g.,IAssemblyViewModel↔IAssemblyView). This enforces a 1:1 binding contract. - Hierarchical Structure:
*ListViewModelinterfaces (IAssemblyListViewModel,ITileListViewModel,IGroupListViewModel) hold aList<IView>(notIViewModel) in theirGroupListproperty.- This implies that list view models do not directly manage child view models—only the views they contain.
- GroupName Semantics: All item-level view models (
IAssemblyViewModel,ITileViewModel,IGroupViewModel) expose aGroupNameproperty, suggesting that each item belongs to a named group. - AssemblyList Consistency: All item-level view models use
List<AssemblyNameImage>forAssemblyList, indicating uniform data structure for underlying content. - Parent Reference: All list view models expose a
Parentproperty of typeIMainViewModel, enforcing a tree structure rooted at a main view model.
4. Dependencies
Internal Dependencies (from source):
- Base Interfaces:
- All view interfaces inherit from
IBaseView. - All view model interfaces inherit from
IBaseViewModel.
(Exact definitions ofIBaseViewandIBaseViewModelare not provided here but are assumed to be inDTS.Common.BaseorDataPro.Common.Base.)
- All view interfaces inherit from
- Data Types:
AssemblyNameImage(used inAssemblyList) is referenced but not defined in these files. Its definition must exist elsewhere (likely inDTS.Common.BaseorDataPro.Common.Base).
- .NET Framework Types:
System.Collections.Generic.List<T>System.Collections.ObjectModel.Collection<T>(imported but unused in these files)System.Reflection.Assembly(imported but unused in these files)
External Dependencies:
- Consumers:
- UI rendering layers (e.g., WPF/XAML views) must implement
*Viewinterfaces. - View model implementations (e.g.,
AssemblyViewModel,TileListViewModel) must implement*ViewModelinterfaces. IMainViewModelmust be defined elsewhere and is required by all list view models.
- UI rendering layers (e.g., WPF/XAML views) must implement
- Namespaces:
DTS.Common.InterfaceandDataPro.Common.Interfaceare used for view/view model interfaces.DTS.Common.BaseandDataPro.Common.Baseare used for base interfaces.
5. Gotchas
-
Inconsistent Namespace Usage:
Assembly-related interfaces (IAssemblyView,IAssemblyListView,IAssemblyViewModel,IAssemblyListViewModel) reside inDTS.Common.Interface, while tile/group equivalents (ITile*,IGroup*) are inDataPro.Common.Interface. This may reflect legacy code splitting and could cause confusion during refactoring or cross-feature development. -
GroupListHolds Views, Not View Models:
InIAssemblyListViewModel,ITileListViewModel, andIGroupListViewModel, theGroupListproperty is typed asList<IView>, notList<IViewModel>. This breaks typical MVVM patterns where list view models manage child view models. Developers may mistakenly expect to access child view models via this list. -
Unused Imports:
System.Collections.ObjectModelandSystem.Reflectionare imported in several*ViewModelfiles but never used. This may indicate incomplete cleanup or future extensibility (e.g., planned use ofObservableCollection), but currently serves no purpose. -
Ambiguity of
GroupName:
WhileGroupNameis present in all item view models, its semantics (e.g., is it a display name? a grouping key? a category?) are not defined here. Its value may be derived from theAssemblyListor external metadata. -
No Method Signatures:
All interfaces are property-only. No commands or methods are declared, implying behavior is either inIBaseViewModelor handled externally (e.g., via event handlers or command binding in the view layer). This may limit testability or composability. -
No Inheritance Between View Models:
Despite structural similarity, there is no shared base interface for item view models (e.g.,IAssemblyViewModel,ITileViewModel,IGroupViewModelare independent). This duplication may increase maintenance burden. -
No Validation or State Guarantees:
The interfaces do not specify constraints (e.g.,AssemblyListmust be non-null,GroupNamemust be non-empty). Implementers must infer or define such rules elsewhere.
None identified from source alone for behavioral quirks or historical tech debt, but the above structural inconsistencies are notable.