Click here to Skip to main content
15,895,746 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Opinions on Blazor Pin
EbenRoux26-Jul-20 22:45
EbenRoux26-Jul-20 22:45 
GeneralRe: Opinions on Blazor Pin
Michael Breeden27-Jul-20 0:07
Michael Breeden27-Jul-20 0:07 
GeneralRe: Opinions on Blazor Pin
crazedDotNetDev27-Jul-20 5:20
crazedDotNetDev27-Jul-20 5:20 
GeneralRe: Opinions on Blazor Pin
carlospc197027-Jul-20 1:53
professionalcarlospc197027-Jul-20 1:53 
GeneralRe: Opinions on Blazor Pin
Ed K27-Jul-20 2:56
Ed K27-Jul-20 2:56 
GeneralRe: Opinions on Blazor Pin
Adam O'Neil (Travelers Rest, SC)27-Jul-20 3:17
Adam O'Neil (Travelers Rest, SC)27-Jul-20 3:17 
GeneralRe: Opinions on Blazor Pin
crazedDotNetDev27-Jul-20 5:03
crazedDotNetDev27-Jul-20 5:03 
GeneralRe: Opinions on Blazor Pin
Dave B 6827-Jul-20 6:37
Dave B 6827-Jul-20 6:37 
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.
GeneralRe: Opinions on Blazor Pin
Andy Richard27-Jul-20 6:40
Andy Richard27-Jul-20 6:40 
GeneralRe: Opinions on Blazor Pin
MSBassSinger27-Jul-20 6:51
professionalMSBassSinger27-Jul-20 6:51 
GeneralRe: Opinions on Blazor Pin
zezba900027-Jul-20 14:44
zezba900027-Jul-20 14:44 
GeneralRe: Opinions on Blazor Pin
Sam Gerené29-Jul-20 23:45
Sam Gerené29-Jul-20 23:45 
GeneralIt's so strange what people like a lot here sometimes. Pin
honey the codewitch25-Jul-20 7:20
mvahoney the codewitch25-Jul-20 7:20 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
Gerry Schmitz25-Jul-20 7:40
mveGerry Schmitz25-Jul-20 7:40 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
honey the codewitch25-Jul-20 7:51
mvahoney the codewitch25-Jul-20 7:51 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
Gerry Schmitz25-Jul-20 10:14
mveGerry Schmitz25-Jul-20 10:14 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
honey the codewitch25-Jul-20 10:17
mvahoney the codewitch25-Jul-20 10:17 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
User 1106097925-Jul-20 8:07
User 1106097925-Jul-20 8:07 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
honey the codewitch25-Jul-20 8:19
mvahoney the codewitch25-Jul-20 8:19 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
User 1106097925-Jul-20 8:20
User 1106097925-Jul-20 8:20 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
honey the codewitch25-Jul-20 8:23
mvahoney the codewitch25-Jul-20 8:23 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
Marc Clifton25-Jul-20 9:26
mvaMarc Clifton25-Jul-20 9:26 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
Ron Anders25-Jul-20 11:25
Ron Anders25-Jul-20 11:25 
GeneralRe: It's so strange what people like a lot here sometimes. Pin
Eddy Vluggen25-Jul-20 12:19
professionalEddy Vluggen25-Jul-20 12:19 
GeneralRIP Peter Green Pin
5teveH25-Jul-20 6:43
5teveH25-Jul-20 6:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.