How can Blazor feel less like Silverlight and Web Forms and more like a tool for people who are comfortable with the web? #22098
Replies: 2 comments 1 reply
-
JavaScript is very possible with Blazor, that's a distinct feel. WebAssembly has come to stay, it will surely get easier. |
Beta Was this translation helpful? Give feedback.
-
That is the whole point of something new like running .NET in the browser, isn't it - to move away from the current tools, by which I can only assume you mean JavaScript.
Maybe this is a misconception? The whole message that comes with Blazor is "do it your way" - if you want to use JavaScript - that's fine - you can use all the JS/Typescript you want - and calling into it is a one-liner from Blazor. However, and this is key - you have to be willing to learn new ways - 99% (not a fact, just a turn of phrase) of the things you need to make a basic web site do not require JavaScript - people have forgotten that - and for those 1% of things that require access that Blazor/WebAssembly doesn't yet have there are Nuget packages that abstract away the JavaScript, so the .NET developer doesn't need to write any. But the bottom line is - Blazor does not put any barriers in the way of using any tools you want. |
Beta Was this translation helpful? Give feedback.
-
To begin with: Blazor is not Silverlight. Whether Silverlight was wise or not, it was pretty much doomed by the time it showed up due to the way it was an NSAPI plugin. Blazor is either server-side or client-side with WebAssembly, so it doesn't have that problem.
But I spend a lot of my time making web applications and web sites, and even though I really dislike the 95 hoops you have to jump through to get Webpack to do what you want, at least for the next few months, Blazor does not feel inviting at all to me.
Interoperating with JavaScript is possible, but in every presentation I've seen it's been an afterthought, and it's been clunky. Rather than embracing the web that exists today and letting us get work done by using the tools we need to use, Blazor does have a distinct feel of what Microsoft is sometimes accused of and what definitely was the case with Silverlight - erecting a wall, declaring a new ecosystem, and hoping you'll stay inside it.
The thrust of Blazor today seems to be you'll never have to write JavaScript again, and while I can empathize with that sentiment and with the people who like it, as long as that's the motto I will be reticent to use it, because it sounds suspiciously like there's no incentive when developing Blazor to make it easy for those of us who want to keep using web technologies in addition to C#.
Blazor is a technical marvel, and it's basically checking all the boxes Web Forms (of all things) wanted to check, with C# everywhere. But having tried to keep Web Forms applications up-to-date as the web allowed more and more things, I also recognize the sinking feeling in my stomach that I may end up fighting myself as soon as I want to do something that goes a few step beyond "hello world", like continuously validate a form where some of the inputs are provided by off-site JavaScript libraries.
Basically: please make sure that Blazor isn't just a tool for making applications in the shape of HTML pages with WebAssembly, but that they can handle everyday web development tasks, and let some of the allure be that Blazor makes it both possible and easy to do webby things.
Beta Was this translation helpful? Give feedback.
All reactions