Blazor
Blazor copied to clipboard
corlib and JIT updates
Here are a few fixes and updates to the corlib and JIT:
- Better C# support (added some missing JIT features, some bug fixes and updates).
- Added F# support (uses custom FSharp.Core, see here for a working example).
- Tried my best to keep the corlib light, it's still around 260k (in release mode).
- Release build assemblies now work too (after JIT bugfixes).
I see you added CLR debugging in the browser, that's awesome!
This looks like a good pull request. I'm excited for this project
C# client side ?? DO WANT !!!
Seriously this looks great.
That's awesome! By the way, do we have Blazor on official Core 2.0 instead of preview version?
+1 adding my support for this project. Reaaaally want to see it come to fruition!
How can one help with this project? Because I seriously want to see this getting bigger :)
+1 @Huarru I too would love to know how I can help. This project needs to get a team behind it, Microsoft !!
I really think this can be a solution for the messed up, mangled mess that we today call web development. https://twitter.com/thomasfuchs/status/708675139253174273?lang=el
I tried implementing a new feature but the missing reflection features are blocking me. I tried using DNA from this PR but still there are a lot of basic reflection stuff missing.
I think the first thing to do should be extending DNA, although I am not sure if this is the way to go since Mono is also working to bring their runtime to wasm.
http://www.mono-project.com/news/2017/08/09/hello-webassembly/
Maybe switch to Mono runtime ? (when ready)
Here's why reflection in this type of project is not desirable:. Reflection prevents a linker from pruning code unless done very carefully.
It is imparitive that blazor implements a linker to shrink the size and using DNA keeps the monster size of mono out of this. (see how large the same app is for xamarin Android versus Java if you have any questions and that's with a linker)
On the web all you need is event handling, http requesting, and operations in the Dom (and cookies, storage I etc) all with strong typing. Essentially everything else is noise that should be done server side.
If a model that uses razor syntax for binding with eventing can be created that matches angular but does so with dnx and web assembly using mvc pages and mvc routing we'd have a massive win and would forever change web development, which is a disaster right now) for the better.
And as an aside, Al of this has the benefit of being natively executable for server side pre-rendered for SEO with seamless handoff and no nodejs involved which is another HUGE win.
@JohnGalt1717 Ok, that makes sense
+1 for this project. I'm waiting with baited breath.
I get that reflection is tricky when it comes to dead code elimination, but it's also an integral part of many codebases.
Perhaps an approach like .NET Native's "Runtime Directives" can be used?
https://docs.microsoft.com/en-us/dotnet/framework/net-native/reflection-and-net-native
PS if anyone needs an extra hand for this, sign me up.
What kind of knowledge is required to contribute to this project? Does anyone have any recommendations on which books I should read?
I think rather than wasting countless hours writing awkward JavaScript/TypeScript code, I would rather spend those hours contribute to this project.
@SteveSanderson Separated the Blazor-Hackaton baseline to help the review.
"I think rather than wasting countless hours writing awkward JavaScript/TypeScript code, I would rather spend those hours contribute to this project.” Amen to that.
Just saw the announcement of an official .NET IL Linker at dotnet/core#915. That seems like great news for this project to reduce code size!
@SteveSandersonMS Rebased to latest.
Love the project and eager to experiment with some ideas, but there are quite few outstanding PR's that contain a lot of changes. Could some of the PR-s be merged?
@arpadbarta I know it's taking a while to merge this, and apologies for that. But please don't expect this repo to be a typical open-source project in a normal phase of maintenance. Instead, this repo is an experiment, not intended to have any particular level of support. Future plans are still being worked out.
Future plans are still being worked out.
I like the sound of that, given the Blazor-Hackathon on the official ASP.NET github org I'm hoping this may mean official Microsoft support!
I can't wait to see what this becomes. I am getting all giddy. XD
I'm hoping collaboration with mono-wasm can speed things along by sharing resources, and advancing both experiments to an officially supported set of tools. Each project has a different architectural approach (e.g. client-side Razor vs. browser-targeting XAML), but so much of the underlying core and foundation would be common and sharable by both teams.
And there's also this- https://github.com/dotnet/corert/pull/4480
Microsoft really really really needs to take command of this, make it official and pull all of these initiatives together and get a cohesive whole that has 2 paths:
- HTML with angular/razor style markup that generates an SPA
- XAML SPA
Pick which you want to use. In either case, both should automatically become a best of breed UWP application when targeted at the store with additional functionality available.
And they should direct compile to iOS and Android as well. (without a requirement for a mac, meaning MS has to put the build and test stuff in the cloud for iOS and give it away free to devs so they have no reason to ever use a mac)
Every single time I fire up a "React getting started" tutorial with typescript, webpack and redux, 5 minutes later I have stopped reading in frustration and I find myself back to this repo, gazing at the "what-could-be" future.
I have done the "Todo List" sample in Blazor multiple times by now, demoing it to some colleagues, and every time it reminds me how easy and natural it feels writing in it.
The timing is right. I believe that web assembly will even the playing field. It's time to seize this opportunity and make C# the go-to language for full stack web development.
Please make this happen !! T_T
Thanks @ncave for continuing to contribute to this! Just so you know, our hope is to move away from the DNA runtime shortly and replace it with a more full-featured one. If this works out (no guarantees yet though) then you could absolutely still continue to develop DNA (and there might indeed be demand for that as it might always be the smallest .NET runtime there is), but it would be good to move that over to another repo under your control. Does that sound OK?
@SteveSandersonMS Thanks Steve, I figured you guys are up to something, and that's awesome, can't wait to see it. I already have another DNA development repo, that's where the updates are coming from.
BTW In case you haven't seen it, I wrote a post to try and let more people know about DNA, see DotNetAnywhere: An Alternative .NET Runtime.
There's also some interesting follow-up discussions, see HackerNews and /r/programming (including comments from @chrisdunelm)
@mattwarren Of course I've seen it, great write-up, so much depth and detail. Thanks for the links!
It is so great that this thing keeps moving! Can't wait to see it happen.
While waiting I enjoyed browsing the following three repositories:
WebAssembly is a new technology for running code at near-native speed in browsers. A group of folks on the .NET team worked together to see what WebAssembly might look like using CoreRT.
They also issued a call for help https://github.com/dotnet/corert/issues/4659
I have seen several pull requested merged in the last few days. So there is some action going on there.
This project is intended to support running .NET code as an Electron Plugin, running code using the Mono runtime, side-by-side the V8 engine and to provide both C# API bindings to Electron's plugin API as well as the Web browser API.
Last commit was 6 weeks ago. Seems like no public action going on here anymore.
This project is a proof-of-concept aiming at building C# applications into WebAssembly, by using Mono and compiling/linking everything statically into one .wasm file that can be easily delivered to browsers
This repository is owned by Laurent Sansonetti who works for Microsoft in Belgium. Steve and Laurent exchanged some emails and they tried to get it running with Blazor.
Last commit was 10 days ago.