.NET Core for Web


#1

Hello everyone!

I’m a C# dev, and I’m also one of those who invested long time in Silverlight and XAML, and shipped gorgeous apps with it. Mostly LoB applications.

As the plugin era is over, and with the death of Silverlight, JS got great glory back again.
Silverlight and RIA services and controls (can you believe that trend is gone!?), and the app development in C#-XAML (will refer to it as CX), cross-platform apps we had in WPF, WinRT, and especially Silverlight (OOB, RIA services), is now all history, and developing cross-platform apps is not out-the-box at all, if you wanna use CX (yeah, Xamarin ain’t outa box at all).
HTML, CSS and JS are hard-coded languages by nature. They will always suck. Nothing will ever make it even close to the CX match.

But now, that .NET core was open-sourced, a .NET core version for JS-enabled systems, i.e. web-browsers is now really an option, with the aid of TypeScript.

And there are two parts to it.

  • The availability of the .NET Core (at least the client-library that
    was supplied with SL - as a beginning).
  • An engine that compiles XAML
    to appropriate HTML5+CSS3, and that’s on top and works with the JS
    BCL (About that I doubt whether this should work on top of the .NET Core with underlying C#, or directly via TS).

Both these tools have been worked on, in many projects, but no project target this goal: Make CX available for web applications.

  • In the JS to .NET field, there is NetJs (See CLR code) among others. Native features can be achieved with projects like Apache-Cordova or the like.
  • About the XAML, there is the awesome Fayde project, that converts XAML to HTML5 and CSS3, but in the other hand uses TS as the backing language.

I think that as a first stage, we have to figure out what’s the proper way to port .NET Core to TS (and in turn, to JS).
Obviously it would be best to have the coreclr and corefx repos compiled to TS directly, and this is even easier to achieve on the fx project. About the coreclr, I believe that a TS mirror will have to be built from scratch, and as soon as we have it, we will be able to compile the fx project on top of that.
Please share your ideas and help figuring out the proper way to achieve this goal.
And let’s not forget about Roslyn, I believe we can build a compiler that compiles C#/VB code against our TS library.

If we accomplish this goal it could then be taken forward to support Mac and Linux OOB apps using Apache Cordova.
I do hope MS open sources XAML’s libraries which will then enable us to have native support for Mac/Linux.


Cross platform WPF
#2

This is already being done I think. Have you seen: http://cshtml5.com/
There have also been other similar ones as well I think.


#3

A stronger adoption and promotion of JSIL by anyone who considers themselves a MSFT developer is required. :smile:


#4

@DragonSpark Yes. JSIL is a very good basis towards the goal.
I think all the tools are there, they just need to be compiled together to serve one clear goal:

Unfortunately I’m not sure the community believes in XAML anymore. HCJ has unfortunately become the market leader, and MS is giving up XAML.


#5

When you say “market leader” it’s probably more apt to say defacto standard, and that is perfectly acceptable, even desired. Now there is a standard, and companies are more than able to build around that standard with any technology they desire as long as it adheres to this standard. CX and HCJ are not mutually exclusive forces. :slight_smile:

Btw, I am not sure what community you are talking about. Some communities are against Xaml, but as you can see throughout the really great discussions here, Xaml is very much in the game, it just doesn’t have the vision and support by its maker that it once did, which is a shame. Xaml is still used in every major group in MSFT with the exception of ASP.NET, and from my perspective that needs to change. PROTECT THE INVESTMENT! Xaml is an incredible invention and should be preserved by all areas in MSFT.

Unfortunately, that hardly appears to be the case. Even Microsoft is leading very poor and expensive guidance by telling 16 THOUSAND voters to build HTML5 applications instead. You cannot share code/components between HTML5 and .NET applications, so this guidance is very confusing, dangerous, and divisive! Not to mention expensive in the case of code and resources needed to implement this guidance.

But yes, exactly what you said, @Shimmy . What we need is a coherent, unified, movement towards a ubiquitous .NET client application model that will satisfy both native and web scenarios. This is not unlike a political or civil rights movement, in my mind. It has really gotten to that point. .NET is incredible, but its one nagging, constant detractor is the lack of a solid client application model offering. This needs to change. FWIW I am currently building a site to endorse this very cause. I will update this thread when it’s ready. Hopefully in the next week or so!


#6

The site is finally up. You can start by reading the first part in the series here:

The article that references the divisive/broken/expensive guidance can be found here:

Or you can skip straight to the good parts and show your support for this idea by voting here:
http://developers.win/ubiquity

Thank you for any consideration and/or support! :smile:


#7

Well done @DragonSpark, obviously I’ve voted 3.


#8

Thank you for the support, @Shimmy!


#9

It doesn’t target .Net Core, but I think many would be interested by the work at Granular. It re-implements WPF for JS. Still in development, but the future looks bright.


.NET Foundation Website | Blog | Projects | Code of Conduct