BryanWilhite / Songhay.Dashboard

the visual summary of activity in the Songhay System

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bolero: translate selected `Songhay.Dashboard/Client/src/app/services`

BryanWilhite opened this issue ยท comments

The Bolero docs do not recognize the possibility of calling an API from WebAssembly [๐Ÿ“– docs]. They present remoting [๐Ÿ“– docs] exclusively. In my current state of ignorance, I assume that this preference is for the following architectural reasons:

  • allowing the Wasm to call any remote location from the client side can lead HTTP infrastructure change/maintenance and even secrets adding complexity and possible security flaws exposed on the client
  • Wasm-based HTTP infrastructure could compete architecturally/conceptually with using Wasm as a cache for remoting (via the Web Storage API [๐Ÿ“– MDN])

Today, I assume that designing a โ€œrich clientโ€ with a dependency on one server is easier to maintain than a โ€œrich clientโ€ that knows about many, many servers (with many, many possible authentication strategies).

  • add Songhay.Modules F# library project
  • translate SyndicationFeedItem[ :octocat: GitHub] into Songhay.Modules
  • translate SyndicationFeed [ :octocat: GitHub] into Songhay.Modules
  • complete the steps listed under ๐Ÿ“– https://fsbolero.io/docs/Remoting#defining-the-service
  • replace/translate dashboard-data.store.ts with/to DashboardServiceHandler
  • add IHttpClientFactory pipeline to support Bolero Service Handler(s) [๐Ÿ“– docs]
  • add Oryx :octocat: https://github.com/cognitedata/oryx to consume IHttpClientFactory output
  • add test coverage for the above
dotnet new classlib --name Songhay.Modules --framework net5.0 --language F#
dotnet sln Songhay.Dashboard.Bolero.sln add Songhay.Modules/Songhay.Modules.fsproj

dotnet new nunit --name Songhay.Modules.Tests --framework net5.0 --language F#
dotnet sln Songhay.Dashboard.Bolero.sln add Songhay.Modules.Tests/Songhay.Modules.Tests.fsproj 
dotnet add Songhay.Modules.Tests/Songhay.Modules.Tests.fsproj reference Songhay.Modules/Songhay.Modules.fsproj

i have chosen Oryx :octocat: https://github.com/cognitedata/oryx over FsHttp [ :octocat: https://github.com/fsprojects/FsHttp ] because Oryx does not concern itself with IHttpClientFactory like FsHttp does

the answer to a question among FsHttp issues indicates a history of intentionally wrapping/hiding IHttpClientFactory which competes with the DI features of modern ASP.NET

as of this writing, Oryx and FsHttp are listed as two of the three awesome HTTP client solutions for F#