Fable and .Net integration

I have seen some interest to create .Net integrations there’s even a .Net core SSR template if I’m not mistaken and I want to throw this to the air just to discuss and see if there could be something that can be accomplished.

Fable is an F# to Javascript compiler (plays the same role as typescript) and it has been quite successful in the F# community for a while now, there are a bunch of projects that target web, the most prominent that comes to my mind right now is the SAFE Stack which picks a bunch of .Net technologies along with Fable to produce Fullstack .Net Applications (in F# that is)

Now, the predominant and targeted JS framework most of the time is React by its functional nature either by providing bindings or even mimicking the react API itself the most common architectural pattern seen in those applications is the Elm Architecture via Elmish. The Elmish library pattern has even reached desktop and mobile within the F# community, and there has been some talk about a slightly different DSL that looks similar to Swift UI

I previously made some attempts at creating bindings for Aurelia v1 but I was not able to figure out something meaningful and since I kind of expected vNext has a more approachable API (and I’ve heard about JSX support here and there) I thought there could be some way to have a better approach for vNext in this regard

Now I want to remind you that F# is not a Functional only programming language, it’s just functional first :slight_smile: as Don Syme (F# language designer) mentioned

The F# community is similar to the javascript community they are pretty much open and love to discuss and reach to great solutions together I’m sure if there were efforts to provide Aurelia integration in the F# world there could be some interesting interactions that could lead to some cool projects

Having said that as context…


I believe aurelia has pretty good ways to create web applications and is very very powerful I would like to see that in the .Net ecosystem that seems to be fixated on React as the only way to do web development under the covers, Aurelia embraces the standards, meaning that it presents ways to do better integration with the rest of the ecosystem than react (you know, once you do stuff in react it’s likely to be just react, no Web Components or other non-react libraries without fighting react a bit)


These are some of the Benefits I can see from this suggestion.

  1. Reach Full .Net stack from the top to the bottom
  2. Rich interactions between the javascript ecosystem + .Net ecosystem
  3. A Broader audience available for Aurelia


I can see a couple of approaches that can be taken in this regard

  1. DSL a la React
  2. DSL that caters the JS/TS Developers

In both cases, Aurelia bindings for Fable (think of them as Typescript Definitions) are needed these can be approached once the vNext API is nearly full stabilized


The effort from the part of the Aurelia Team would be to keep maintaining aurelia :grin: this can be a community effort and perhaps some guidance/advice on how the Aurelia API would be utilized better in that context.

If this gets some interest from the communities I would be willing to work on this though I have little experience creating DSLs


But yeah… I’ll just throw this to the air and let me know if it sounds interesting or it’s just a waste of time