|
Although I've been mainly interested in Blazor server so far, I'm really excited about this tech because I never liked the JS experience. I have no idea if it will catch on, but I really hope so -- whether in server or WASM form.
|
|
|
|
|
Disclaimer: I've disliked JavaScript since learning it in the late 90s, early 00s. That might be an unpopular opinion, but certainly not an uncommon one.
That said, I use server-side Blazor now and love it. It doesn't have quite the scalability of other web tech, but the server-side functionality is (close to) unique and fascinating. I'm flipping a site to client-side Blazor now... so more on that later.
Is it worth learning... IMHO, this tech is different enough I feel most would benefit from its perspective. WebAsm (in general) has many years behind it, and made it as a browser standard before Blazor existed. (That alone is a feat.) So it's here to stay.
Will non-JavaScript haters gravitate to it? Good question; time will tell. WebAsm should have slightly faster load & execution times. But I feel not enough for that to be a practical factor in most cases. Dependency control will be a much greater factor in performance.
In the end it's just a tool. One I personally hope will dislodge JavaScript, but that's just one code-monkey's opinion.
- great coders make code look easy
- When humans are doing things computers could be doing instead, the computers get together late at night and laugh at us. - ¿Neal Ford?
- Nano naked and you'll Win nude! :P
|
|
|
|
|
I am actually implementing a production application in Blazor with an ASP.NET core backend. All of our previous web development was done in Angular with some large typescript libraries we developed.
The iteration time to make a change in your source code, rebuild it, and then restart your test from scratch in the browser is very painful. They claim to be working on this, but as far as I know, it is not done yet and I question how much they will be able to accomplish. The workflow with angular using typescript and a development server is much faster and quicker to iterate on. To circumvent some of this, we have created a complete POC html only application first to get the layout of what is required and then just mapping that HTML into the Blazor application so that we are never iterating on the SASS or HTML of the application within Blazor. I think they will have to move the compiler to the browser to accomplish this and then handle incremental compilation.
Another issue, that I have to admit I don't fully understand what they can do about it yet, is the download. As I understand it, you are downloading a version of the .NET runtime meant to run inside of WASM and then downloading all of the assemblies that your application uses. MS claims to be working on a way to remove the unneeded parts of the application kind of like the linker does in a native build. I have been developing in .NET for some time, and because so many of its patterns are based on reflection, it can make getting this removal of only the parts you are actually not using after reflection is taken into account very tricky. I suppose they could dictate an attribute of what not to remove. I am not 100% up to speed on their efforts to remove the unused parts of the application. So perhaps they have some interesting tricks up their sleeves.
One of the reasons I almost always desire compiled languages over interpreted ones is that the compiler eliminates many bugs and wasted test cycles. I have noticed that many times my razor files will compile, but fail at runtime due to an issue I feel the compiler should have caught. I believe Angular and Typescript did not have this issues especially if you did a complete build. This makes me a little less happy about Blazor.
On the positive side, the C# experience, dependency injection, and type safety that C# developers have become accustomed to are all in tact (if you ignore the .razor files). And once the application is downloaded, it is lightning fast in its execution. The robustness, clarity, and typechecking of the C# language (if you ignore extension methods) can't be ignored. FYI, I hate extension methods for discoverability and static analysis of code.
The few times I have had to call Javascript code from the C# code, the experience was very straight forward and pleasant. Kudos to MS on this one.
While MS has seemingly embraced opensource, you will find that things like their C# debugger are only allowed to be used with VS and VSCode. If you have leveled up to using a faster development environment, then you may suffer by being forced back into the MS fold.
I should know far more in a month as this project comes to a close. But my current take aways are:
1) If you have a set of C# business logic you would like to leverage between multiple deployment targets, the web being one of them, and you can get it in a small assembly, Blazor can be a valuable tool to avoid the cost of reimplementation in a typed language like Typescript. But you will pay for that cost in other areas.
2) Using Blazor increases the number of technologies and moving parts a front end developer needs to maintain expertise in and that will likely drive down productivity.
3) I am not betting on iterating in CSS and HTML within a Blazor application every hitting the efficiency of SPA development with Angular or other frameworks that live in Javascript. But perhaps MS will surprise me.
4) While we will complete this application in Blazor, we may replace the entire thing with an Angular application later to avoid this outliar and minimize the cost of technology headspace.
5) It is important not to conflate Blazor WASM with Blazor Server. The Blazor branding refers more to the patterns and code within the application and very little with how they are deployed or where they make sense to deploy.
If I could have my cake and eat it too, the common code used between multiple applications would be in a language like C++ or Rust so a proper linker could eliminate what was not required. But even if you stuck with .NET or a language with a GC, I would change the pattern to have the view models maintained in the WASM portion and allow the developer to develop the views with more traditional tools such as HTML, SASS, CSS, TS, ... that simply used the view model as a data source to bind to and send user events to. I believe this separation of concerns would make the most sense and allow the fastest iteration.
|
|
|
|
|
I have been programming with Blazor for over 2 years now, starting with the previews. It's incredibly easy to program and if you use a code-behind file for each component to separate the code from the markup, everything is tidy and pretty, unlike React or Knockout. I switched the project to Blazor WebAssembly in May. It's fast.
Judging by the number of job postings requiring Blazor, it doesn't look like anyone is using it much already, but I'm hoping this changes in the next few months. One good thing to note about Blazor is that it doesn't require node.js, etc., so the solution footprint is much, much smaller. And you don't need to wait endlessly when you have to rebuild the entire solution.
I'm sold.
|
|
|
|
|
The consensus of this population of 1 is that Blazor is the best current way to develop websites.
May JavaScript die a quick death, or at least quickly get consigned to irrelevance.
|
|
|
|
|
WASM allows for non HTML UI... Blazor is not the answer WASM was meant to solve.
JS isn't the only problem with web dev. HTML is as well.
How MS continues to miss the mark for innovation is beyond me.
|
|
|
|
|
|
My coolest article this last week was probably my "Await on anything" article that allows you to extend things other than Task to accept the await keyword.
Yet people liked my Windows Message Queue for C# developers article even though it doesn't present any sort of technique you'd want to use in production (don't use these from C# please - it's just silly) - i even put a prominent disclaimer about that in the article, but at this rate it may be in the running for best article for this month. It certainly has a lot of votes and downloads. About what my MIDI library had.
I wish I knew what people liked so much about it so I could replicate whatever it is.
Real programmers use butterflies
|
|
|
|
|
Synchronicity. The right article at the right time.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
what i don't understand is how it's the right article for anyone. it's purely illustrative, and not even of a concept used in .NET except to make winforms work. oh well.
Real programmers use butterflies
|
|
|
|
|
"Message Queue" (or messaging) references come up more frequently than threading when it comes to corporate development.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Yeah but there's way better ways to do it in .NET
maybe people just wanted to see windows nekkid. *shrug*
Real programmers use butterflies
|
|
|
|
|
For me "Await on anything" opened my brain about the back ground. And this in a strait forward and easy way without hiding the important things with overy engineered stuff.
Only my view
It does not solve my Problem, but it answers my question
Chemists have exactly one rule: there are only exceptions
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Are you talking about Stephen Toub's article or mine? (similar titles)
I felt mine was a bit more accessible. He assumed a lot of his audience - which is fine considering who reads him, but it could have been put more simply, and explained more.
Real programmers use butterflies
|
|
|
|
|
About your article
It does not solve my Problem, but it answers my question
Chemists have exactly one rule: there are only exceptions
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Oh, thank you!
Real programmers use butterflies
|
|
|
|
|
I believe I made the same comment a week or two ago with regards to 1-voters.
|
|
|
|
|
|
honey the codewitch wrote: I wish I knew what people liked so much about it so I could replicate whatever it is. Pineapple pizza.
Expecting a photo in "where I am".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
|
5teveH wrote: the real Fleetwood Mac As opposed to...?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I think he means The Original Fleetwood Mac
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
I would much rather focus on celebrating the pure genius of Peter Green, than getting into a debate about what is, (yes!), just my opinion about Fleetwood Mac after he, sadly, suffered a breakdown and left the band. So, to quote the great man himself:
Can't help about the shape I'm in
I can't sing, I aint pretty and my legs are thin
But don't ask me what I think of you
I might not give the answer that you want me to
Fleetwood Mac - Oh Well - 1969 - YouTube[^]
|
|
|
|
|
I was not challenging you to a debate, just asking you to clarify what you meant.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|