@cs/mva-viewable

MVA Viewable

All the user interface pieces to assemble and run a complete (with UI) MVA separation of concerns application on a PC. This package is a dependency of the complete MVA Framework, which extends mva-viewable by adding more bells and whistles.

Important Semantics

Come back and reread this section after getting familiar with the framework.

  • Viewable hierarchies (Viewables nested in ViewManagers) launch automatically at startup if properly assembled before launch using framework constructors.
  • There is no limit to the depth of Viewable hierarchies (ViewManagers can contain any depth of nested ViewManagers and Viewables)
  • By default, events aggregated in Viewables and ViewManagers propagate up to the ViewModel (root).

Conditional Symbols

Application framework logging tracks the launching, stopping and collection of framework actors. The following conditional symbols can add or remove logging to suit your need and preference:

  • Default (no project-defined symbols) - Log basic events like launch, stop, error, and collection.
  • ENABLE_VERBOSE_LOG - Log all of the Default stuff, plus extra mediation activity.
  • REMOVE_FRAMEWORK_LOG - Log nothing for enhanced performance or because you just like that fresh commando feeling.

Included Components

EventAggregator

An ancestor of IViewable that lets Viewable things register for and handle events in Receive [event name] Event overrides in Actor Core right out of the box (no need to make any actor messages). Just register for the desired event in actor's Actor Core override and then override the Receive method.

IViewable

An actor that can be dynamically insterted into a ProtectedSubpanel or shown to provide a user interface. IViewable descends from EventAggregator.

ProtectedSubpanel:

  • Protects subpanels from insertion/removal race conditions.
  • Returns callback message to removed view for optional 'not shown' cleanup.

IViewManager

A viewable actor that arranges (i.e. manages) one or more other views. ViewManagers have one or more protected subpanels through which they manage their views. IViewManager descends from IViewable.

IViewModel

An application root actor responsible for managing top-level viewable state. ViewModel launches mediator, model hierarchy, and viewable hierarchy. IViewModel descends from IViewManager and IViewable.

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Added

Changed

Deprecated

Removed

Fixed

Security

[0.1.1] - 2020-04-03

Fixed

  • Wrong conditional disable flags (and conditionally broken code) in ViewModel. (See Readme for valid conditional flags.)

[0.1.0] - 2020-01-22

Added

  • Initial release of mva viewable components as stand-alone package

Removed

  • IDialogBox removed from this release
MIT License Copyright (c) 2020 Composed Systems, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.