Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

C#+Xaml for web is required! Make it SilverLight X.0! #57

Open
juepiezhongren opened this issue May 12, 2017 · 144 comments
Open

C#+Xaml for web is required! Make it SilverLight X.0! #57

juepiezhongren opened this issue May 12, 2017 · 144 comments

Comments

@juepiezhongren
Copy link

juepiezhongren commented May 12, 2017

Js & Html is a permanent catastrophe, we need a xaml & C# browser but not a plugin like silverlight!
with chakra engine and .net core runtime both shipped, this browser should be compatible with xaml and html.

@juepiezhongren
Copy link
Author

juepiezhongren commented May 12, 2017

[admin (crutkas) removed for inappropriateness]

@GeraudFabien
Copy link

I' not sure if it's the right place for this kind of request. More the things that "kill" Silverlight isn't is xaml support or but the need to install something... The same thinks kill flash.

@ederbond
Copy link

Maybe they can archive this using the WebAssembly

@juepiezhongren
Copy link
Author

@GeraudFabien you r right, it is the installation that kill silverlight, so to make clr built inside the browser could solve the problem!

@juepiezhongren
Copy link
Author

@ederbond ,not want js anymore, the language itself is a infinite problem root for web-development!

@ederbond
Copy link

@juepiezhongren, web assembly is not necessarly js. If I'm not wrong, all major browsers (including Edge) are in early stages of implementing webassembly to be able to run C++. But for what I understood about the webAssembly spec, the browsers are free to implement a runtime to any language. So why not netstandard 2 and xaml standard?

@juepiezhongren
Copy link
Author

@ederbond that will be fantastic.

@topstarai
Copy link

This is an awesome idea. I have ever suggested Microsoft this idea for many times and never gotten any feedback. I believe this is the future of browser.

@juepiezhongren
Copy link
Author

juepiezhongren commented May 15, 2017

[admin (crutkas) removed for inappropriateness]

@cherepets
Copy link

You could take a look at this project:
http://cshtml5.com/

It's basically C# (via jsil) and XAML for UI.

@h82258652
Copy link

@juepiezhongren Dont use chinese here. I hate css too, especially the box model. About javascript, you can use typescript instead, typescript syntax is similar with C#.
By the way, you can try cshtml5.

@GeraudFabien
Copy link

GeraudFabien commented May 15, 2017

@juepiezhongren Microsoft only own Edge and IE how would they built this inside of Chrome and mozilla? Silverlight was shipped with windows.
All After this is my own view.
And failed because it wasn't inside chrome and mozilla (Without accepting it before). The problem is "you need user to bring developper", "you need app to bring user", "you need developper to bring app"... The two only way to avoid problem are

  • Having a big advantage over current solution
    0 Being OSfree (Javascript is osFree )
    0 Cost less (You can't prove it because you need to sandbox your application... and it need work. Enterprise how much it cost with an old techno. Not with a new)
    0 Having app ported on it without work ( One word "sandBox")
    0 Performance (there is no real way to compare performance between two language. I theory Assembler would be the best but in practice it require so much time to write a simple code that you end up doing no big optimisation...)

I can continue but i thinks you see my point. You can't prove that your silverlight nextGen will be best. And even if it are it will be abandonned because :

  • Enterprise will never take the risk (Specially knowing sliverlight history)
  • Security will do evrythinks to erase it from your browser (even built-in) instead of spending billion knowing if it's a thread or not.
  • Manager/Seller will always sell Web project with Javascript because they never heard of your solution.

You may watch for somethinks like http://forums.dotnetfoundation.org/t/wasm-asm-js-plans-projects/1947.

@juepiezhongren
Copy link
Author

@cherepets @h82258652 ,i have tried cshtml5 already, whose performance is really at a beta stage. Besides, jsil has waited for long time without any update, which should be the biggest problem at all.

@juepiezhongren
Copy link
Author

juepiezhongren commented May 15, 2017

@GeraudFabien,from my perspective, a CX browser is not fit for COMMON people first, but for companies first. I come from China, BS is the almost default format in chinese companys' inner systems, and what bothering most is that each IT project enphasizes backends with the staff always OOPers, but unfortunately frontends are always annoying OOPers to postpone dev schemes!

@juepiezhongren juepiezhongren changed the title Xaml browser is required!!!!!!!!!!!! C#+Xaml browser is required!!!!!!!!!!!! May 15, 2017
@topstarai
Copy link

@juepiezhongren As GeraudFabien said, making a decision need to consider a lot of factors. Different people hold different ideas about this,some people support this and some people against this. Microsoft has made it's decision on this. We can't see the future, sometimes, we need to follow our heart-centered path and try to make it true on our own if we think it's worth the effort.

@MovGP0
Copy link

MovGP0 commented May 15, 2017

there was already a solution for XAML in the browser and it was called Silverlight. It wasn't successful. I do not see a reason for Microsoft to make the investment and try this again at the moment. Especially when HTML works fine in those areas.

@GeraudFabien
Copy link

I'm pretty sure XAML - Standart is not the place to talk about this. If you want you can go do Dotnet foundation forum or to UserVoice "https://wpdev.uservoice.com/forums/427690-windows-presentation-foundation-wpf/suggestions/3851845-silverlight-compile-to-html5-or-have-xaml-run-in-b". Or plenty other feed talking about that. (This Uservoice is the first one i found related. Maybe some are more related about this subject)

@juepiezhongren
Copy link
Author

juepiezhongren commented May 16, 2017

@MovGP0 i doubt that Silverlight is unseccessful considering the amount of devs then.
My opinion that CX browser is important is because C# should be a universally full-stack language, where browser is something in lack.
For Microsoft, CX browser could not quickly compete with Chorome, even with Edge. But it could quickly be adopted within enterprise inner BS systems, where browser-installation is never a problem. Any NICHE market is for potential substitutes against current available product.

@Mike-E-angelo
Copy link

(Administrators: please consider creating a "Discussion" tag and flagging this issue accordingly)

there was already a solution for XAML in the browser and it was called Silverlight

Not just Xaml. .NET. :)

It wasn't successful

In implementation indeed. Conceptually, however, it was as viable and important as Xamarin's efforts in porting .NET to iOS and Droid. The web is more important and valuable platform, as it contains a bigger marketplace (~3.5 billion) than both iOS (~1 billion) and Droid (~1.5 billion) combined.

I do not see a reason for Microsoft to make the investment and try this again at the moment. Especially when HTML works fine in those areas.

@MovGP0 have you considered becoming a MSFT program manager? Your perspective and attitude would fit right in. 😆

I kid I kid. Sort of. Keep in mind Silverlight was a subset of WPF, and while its implementation (plugins and non-standard compliance) is what sunk it, it is still very viable idea. Not to mention pragmatic, as now in order to create a .NET solution that matches the market reach of a, say, Node.js solution, you are required to build two incompatible code bases which cannot share the stored knowledge contained in each other.

So tell me, which is more expensive to develop and maintain: one code bases, or two? :) :) :)

Additionally, please feel free to join the thousands of votes asking for exactly this idea here:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/10027638-create-a-ubiquitous-net-client-application-develo

(Additionally additionally, @migueldeicaza has already confirmed that Mono is being ported to WebAssembly. So, happy days ahead y'all. 💃)

(Additionally additionally additionally, WASSAP @ederbond !!!)

@juepiezhongren
Copy link
Author

juepiezhongren commented May 16, 2017

@Mike-EEE @migueldeicaza,miguel es una persona con magia!
is it possible to render the entire view of browser with WASM but without HTML?

@Mike-E-angelo
Copy link

TBH, that part is a little murky to me, @juepiezhongren. Technically what you are asking for is what JSIL (http://jsil.org) and its marketed product/version CSHTML5 already do: employ an HTML5 canvas control and render ALLTHETHINGS in there via WebGL. Unity3D also renders in a web page with WebGL, but they do so via Flash (yes, a plugin!) last I checked.

However, Unity3D is also gearing up for WASM (see: mono), so once that is out it will be easier to see how the rendering is accomplished.

Once the games are in place, the LOBs will follow, IMO. If you can do games, you can do anything. :P Also, if someone wants to make a ton of cash they would be smart/wise to create an adult content platform on WASM. As all successful tech stacks have historically shown, the greater/prevalent the adult content, the greater the adoption. #SexBrowser, indeed. 🎉 👏

@juepiezhongren
Copy link
Author

@Mike-EEE the success for CSHTML5 is strongly in double

@birbilis
Copy link

probably could use XAML with NoesisGUI (say when they also implement some .NET Standard level) via Unity and eventually render to WebGL. Or maybe even skip NoesisGUI if there exists some portable implementation from MS

@birbilis
Copy link

birbilis commented May 16, 2017

In fact even with Silverlight, Microsoft were focusing too much on integration with the browser API and page DOM. Most people don't really care about such a thing. Silverlight was a cool distribution and update mechanism for putting your XAML/.NET app inside a browser and having it addressable via URLs. Such a XAML player which can just accept config parameters (and maybe get scripted from javascript) and send back call results and events/messages to javascript event handlers in the page would be fine. If somebody wants to manipulate the browser objects and page DOM they could then make some layer in the javascript and periodically call into the hosted code (not even js object callbacks are needed like that although they're handy to have - can use event callbacks). That way attack surface and exploits of browser APIs is limited to what one selects to manually expose to the hosted app (e.g. if they accept some string from the hosted app and do an eval at the javascript side, then they've opted to have a bigger attack surface)

@juepiezhongren
Copy link
Author

juepiezhongren commented May 16, 2017

@birbilis that's the origin of performance nightmare.
if WASM will do CX work, the integration catastrophe will continue.
so i suggest a pure CX browser is needed, or at least with js engine and clr both but never interweaved!

@cherepets
Copy link

Also there's Avalonia project for crossplatform XAML UI.
They can render it for desktops and mobile but also for web:
https://www.nuget.org/packages/Avalonia.HtmlRenderer/

@birbilis
Copy link

birbilis commented May 16, 2017

a pure CX browser is something no one will install. Would also have to be crossplatform itself.

See Xamarin Workbooks as a bit of an alternative

https://channel9.msdn.com/Events/Connect/2016/114
https://developer.xamarin.com/guides/cross-platform/workbooks/
https://developer.xamarin.com/workbooks/
https://blog.xamarin.com/introducing-workbooks-inspector/

various workbooks:
https://xamarinhelp.com/introduction-xamarin-workbooks/

@birbilis
Copy link

the Avalonia guys are looking into XAML Standard and contributing feedback for the time being which sounds promising
AvaloniaUI/Avalonia#982

@Mike-E-angelo
Copy link

@Mike-EEE the success for CSHTML5 is strongly in double

Unfortunately @juepiezhongren CSHTML5 (and JSIL on which it is based) does not support PCLs or any way of sharing code between server and client. So, you end with an expensive solution exactly like what we are trying to avoid with JavaScript, but in a different name: two incompatible code bases that cannot leverage shared knowledge between them.

They can render it for desktops and mobile but also for web:

To clarify @cherepets, that is an HTML renderer that would sit in a hosted .NET runtime environment. What we're discussing here is a client HTML environment that hosts and renders a .NET runtime, if that makes sense. 😄

@juepiezhongren
Copy link
Author

@fernandoff that is blazor!!!! It is currently supported by asp team!

@danwalmsley
Copy link

You might be interested in Avalonias discussion on how they might be able to achieve this. AvaloniaUI/Avalonia#1387

@weitzhandler
Copy link

weitzhandler commented Apr 16, 2018

I wish Microsoft officially adopts Avalonia. I like the concept even better than Xamarin.Forms.
As soon as Avalonia is WebAsm supportive it'll be really a shame if MS ignores it.

@fdsmax
Copy link

fdsmax commented Apr 21, 2018

I agree with @weitzhandler Lots of development effort and cost is required for developing html5 and Javascript ajax web pages development when compared xaml based ones as the number of lines that need to be hand coded is lesser in xaml than html and javascript. Infact, xaml to html cross platform applications development could be a significant direction ahead and can reduce development effort and cost significantly besides ensuring Microsoft's goals and market presence in this segment. From my experience with Thulya Social Network development, the cshtml5 seem is still in nascent stages and requires several manual changes to the references and config to make it work outside their simulator and did not work in .net core or asp.net project out of the box. However, Avalonia and Avalonia HTML Renderer seem to be quite stable and supports .net core and standard .net. Looks like Microsoft's investment in XBAP should have been enhanced to make it cross platform inline with Avalonia and CSHTML5. And this could either be part of the Xamarin suite or part of the XBAP itself. These are my thoughts. Thanks.

@weitzhandler
Copy link

I'm just curious, @Mike-EEE & @juepiezhongren and basically everyone in this thread, are mainly LoB app developers?

@Mike-E-angelo
Copy link

@weitzhandler Historically consulting (LoB/consumer/all-of-the-above) with focus recently on startups and consumer-facing scenarios.

Also @diwakarpp CSHTML5 is a great endeavor based on overachieving (and sadly overlooked) tech, but its problem along with that of Bridge.NET and others is that it cannot share code with the server side (by way of .NET Standard or PCL). As a result, you are left with two incompatible codebases you have to develop and maintain, much like you would have to do with pure javascript. More about this can be found here:
http://blog.developers.win/2015/10/existing-net-client-application-models/#cshtml5

@birbilis
Copy link

@weitzhandler well, I wouldn't want to reimplement ClipFlair Studio (http://ClipFlair.net, http://github.com/zoomicon/ClipFlair) in the mess that's called HTML5/Javascript. Too much work and would result in something much harder to maintain.

@weitzhandler
Copy link

weitzhandler commented Apr 24, 2018

@birbilis did you hear me saying anything about HTML/JS? I said Avalonia, which is more XAMLy than XF. The whole purpose of this post is to get JS out.
@juepiezhongren please change the title of the issue, remove Silverlight from there. People hear Silverlight they spontaneously freak out and start cursing cuz they barely know what it actually was and they think it's a plugin, also since they never worked with it and tasted it's awesome madness up close.

@birbilis
Copy link

birbilis commented Apr 24, 2018

@weitzhandler hi, was just replying to the question on what people where building with Silverlight. Seems people at the IE11/Edge team thought people were just using Silverlight for building silly animations for webpages and decided that Flash had that covered and integrated the Flash engine in IE11 and Edge, but not the Silverlight one

@weitzhandler
Copy link

@birbilis oh i see

@birbilis
Copy link

birbilis commented Apr 24, 2018

...btw, Flash was a plugin back then too, but now it's an engine integrated in various browsers. Why MS didn't do the same for Silverlight beats me.

@weitzhandler
Copy link

I always thought that. They gave up on such a lovely trend for the favor of WinJS and other crap.
BTW, related: #230.

@fernandoff
Copy link

fernandoff commented Apr 24, 2018

So, our hope lies on blazor? Why not help them? Or is there any other solution that would be viable to build, lets say a ERP or a CRM for the web? Sorry for any misconception i am new to C#.

@birbilis
Copy link

I think commercially NoesisEngine UI may have potential

@zbigniew-gajewski
Copy link

The closest technology to Silverlight (C# + XAML) is Ooui.Wasm + Ooui.Forms not Blazor (Blazor is based on HTML/CSS + C#, not XAML + C#).

I was surprised, how easy it was to make simple 'Silvelight-ish' application up and running (fully client side, no network 'noise') using this technology with Xamarin Forms (controls, binding, behaviors - all in XAML, ViewModel in C#).

So if we (in the near future) want to build LOB web apps with XAML and C#/F#, then we at least should help @praeclarum and maybe mono and Xamarin.Forms teams.

@Mike-E-angelo
Copy link

@juepiezhongren check out Noesis via WebAssembly:
http://www.noesisengine.com/webgl/Samples.Buttons.html

Xaml that is very close to WPF.

@insinfo
Copy link

insinfo commented May 8, 2018

noesis engine, seems to be our only hope for XAML multiplatform high performance

@stuart-beattie
Copy link

Startup time is a really important consideration for consumer web applications. Noesis startup - first load time for sample app <3 seconds on my machine. Ooui wasm sample app around 8sec, cshtml5 showcase app around 18sec

@insinfo
Copy link

insinfo commented May 9, 2018

the UNO seems interesting, but it has a lot of overhead, this is far from being a platform to develop high performance real world applications.
Noeses engine has a lot more potential because it runs on top of OpenGL / WebGL. with low overhead, close to zero.
https://www.noesisengine.com/forums/viewtopic.php?t=341

@fdsmax
Copy link

fdsmax commented May 28, 2018

I think, it might be worth extending Xamarin to include the Noeses engine or similar functionality in addition to Wisej ( http://wisej.com is a Visual Web GUI's new variant) to run on the browsers. Although Gizmox Visual WebGUI died few years ago, I tried its variant Wisej recently and it seems promising and runs in the web. What it lacks currently is the Noeses engine kind of features and functionality.

If the features and power of both the above are included in the Xamarin XAML Forms, it could become capable of producing WYSIWYG Web pages much flexible and efficient than WPF, Silverlight and Macromedia flash. This could reduce the coding effort required for html, css and javascript for normal websites too as web developers might start using Xamarin XAML instead of other stuff. Pl note that Wisej too uses javascript and css internally and it's technically invisible in the forms designer; my thought above is to combine its features and power in the Xamarin XAML Forms in addition to few drag and drop user controls to provide Noeses's rendition capabilities. Perhaps that could make it a next big thing for the web :-) Thanks

@zbigniew-gajewski
Copy link

Yet another promising player in XAML/Wasm world: Uno Platform (Live demo).

@ksmithbaylor
Copy link

I don't know how maintained this is, but it seems to check several boxes: http://fayde.io/

@danielmeza
Copy link

We got now mono runnin on wasm, there is any possibility to port silverlight to Wasm too?

@juepiezhongren
Copy link
Author

@danielmeza try uno

@YAJeff
Copy link

YAJeff commented Jan 10, 2019

Here's something I whipped together in my free time to render Xaml natively in the browser using WebAssembly and WebGL:
https://github.com/XamlEngine/Samples
And the source:
https://github.com/XamlEngine/Core
Example:
http://www.xamlengine.com/

The idea is that Xaml becomes exposed to any language that can run within the browser/WebAssembly. So it could be C++/C#/JavaScript/Python, etc.

It's the first one that I know of which is actually attempting to render natively using OpenGL semantics and runs in the browser.

Anyone want to help build this?

@birbilis
Copy link

I like how https://github.com/XamlEngine/Samples/blob/master/sample.html is clean to read

@birbilis
Copy link

does it do interactive stuff too?

@YAJeff
Copy link

YAJeff commented Jan 10, 2019

Not yet. But as you can see, right-clicking on the page doesn't bring up the typical context menu. So WebAssembly is fully intercepting the mouse events. They just need to be wired in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests