HomeНаука и техникаRelated VideosMore From: NDC Conferences

Blazor, a new framework for browser-based .NET apps - Steve Sanderson

643 ratings | 30039 views
Today, nearly all browser-based apps are written in JavaScript (or similar languages that transpile to it). That’s fine, but there’s no good reason to limit our industry to basically one language when so many powerful and mature alternate languages and programming platforms exist. Starting now, WebAssembly opens the floodgates to new choices, and one of the first realistic options may be .NET. Blazor is a new experimental web UI framework from the ASP.NET team that aims to brings .NET applications into all browsers (including mobile) via WebAssembly. It allows you to build true full-stack .NET applications, sharing code across server and client, with no need for transpilation or plugins. In this talk I’ll demonstrate what you can do with Blazor today and how it works on the underlying WebAssembly runtime behind the scenes. You’ll see its modern, component-based architecture (inspired by modern SPA frameworks) at work as we use it to build a responsive client-side UI. I’ll cover both basic and advanced scenarios using Blazor’s components, router, DI system, JavaScript interop, and more. NDC Conferences https://ndcminnesota.com https://ndcconferences.com
Html code for embedding videos on your blog
Text Comments (84)
Micro Tech (1 month ago)
why Microsoft does not keep nomenclature same as previous versions ??? like why main.cshtml instead of _layout.cshtml, why @inject instead of using, why typescript has different signature to declare variables than the c#, why not mvc like structure instead of new 3 projects in Blazor ??? fade up with new rules and syntaxes, structures every time... It would be great if Microsoft could maintain similarity from its previous successful technologies so that one should not spend time learning structure, syntax every time Microsoft comes up with new thing.. Thanks
Micro Tech (1 month ago)
will Blazor based apps be google search engine friendly ?
Han Solar (1 month ago)
This will change everything on web development. Looking forward to using C# to create new browser apps. Will make life much easier.
Vincent Mirine (2 months ago)
Voila ! une super technologie, allez les gars foncez, sortez nous une version release !
John Smith (2 months ago)
cant wait for hot reload in Blazor .... i think its must
madmanga64 (2 months ago)
Please replace HTML with XAML
German Nina (2 months ago)
by someway this part 12:18 makes me smile, this is awesome!!!!!! its obviously the most important thing Microsoft is working on.
Osama Alwash (2 months ago)
Best NDC video have seen yet!
Steven K James (2 months ago)
COOL
Manuel Basiri (2 months ago)
Microsoft, if you read this, please bring this out of experimental and to a full committed project. This is the most amazing thing coming from Microsoft in years. Finally we can completely commit to MS tech stack and be free from the front end stupidity of a new JS library every week. Do this please and give it all you've got. Help your loyalists army. I'll happily rewrite my entire front end if I have this. Blazor! maybe a better name wouldn't hurt by the way. And this is the ultimate answer to JS security (or complete lack of). OMG I hope we have something in 2019.
JustProgrammer (4 months ago)
Finally MS entered front-end space development! I was very disappointed when Silverlight didn't work out. I hope Blazor will work. I love the idea.
bar10dr (4 months ago)
I find it hilarious that to get away from JavaScript, we created WebAssembly; and then we have to reference a 1MB JavaScript file in order to use it with C#? That makes no sense whatsoever, does it? Is wasm just not far enough in its development to be able to write the entire C# JIT in wasm? I have to say though, I really hope Microsoft runs with this, because it will really change the landscape of web development; I think the prime focus now should be a way to do automatic state change tracking through object attributes, having to manually track and manage them will become a mess quickly.
Gustash (3 months ago)
I believe the JS file is there simply to enable fallback to ASM.js. When more people start updating their browsers and we're sure that pretty much everyone has WebAssembly support in their browser, we can scrap the JS fallback, and as such, get rid of the JS file. So it's either serve a 1MB JS file to access a wider audience, or limit it to users who have WebAssembly support.
Marco Fatica (4 months ago)
this is incredible!! please please please continue development. I am a long time veteran of C# (over 10 years) and have been waiting my whole life for this
Martin Capodici (4 months ago)
Yes please keep developing Blazor and make it production ready. I can see this massively increasing productivity in developing web applications, using the same tech on the front and back end, sharing libraries between the front and back and so on. This is exciting, I believe it is the future. Also longer term is there is a nifty way to compile precisely the same app into a native phone and native desktop app without the bloat of Electron / Cordova etc. that would help small teams who want to branch out into different platforms who don't have the resources to do it all.
UK2AK (4 months ago)
Does Microsoft have an F# story for Blazer?
Garrett Marshall (4 months ago)
So I've installed Balzor and VS 2017 - but only a C# asp.net core template - would be nice if there was a VB asp.net core template... any VB guys out there feeling left out?
Chris Spain (4 months ago)
Love the concept, nice work. Lets get this Series approved for a second season and not be another Firefly.
apostolis.bekiaris (4 months ago)
at last
Steven K James (5 months ago)
Fantastic. I am a big Fan
Discover TheDebate (5 months ago)
Amazing innovation in.Net framework.Now i think as a .Net developer, there is no need to learn javascript huhuhhu.
Brad Smith (5 months ago)
Windows Forms or WPF on the web. WebAssembly can't go mainstream soon enough.
Coolpot (6 months ago)
noones used MS for web tech since the 2002 when anyone sensible avoided webforms like the plague for obvious reasons, why on earth would anyone use this now, when it does less than angular and the likes, its typical MS, coming to the game late, and offering less.
J4N (6 months ago)
This is AMAZING, can't wait that I can use this in production :). @All : Any idea what is the bootstrap theme?
kudzai chiwome (6 months ago)
Awesome
Nick C (6 months ago)
This is very powerful. Please make it a shipping product. Silverlight was an addon and that why it did not work out, blazor is a seamless integration through WebAssembly. It's a brilliant and amazing idea. Please ship it !!!!
Serhat Morkoç (6 months ago)
awesome !
Faruque Ahmad (7 months ago)
Looks awesome.
Andrew Telfer (7 months ago)
@Steve Sanderson - Thank you. I've been waiting for something like this for years.
Nicolás Wernli (7 months ago)
ok, so no more excuses for me to jump to the .net environment
Brad Smith (5 months ago)
+Nicolas Wernli - Do you mean no more excuses to NOT jump to .Net?
Bob Armour (7 months ago)
@Steve Sanderson - surely the 'BL' in BLAZOR stands for 'Bytecode Language' ? Feel free to pay me royalties, every time you use this in your future presentations ;)
Randall Sexton (7 months ago)
I am (cautiously) optimistic.
Buddy Becks (7 months ago)
Hopefully F# Gets support for this as well at some point.
KlevaOyibo (7 months ago)
Current Source Code: https://github.com/aspnet/samples/tree/master/samples/aspnetcore/blazor
Christian Nikolov (7 months ago)
just seeing 8k views on this video shows how poorly informed the community is.
Vijay Singh (7 months ago)
something great going with asp.net
erzadark123 (7 months ago)
This is Hype! Gonna give it a try. Looking forward where this is heading to. Keep up the great work !
IVC Business Systems (8 months ago)
Apple is NOT going to like this! This is a new way to deliver applications over the web to any device. From within that single page, you can have a multi-page app, you can render anything you desire... this is Silverlight without WPF/e. Next stop after this matures is to deliver additional markup, i.e. XAML, which would give developers HTML, XAML or Razor to work with... choose your poison :) While it won't destroy the App Store concept, it should give it some serious competition. Heck, developers may even be able to finally make some money off of their apps.
John Smith (2 months ago)
if apple decides to block this ... i will throw my iphone in dumpster
Lorenz Vd (4 months ago)
How so? Browser don't have the same permissions as apps. Apps have so much more functionality.
John Smith (8 months ago)
Erhmmm.. really like Blazor, but I dislike the fact the entire assembly for the web application itself is served in a shiny golden tray right to the client's hand... and then someone gets DnSpy opens it up and he/she has the entire source code, of course, a little different and unorthodox from the "regular" desktop assembly, but for my understanding, Blazor provides no security at all to aid the protection of company trade secrets and private assets, else I would love someone to prove me wrong here.
Ryan M (5 months ago)
How is that different from any other .net assembly or anything that can be decompiled? How is it different from any client side web application in javascript? I think you are making a distinction without a difference.
Tio Peperino (8 months ago)
IVC Business Systems oohhh amazing!!!!
Tio Peperino (8 months ago)
IVC Business Systems right, i was thinking on it also, thats surely one way of doing it
IVC Business Systems (8 months ago)
Just found this out, from Sandersons Blog: http://blog.stevensanderson.com/2018/02/06/blazor-intro/ In interpreted mode, the Mono runtime itself is compiled to WebAssembly, but your .NET assembly files are not. In AOT mode, your application’s .NET assemblies are transformed to pure WebAssembly binaries at build time. At runtime, there’s no interpretation
IVC Business Systems (8 months ago)
Just follow best practices, if you want to execute sensitive code, do it on the server and just send the results back.
Peter Morris (8 months ago)
If you want to see one of the state libraries Steve mentioned then take a look at this project. The samples convert the built-in samples to a Flux/Redux type pattern, but without any boilerplate code (no switch statements in reducers, no having to create state/reducer maps, etc) - https://mrpmorris.github.io/blazor-fluxor/
Tio Peperino (8 months ago)
Definitely less spooky than ASP.NET.
David Cuccia (8 months ago)
Will CDNs need to learn to serve library projects? Or will library projects expose their content transparently?
Lute Scrat (8 months ago)
add spatial data variable for EF core... this is a must.
Mihail Malo (8 months ago)
Such calling slots "render fragments" -_- It's 2018, stop renaming popular established things.
Mihail Malo (8 months ago)
They already have this whole WASM running. Why not use ProtoBuff instead of JSON?
Shaun (8 months ago)
Amazing, I want to use it now!
Alex Smith (8 months ago)
C# is definitely better than the jumbled mess of JS, but the feasibility of a truly good web app is performance (in terms of responsible DOM updates and rendering, not file size). If Blazor can intuitively utilize the really modern techniques done in JS with requestAnimationFrame(), ShadowDOMs for rendering, and Worker threads for processing, then there would be every reason to use it. If Microsoft made a product like VS Code (an outstanding web-based app) using Blazor, I'd be completely sold.
rokas666 (8 months ago)
Yes! I want to use it....ship it for production ASAP! :)
Achmstein (8 months ago)
Fantastic SPA framework
Ben Hayat (8 months ago)
Anyone knows where we can steve's samples?
Thomas Christof (6 months ago)
https://github.com/aspnet/Blazor
Oyeyemi Adeyeri (7 months ago)
You may want to check here: https://github.com/aspnet/samples/tree/master/samples/aspnetcore/blazor/FlightFinder
CodeBit (8 months ago)
Why are all Microsoft dev videos in 720p????????? It's so blurry....
Rodrigo Pires (8 months ago)
Blazor is going to be HUGE! Keep up the awesome work Steve.
nexokin (8 months ago)
Great progress! Going to give it a spin again!
Bep Kororoti (8 months ago)
But... why Razor? You have the chance to start from scratch and you use... Razor...
RAHUL S R (5 months ago)
The question is why not razor
Nestor Sanchez (8 months ago)
Blazor is the best thing that MS is doing in the web space, better even that Typescript, because it allows C# to run from cloud to web-server (if any) to browser. So, we can finally share business domain logic across those layers, plus taking full advantage of the .NET standard features.
John Smith (2 months ago)
webassemblies going to change web, thats fact! I have been waiting for something like that for ages..
Alejandro Palacios (3 months ago)
You know what that means?, Javascript will be NO MORE muAHAHAH
Ben Hayat (8 months ago)
To Blazor team; Please build an integrated "SignalR client" (.Net core 2.1 or above) that we could deliver live data to client side.
Ben Hayat (8 months ago)
I loved Silverlight [which became officially Windows 8/10] but this Blazor is going to top SL. [MSFT] Please make it an official product, so we can build advance apps. Also, give us Lazy page loading, so if the app has 100 pages, it doesn't load ALL the pages up front. And once a page is loaded, it should stay in an internal Page cache for future calls.
Marian Benčat (7 months ago)
i am 10years experienced C# programmer, but several years SPA developer (Angular/Vue/React). At first i have been totally aggresive against javascript and browser ecosystem, been looking several years for C# -> JS transclude like FSharper etc.. I can tell you.. learn Typescript, learn Angular 5/6 and you will see that: 1) armoring against browser and JS ecosystem is nonsense 2) Blazor has 5 years of big development to go, before it can be usable.. Browser is not desktop, they are totally different environments.. JS SPA's frameworks are developer by 50+ members team (community) and for several years... they headed so many problems they have already solved and Blazor has to solve too - like server rendering, code minification, effective change detection, shadow/virtual dom...
enet studio (8 months ago)
We demand Silverlight (XAML) in Blazor... to make this product superb.
TheWimpossible (2 months ago)
TAKE THAT BACK!
O M (7 months ago)
Please no..
jimiscott (8 months ago)
The future of SPA is here.
ylluminate (7 months ago)
Already was here. Check out Hyperloop via Opal for a completely wonderful isomorphic stack.
sjbthfc2 sb (8 months ago)
Steve, this technology is amazing. I think think the whole .NET developer community are crying out for this as a successor to the current JS/SPA Framework world.
Krimog (8 months ago)
In the last few years, Microsoft has made good decisions. When we had to write Javascript, they created TypeScript. When we were switching to Node.js, they created ASP.NET Core. Now, we have to choose the SPA JS Framework, they create Blazor. I want it. Yet I do have some questions about it. - What can you do in the web assembly and when do you need to call Javascript ? For example, DOM manipulation ? - Is there (or will there be) a way to extract C# declarations (for example methods) from the .cshtml ? - What version of C# can we use ? - When is the blazor library downloaded ? First page or first call ?
Gam Er (1 month ago)
Nah. You ignore all the bad things MS came up with and how they threw rocks into the gears of better projects. Bad or dropped tech: Silverlight. Windows Mobile. Visual Basic. VB Script. I could go on.. and you know it's true. And many other products are just layers upon layers built upon a rotten core. Take Windows for example.
Mike Sheen (8 months ago)
Blazor allows you to manipulate the DOM using Blazor components - they render a UI tree that is compared to the previous version, and the changes are then applied to the DOM. You also can still use any JS library and call them from Blazor - documentation for that isn't quite there, but examples of JS interop for Blazor are out there. C# 7.3 Is what they're currently using. The other questions I don't yet know the answer to.
dageddy (8 months ago)
Interesting. Thanks Microsoft for creating this bridge technology. I’m also curious whether this does take off.

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.