
Blazor – A .NET web framework that runs in the browser with WebAssembly - tegeek
https://github.com/aspnet/blazor
======
dang
[https://news.ycombinator.com/item?id=18135949](https://news.ycombinator.com/item?id=18135949)

------
rattray
I've never used .NET, and don't really intend to, but I think this is
interesting nonetheless.

This is on track to become a "built-in feature of ASP.NET Core 3.0" – recall
that ".NET Core" runs on Linux, etc.

Much C# development is still for internal business applications. For these
applications, the overhead of shipping the .NET runtime to the browser in WASM
- which [https://blazor.net/](https://blazor.net/) sadly does not seem to
mention - may not be a big deal, especially if they can be cached with service
workers.

Keeping engineers fungible and cheap to hire & train is a priority for
enterprise software divisions. Software ecosystems that rely on the patience
and curiosity of developers to explore an uncoordinated constellation of
packages and design their own architecture (eg; Java, React ecosystems) can be
suboptimal.

.NET's historical "all batteries included, all applications the same" promise
has been key here. But for rich frontends, Angular (their current choice) has,
ah, high training costs.

If Blazor works well, .NET Core may become the first truly full-stack,
integrated, get-it-all-here, framework for modern web app development.

As an uninvested bystander to enterprise software development, I'm curious to
see how this goes.

~~~
jf-
> Angular (their current choice) has, ah, high training costs

Does it? You need to know typescript (which you arguably should be using
regardless of frontend framework) and what dependency injection, observables
and components are. Plus some syntax for the templating language, which is
fairly intuitive. That’s enough to get you going, I don’t see it as being much
more of an investment than learning a react stack.

It also has the benefit of being all in one, like .NET, so there aren’t
multiple different packages for every function that could be used, depending
on who your team is. That all in one factor is probably why it’s a natural
complement to .NET.

~~~
Bizarro
_Does it? You need to know typescript (which you arguably should be using
regardless of frontend framework)_

That's highly debatable. We moved back to ES after using Typescript for years
and couldn't be happier. We're much more productive than we were with
Typescript, and that's with people that know the language. We get much of the
benefits of Typescript by just using a jsconfig.json file in our project and
using VSCode. The Typescript language service will typecheck JS code if you
want it to.

And there is a big upfront cost for onboarding developers with Typescript and
Angular.

~~~
andai
This is interesting, I'm mostly hearing the opposite experience. What made you
decide to make the switch back?

------
math
In Blazor, what is sent to the browser is a .NET runtime, then the .net
assemblies (which are .NET CIL, not wasm) which the runtime executes. They
seem to have this working well, but it's less efficient than, for example,
Rust which has no runtime and compiles directly to wasm. C# is very much my
goto language, but my eye is currently on Rust in this space because the
scenarios where I feel the need for something other than Javascript in the
browser are all performance related - i.e. I find React / JSX great for
working with the DOM.

~~~
martinald
I'm wondering that if WebAssembly could "cache" these runtimes, so you only
have to download once?

I can see Blazor being really useful for back office systems where people are
in them for hours, not so much customer facing stuff which people are dropping
in and out of.

I think anything that can challenge JS (which tbh is looking increasingly more
like C# with every new release) on the front end side can only be a good thing
though.

~~~
scarface74
I am a huge fan of C# and it’s bern my go to language for over a decade, but
at this point in my career, I am not tying my horse to anything MS. MS just
doesn’t seem to be gaining the mindshare with green field initiatives or
smaller companies that are focused on all things JavaScript. On the other end,
large enterprises are still more tied to Java than C#. Yes that makes me sad.

The only thing that Microsoft is doing that’s getting any real traction is
Azure. Don’t get me wrong, I’m not abandoning C# and there is no way that I am
going Java, but I am focusing more on Jsvascript and Node.

~~~
wernercd
.Net Developer here and I've never been unable to find good paying jobs or
expand my career in interesting directions.

JavaScript is a good goal... but not because there's a lack of C# viability.

~~~
scarface74
I am too and I have also being able to find good paying jobs.

But back in 2008 there were also good paying jobs for good C and C++
developers. But when I looked at the direction that the local industry was
going, I could see that the age of the bit twiddler was dying locally and
there were more jobs for “enterprise developers”.

I had a choice between making $20K more as a senior C++ developer or $7K more
as a mid level C# developer. I took the latter even though I had 12 years
(staying at one company way too long) of development experience.

So that’s what I concentrated on for the next 9 years - the Microsoft stack.

Late last year, I was the dev lead for a decent size company with a small IT
department. I was looking to change jobs and once again I saw the writing on
the wall. There were a few jobs willing to pay what I wanted writing C# but
lots of companies wanted Node/React/React Native.

This time, once again I was offered $15K more as an architect leading a team
of 10+ developers writing apps in C# on Windows servers, running Sql server
and I had another job offer as a “senior developer” at a smaller company
making only $5K more but would get a chance to not only fill in some technical
gaps on my end - front end coding with React and back end with Node. I would
also get to lead initiatives to make the company more “cloud native” and to
restructure the architecture for high availability, scalability, etc. and help
build a dev ops culture. But with no official reports (that’s a good thing).

Looking ahead three years, I knew what the better choice would be for my
career. Sure there is money _now_ for C# developers but that’s not where the
market is going.

But honestly, the salaries for developers and even architects who want to stay
mostly hands on and don’t want to go into management outside of Silicon
Valley/NYC is stagnating. I realized from my last job that the real money is
working for consulting companies with titles like “Implementation architects”
and “Digital transformation consultants” who help companies move to the
“fourth level of the cloud maturity model”. Yes typing that left a bad taste
in my mouth.

So that’s really the game plan - but to speak to all levels of the
organization, I need a “more modern tech stack” as one of the recruiters told
me.

~~~
wernercd
> Looking ahead three years, I knew what the better choice would be for my
> career. Sure there is money now for C# developers but that’s not where the
> market is going.

My decision is real simple... Microsoft has one thing most of those stacks
don't: Longevity.

You can knock C# as being "old" and not as "shiny" as Node/React/React
Native/Angular/etc... but C# has been stable for a long time and it isn't
going anywhere.

I can't say the same for JavaScript.

> Yes typing that left a bad taste

I don't know if that would change with C#, C++ or JavaScript - you are bound
to hit a ceiling as a "developer" unless you move into
engineering/architecture/management/bullshit (but I repeat myself)

> need a more modern tech stack

I'm learning JavaScript alongside C# (but I'm definitely a .Net Developer) for
that reason.

I personally have less faith that those techs will be as predominant in 20
years though... I think it's a crapshoot all around - things are different
from 5 years ago and C# and JavaScript will be COBOL in 20 years - alive but
not really...

We'll be working in mines for our robot overlords who can program themselves
at that point.

But seriously... I have more faith that Microsoft will be consistent and
supportive of technology than Google or Apple - Google has dropped more
technology than anyone and Apple is still a 1 trick pony. Facebook is pissing
people off and companies like Amazon are like Blackberry and Palm - even the
giants die eventually.

Not sure if that makes sense... but rambling aside, you can pick a channel -
C#, Java, JavaScript, etc - and have a successful career as long as you are
able to learn the bigger picture and move if/when the writing is on the wall.

~~~
scarface74
_My decision is real simple... Microsoft has one thing most of those stacks
don 't: Longevity. You can knock C# as being "old" and not as "shiny" as
Node/React/ReactNative/Angular/etc... but C# has been stable for a long time
and it isn't going anywhere._

JavaScript has been around longer than C#.

But if you want to compare how long framework of the week has been around,
Microsoft frameworks have been anything but stable - Linq2Sql, Webforms, WCF,
Windows Forms have all but been abandoned and the .Net Core versions of
WebApi, MVC, and EF are mostly different from their older versions.

 _But seriously... I have more faith that Microsoft will be consistent and
supportive of technology than Google or Apple_

There is this story of VB6 and Classic ASP...

And all of the abandoned mobile efforts. MS abandoned Windows CE/Windows
Mobile in 2008 when there were still millions of devices running specialized
vertical market apps using it.

 _I don 't know if that would change with C#, C++ or JavaScript - you are
bound to hit a ceiling as a "developer" unless you move into
engineering/architecture/management/bullshit (but I repeat myself)_

Well, 10 years later, I can’t find any C/C+* jobs in my local market making
$60K+ more what I was making back then. Honestly there aren’t too many C# jobs
that are making 60K+ what I was making back then in my local market. I was
able to negotiate a slightly higher than median salary because of my
architect/Devops/AWS skills. There were plenty of jobs for the
JS/Node/React/Docker skillset making what I make now - but I wasn’t qualified
for them.

The ceiling for .Net developers is lower than that of the Javascript
$cool_kids_stack.

But yes, it’s all about knowing where to jump on and off the hype cycle.

The larger companies where C# is more popular aren’t as willing to throw money
at developers and honestly they don’t have to. C# developers are a dime a
dozen.

------
masterofmisc
I think Blazor might have a bright future in the Electron space. Its seems to
me the stars are all aligning from that point-of-view.

Microsoft have had great success with Visual Studio Code and are now the
custodians of Electron since they brought Github this year. Also, now that
Microsoft are going all in on Chromium for Windows (and dropping Edge in the
process) I wonder if they will introduce Blazor into Electron for better cross
platform applications.

I just get the feeling there is a play there (in some fashion)

~~~
cm2187
Not so much electron than PWA, which will effectively standardise, cross
platform, client apps. To me pwa+wasm is the solution to enable cross platform
client apps AND a variety of languages and frameworks. And to free users (or
rather developpers) from the various gated stores.

------
aphextron
What's the current state of this? Being able to develop with C# in the browser
would be a dream, but the last I checked it wasn't really ready for any kind
of serious use.

~~~
kej
It still carries huge "don't use for production" warnings, and only parts of
it are slated for stabilizing in Dotnet Core 3.0. That said, it's fairly
usable today, and I think there's enough interest in it that I'd be really
surprised to see them abandon it at this point. I think it's worth considering
for a personal project or something internal where you are going to do the
back end in C# anyway.

------
untog
.NET on WebAssembly could be a really interesting escape hatch for companies
that have heavily invested in .NET apps and want to move away from Windows.
Right now downloading the whole framework is a prohibitively large task, but
for internal apps it would probably be fine. Port something WinForms-ish over
as well and those apps could be cross platform with not much work.

~~~
kabes
Wouldn't .net core just be that escape hatch?

------
xmichael999
Any decent examples of this doing something?

~~~
sunnyP
Here are some Blazor demos. [https://blazor.net/community.html#samples-and-
tutorials](https://blazor.net/community.html#samples-and-tutorials)

------
AlphaWeaver
I feel like [https://blazor.net](https://blazor.net) might be a better url for
this post.

------
k__
How big is this?

------
sureaboutthis
I think one can use WebAssembly by itself just fine. In fact, I know this to
be true.

