studio status report: 2023-08
month 08 of 2023 was about virtually finishing the Songhay.Player.ProgressiveAudio
project
I do not need to talk to myself about “the definition of done.” Yes, Songhay.Player.ProgressiveAudio
release 6.0.0” [GitHub] is still incomplete but a major blocker that was in the way of completion is done 🎊
The major blocker was about Presentation
credits data (from my ancient relationship with Microsoft InfoPath) being ‘too unstructured.’ I knew about this issue as early as three months ago (see “there is more than one Presentation
credits HTML micro-format”). However, I wasted my time by approaching the challenge with regular expressions as the solution. I explored this Regex
-based angle in an abandoned Jupyter notebook which was abandoned when I remembered one of my classic architectural principles:
Prefer XHTML over HTML which will allow the declarative UI to be processed as data.
With an old, eco-conscious lightbulb 💡🧓 fished out of the kitchen drawer, I started a new Jupyter notebook and explored the XDocument
-based angle with great success 🎊 This success was directed into what is meant to be the last issue of Songhay.Modules.Publications
release 6.3.0 📦🚀 [GitHub].
This Songhay.Modules.Publications
project along with the “songhay
release 0.3.5
📦🚀” project make two NuGet package releases that support the virtually finished “Songhay.Player.ProgressiveAudio
release 6.0.0” project. One small point being made here is that this Songhay.Player.ProgressiveAudio
project depends on other projects. This approach introduces delays but should have long term benefits for the sake of reusability and reliability.
Unlike the tangled density of three months ago, the Obsidian graph for this month is relatively tame:
It looks like the graph is saying that most of the notes were about .NET, Bolero and Azure DevOps. Let’s see:
[[Songhay Player - Progressive Audio (F♯)]]: adding ProgressiveAudioModel.elmishServices
to pass dispatch
to the [[Elmish]] model
To solve the design problem of pointing a browser-based animation-frame loop at a [[WebAssembly]] routine with the [[Bolero]] stack, I see only three options:
- send the visual component where the routine is defined to the
model
-update (for theDotNetObjectReference
to pass to the browser) - send a
dispatch
reference to themodel
where the routine is defined (andmodel
is theDotNetObjectReference
to pass to the browser) - define the routine in a custom type which will be the
DotNetObjectReference
to pass to the browser; this custom object would then need adispatch
reference
Today I choose option 2 which starts with the means of passing dispatch
with case InitializeElmishServices
:
This message will be used to pass dispatch
to the conventional [[Elmish]] model
:
[!warning] The
Dispatch<_>
type destroys the “structural equality” of the [[Elmish]]model
, forcing the use of the[<NoEquality; NoComparison>]
attribute.
An annoying side effect of this structural equality issue is this mess:
A shouldRender
function could be centralized on the ProgressiveAudioModel
.
[!important]
Option 3 might be a viable option when I find that is not that different from option 2 but the structural equality issue is avoided.
Then the dispatch
instance is dispatched in the top-level component:
[!important] The [[Elmish]]
Program.Dispatch
property is of typeStudioFloorMessage -> unit
The [[Elmish]] update chain responds to this dispatch:
Now, finally, the dispatcher on model
can be used in the browser-driven animation loop:
[[Songhay Player - Progressive Audio (F♯)]]: option 1 works!
My option 1 [[2023-08-05#Songhay Player - Progressive Audio (F♯) adding ProgressiveAudioModel.elmishServices
to pass dispatch
to the Elmish model
|from yesterday]] works! This works without the “structural equality” problems of option 2 mentioned previously1! No concept of elmishServices
is needed. Instead, the model
adds playerControlsRef
to blazorServices
:
This makes sense because a reference to Component
(which is the base type for all [[Bolero]] components) is needed here for JavaScript interop via the IJSRuntime
.
1 I failed to understand that adding a field of a function type to a record destroys structural equality.
now i understand why the MDN folks call them “custom properties” instead of “CSS variables”
When we see the CSSStyleDeclaration.setProperty()
method [📖 docs ], it is clear that the first argument is called propertyName
—but look at my CodePen:
rx.CssUtility.setComputedStylePropertyValue(target, '--target-animation-name', 'fadeout');
I am passing '--target-animation-name'
which will be passed to the propertyName
argument of CSSStyleDeclaration.setProperty()
[🔗 GitHub ]. This has been a very strong hint that --target-animation-name
is a custom property—and this explains why the var()
CSS function [📖 docs ] is needed to ‘convert’ the custom property into a variable.
[[Songhay Modules Publications (F♯)]]: remember the Presentation
credits issue?
I clearly forgot about the Presentation
credits issue which was discovered on [[2023-05-15#Songhay Player - Progressive Audio (F♯) and Jupyter notebooks there is more than one Presentation
credits HTML micro-format 😐 | 05-15]]. I whipped up a Jupyter notebook to just look at the issue but did nothing else—most likely because months of misery was spent on a single issue for [[Songhay Player - Progressive Audio (F♯)]].
[[dotnet|.NET]]: “Remove Moq From Your .NET Projects Right NOW!” #to-do
Yeah, this is serious:
uselessly complaining to [[Microsoft]] about [[Azure App Service]]
By switching over to TLS (or HTTPS) my Azure App Service bill skyrocketed event though certificates have been free for years. But Microsoft has eagerly added indirect costs to this effectively free security feature with no recognition of this as a problem let alone offering a promise to improve on this.
sketching out development projects
The current, unfinished public projects on GitHub:
- finish the “
Songhay.Modules.Publications
release 6.3.0 📦🚀” project - finish the “
Songhay.Player.ProgressiveAudio
release 6.0.0” project - start the “
SonghayCore
📦✨ release 6.0.5” project
The proposed project items:
- replace the Angular app in
http://kintespace.com/player.html
with a Bolero app 🚜🔥 - add kinté space presentations support to
Songhay.Player.YouTube
🔨 🚜✨ - generate Publication indices from LiteDB for
Songhay.Publications.KinteSpace
- generate a new repo with proposed name,
Songhay.Modules.Bolero.Index
✨🚧 and add a GitHub Project - switch Studio from Material Design to Bulma 💄 ➡️ 💄✨