1
votes

Xamarin Forms render to nearly every UI platform thinkable. However, they don't render (or perhaps transpile) to HTML and JavaScript.

I envision a rendering engine that takes the Xamarin Forms markup and converts the markup to a HTML form with code generated for data model binding in a similar way to how Xamarin Forms work on iOS, and Android etc.

A lot of people may be taken aback by this concept because the point of Xamarin is to get away from web apps - not move back toward the web. I agree on this. But, at this point in time, we need to build a web (HTML/JavaScript) app. We'd love to design our app so that the forms can be reusable on another platform.

We could create our own markup language that transpiles to HTML/JavaScript, and also to Xamarin Forms. But, this seems silly. Xamarin Forms is already a great middle tier between the conceptual forms, and any given platform. So, why reinvent the wheel?

My question really is: is there a Xamarin Forms to HTML/JavaScript transpiler in existence? What are the kind of hurdles that might exist around building one of these?

1

1 Answers

1
votes

As far as I know, there isn't such a thing. Although it would be great to have such an option, I don't believe we will have it in the near future. The most difficult task would be to translate C# to TypeScript or JavaScript. The only tool I know that's close to what you are asking for is here