News for hackers. Stuff that matters.
Re:.NET Blazor by osigurdson on Tuesday November 21, 2023 @10:02AM (#38364514)
The problem is, all of this stuff will probably be dead in a few years. I think they would be better off working within established paradigms rather than trying to do something completely new. How about, for example, making it as easy as possible to use React with a C# backend?
Re:.NET Blazor by kqr on Tuesday November 21, 2023 @10:29AM (#38364916)
You get a little closer with Fable to compile F# to JavaScript. It lets you model your domain using F# types (which are just as good as – if not better than – C# types) and then you can use them both from your C# backend and F# or JavaScript frontend (whichever you prefer.)

It does require you to faff about with toolchains for building frontend code though (WebPack and the like), and it's not always completely seamless, but if you want to invest in a shared domain model it's the most compatible I've been able to go at least.

Re:.NET Blazor by theolivenbaum on Tuesday November 21, 2023 @11:00AM (#38365436)
Or similar for c# with https://h5.rocks (disclaimer: author here)
Re:.NET Blazor by jmnicolas on Tuesday November 21, 2023 @10:31AM (#38364951)
Contrary to Google, MS never kills any tech. You can still develop Winforms apps today.
Re:.NET Blazor by DylanSp on Tuesday November 21, 2023 @12:08PM (#38366513)
Oh, that's handy, I thought MS had stopped supporting it. Good to know that it's still going. I thought they had dropped support in one of the .NET Core versions, before .NET 5+.
Re:.NET Blazor by jongalloway2 on Tuesday November 21, 2023 @01:19PM (#38367667)
Presentation from .NET Conf 2023 last week with some of the new stuff: https://www.youtube.com/watch?v=N1weyWS_pL0
Re:.NET Blazor by DylanSp on Tuesday November 21, 2023 @01:40PM (#38368051)
Thanks for linking that. The video description mentions they added WinForms to .NET Core in 3.0; maybe I was remembering the .NET Core 2.1/2.2 timeframe, when it wasn't supported in Core?
Re:.NET Blazor by progmetaldev on Tuesday November 21, 2023 @11:38PM (#38374779)
I believe prior to .NET Core 3.0, you could have a WinForms application in .NET Core, but the WinForms designer was not available in Visual Studio. While it was possible, having to build a GUI in WinForms without the designer is utter hell.
Re:.NET Blazor by twisteriffic on Tuesday November 21, 2023 @10:40AM (#38365115)
They don't kill it, they just tie it up in the basement and pretend it never existed.
Re:.NET Blazor by glonq on Tuesday November 21, 2023 @11:14AM (#38365612)
RIP Silverlight
Re:.NET Blazor by unsignedint on Tuesday November 21, 2023 @01:52PM (#38368238)
Silverlight's phase-out primarily stemmed from the browser ecosystem's shift away from plugins. It's worth noting that Silverlight 5 was supported until October 2021, a decade after its release, indicating substantial longevity despite the changing landscape.
Re:.NET Blazor by v-erne on Tuesday November 21, 2023 @05:47PM (#38371590)
Ok first thing first - allow me to vent my existential frustration with few off the cuff (mostly rhetorical) questions ...

You call decade a substantial longevity?

Is this some kind of a joke?

Is your ability to assess being held hostage by js ecosystem expererience?

But seriously - I expect a bit more from platform that could potentially waste my life and my venture. I am still happily supporting some Java (and JSF) code that I have written for clients 15 years ago (don't you just love that sweet support fees that you get mostly for being alive and breathing ?). Meanwhile my friend that build whole company around product written in silverlight almost went bankrupt. Now after few years working in AI (going into it a bit too soon) he is trying to create same product in ... yes you guessed it, Blazor.

Maybe some people do not learn from their mistakes :)?

Re:.NET Blazor by unsignedint on Tuesday November 21, 2023 @08:41PM (#38373481)
Yes, I would call that fairly substantial considering its underlying architecture is no longer viable -- not because of Microsoft's fault, but as the industry as whole moved away from the plugin-based AIR.

Silverlight was somewhat of a unique situation, as it was a platform where it heavily relied on the platform that was phasing out. (And to clarify, that "decade" is the period that Microsoft was committed to support for latest Silverlight 5. Their first version was released in 2007, so it had about 14 years of history.)

As with Java or any other languages, you can still run it if the environment it runs can be resurrected. (I would not connect that to the internet, though) And many parts of what actually powered Silverlight still thrive in a form of .Net.

I mean where they can support, Microsoft tends to keep its compatibility fairly intact, for instance modern Windows still can run many of the 32-bit binaries from early days. (And you even could do the same for 16-bit apps on a 32-bit platform, not sure if that's still possible, though.)

Re:.NET Blazor by miffy900 on Tuesday November 21, 2023 @07:51PM (#38373029)
> Maybe some people do not learn from their mistakes :)?

Maybe some people do learn, and in this case it's Microsoft, who are not repeating the same thing with Blazor as they did with Silverlight.

Re:.NET Blazor by progmetaldev on Tuesday November 21, 2023 @11:35PM (#38374762)
The difference is that Blazor is built on web standards (WebAssembly), not a proprietary technology. Sure, Microsoft could discontinue support for Blazor, but WebAssembly will keep running. C#/Blazor are not the only technologies using WebAssembly. I personally wouldn't use Blazor for a public facing website, and would only use it for an internal LOB app where I know I can dictate what browser technologies can be used, as well as knowing the binary blob for the runtime will be cached in most users' browsers. I still use traditional MVC structure with C# for applications that will have a variety of users over different connection types, and use progressive enhancement with JavaScript for things that enhance the user experience (for example, creating multiple items of some type on screen, instead of only being able to create one at a time like with a standard form). The thing is, I've already separated out my application logic so that I can change the front-end technology at any time. That really shouldn't have anything to do with Blazor, and is just a way to make sure your application can adapt to future front-end technologies.
Re:.NET Blazor by NicoJuicy on Wednesday November 22, 2023 @12:32AM (#38375083)
Correct.

Silverlight came when flash was being dismantled shortly after.

Different days back then.

Re:.NET Blazor by no_wizard on Wednesday November 22, 2023 @11:15AM (#38381166)
No knock on C# or Java developers meant here, however I find that C# and Java Developers find 10 years of support not long enough, nearly every other ecosystem you're lucky if you get 3 year time horizons of backward compatibility and/or support.

10 years is pretty amazing, all told, IMO.

Re:.NET Blazor by gwervc on Tuesday November 21, 2023 @11:36AM (#38365948)
Blazor is just a new iteration on Volta (2007) https://en.m.wikipedia.org/wiki/Microsoft_Live_Labs_Volta
Re:.NET Blazor by jodrellblank on Tuesday November 21, 2023 @10:44AM (#38365174)
Re:.NET Blazor by starik36 on Tuesday November 21, 2023 @11:57AM (#38366334)
That's because WinForms are in active development. But yes, for a while, it was baked.
Re:.NET Blazor by steve1977 on Tuesday November 21, 2023 @12:52PM (#38367183)
You can still develop Win32 and MFC apps today - those are more then 30 years old.
Re:.NET Blazor by pjmlp on Wednesday November 22, 2023 @04:52AM (#38377170)
Win32 is the main Windows API, and MFC, besides fixing HDPI issues, the hard reality is that after crashing the whole WinRT/UWP story for C++ developers, there is nothing left on the Microsoft ecosystem for doing GUI in C++.
Re:.NET Blazor by steve1977 on Wednesday November 22, 2023 @05:03AM (#38377241)
Yeah unless you go non-MS frameworks like Qt.

And yes, the current state of affairs is kinda sad.

Re:.NET Blazor by jeroen79 on Tuesday November 21, 2023 @02:20PM (#38368567)
Thats not always true, they keep some stuff that is a success for a long time, but they are also not afraid to drop there failures like ActiveX, SilverLight, VBScript, ...

And i am afraid blazer may be next.

Re:.NET Blazor by NicoJuicy on Wednesday November 22, 2023 @12:36AM (#38375103)
Vbscript - deprecated, started 28!! Years ago

ActiveX - same, but 27! Years ago

Those were not failures. But have replacements.

Those are terrible examples tbh. A lot of businesses would sign immediately if they knew something was going to be supported for > 20 years. Additionally, vbscript owners should have long migrated to eg. Powershell

Re:.NET Blazor by johnnyballgame on Tuesday November 21, 2023 @03:06PM (#38369315)
RIP FoxPro.
Re:.NET Blazor by mattmanser on Tuesday November 21, 2023 @05:21PM (#38371247)
Silverlight, WPF, OData (was amazing for hooking your backend up to client-side tables, rubbish at everything else), WWF (Windows Workflow Foundation), WCF (thank god).

All dead.

And those are just the ones I can think of from the top of my head.

Plus the terrible excel VBA replacement they made, then abandoned, and now it's some fiddly javascript mess.

I'm sure there's a ton more people can add. Those are just the ones I personally wasted time on.

And let's not forget Window Mobile!

Edit: They've also gone through a stupid amount of changes in the asp.net MVC model in quite a short time. Plus constantly seem to overhaul their consistently overcomplicated authentication/authorization system. The state it's in at the moment is shockingly bad.

Re:.NET Blazor by pjmlp on Wednesday November 22, 2023 @04:50AM (#38377158)
Try Silverlight, XNA, C++/CX, .NET Native, UAP,....

The difference is that they stop talking about it, their presence fades away in conference and developer blogs, and eventually from Visual Studio installation workloads.

Re:.NET Blazor by yndoendo on Wednesday November 22, 2023 @10:27AM (#38380524)
WinForms can still be used with all of the stagnant issues. Had a faulty touchscreen driver on Windows 10 that only affected the touchscreen event messaging in a WinForms application. Had to wire directly into the messaging pump, construct a custom event system, and override the WinForms event system for everything to work properly.

Also had to wire a custom touchscreen event system for WPF because the Microsoft method would latch on to UI components with quick taps and press with sliding. This caused buttons to stay pressed while no fingers where on the screen.

I cannot recommend WinForms or WPF or UWP. Microsoft is bad at GUI application frameworks. It was recently that they finally shipped VS2022 with proper WinForms designer support and the ability to move away from VS2019. I still need to close and reopen VS2022 daily for WinForms and WPF development.

QT, GTK or some other framework gives the ability for cross platform solutions without being anchored to Window OS. Non Microsoft GUI frameworks are also faster and better when deterministic response time is needed and ability to run on low powered computers.

Re:.NET Blazor by password4321 on Tuesday November 21, 2023 @11:10AM (#38365549)
Web Forms ("I'm not dead"), Silverlight, etc.
Re:.NET Blazor by progmetaldev on Tuesday November 21, 2023 @11:40PM (#38374790)
.NET Framework has not been EOL'd, so you can still build applications in WebForms. Silverlight was killed off by browsers no longer supporting plugins, that really wasn't a Microsoft decision. Flash is no longer available either, and had nothing to do with Microsoft.
Re:.NET Blazor by strich on Tuesday November 21, 2023 @10:33AM (#38364986)
You can't be blamed for having that opinion given history. But Blazor is I think standing on the graves of those previous attempts and is looking extremely strong - it is as of even a year ago mature, well supported, and a deep ecosystem.

I think it's pretty safe to be optimistic at this point.

Re:.NET Blazor by pier25 on Tuesday November 21, 2023 @10:06AM (#38364594)
React will die too, eventually. Or at least stop becoming the default.
Re:.NET Blazor by Someone1234 on Tuesday November 21, 2023 @11:42AM (#38366055)
Let's say it does: It leaves behind a WebAPI backend that [new hotness] can utilize. WebAPI is an agnostic protocol.

What does Blazor leave behind? Nothing reusable at all. It is a proprietary server hosting proprietary connections via proprietary pipeline. Plus sometimes inscrutable WebAssembly. Just go ask all the companies STILL stuck on Web Forms or Silverlight how that worked out for them the last times? Exactly.

Friends don't let friends buy into proprietary backends that muddy the water between UI/API layers. Stick to WebAPI and put whatever you want in front. That way you can migrate either front OR back independently of one another (and or do piecemeal migrations).

PS - This has nothing to do with "Microsoft bad." This has to do with standard protocols between front/back Vs bespoke stuff. I'd also criticize the short-sightedness if another company offered the same thing.

Re:.NET Blazor by progmetaldev on Tuesday November 21, 2023 @12:25PM (#38366821)
Best practices would dictate that you still build WebAPIs for your Blazor apps, to avoid that potentially happening. It will also give you a clean separation of concerns in your application. Even when I build a traditional MVC application, I still built out my API as a separate layer so I can change out the front-end in the future.
Re:.NET Blazor by Someone1234 on Tuesday November 21, 2023 @12:33PM (#38366860)
So, in order to use Blazor safely, I need to develop and test everything twice. That's a death knell within itself. You just made my argument for me.
Re:.NET Blazor by halfcat on Tuesday November 21, 2023 @02:56PM (#38369166)
> I need to develop and test everything twice.

That’s…literally the downside of frontend/backend separation of concerns…

Re:.NET Blazor by progmetaldev on Tuesday November 21, 2023 @12:37PM (#38366920)
Do you not bother testing your JavaScript?
Re:.NET Blazor by Someone1234 on Tuesday November 21, 2023 @02:15PM (#38368492)
We're discussing which abstraction is between the backend/front end. You said, to use Blazor safely, I also need to deploy WebAPI. I said you therefore need to test and develop it all twice: Blazor and WebAPI.

Your "question" is non-sequitur.

Re:.NET Blazor by progmetaldev on Tuesday November 21, 2023 @11:25PM (#38374704)
So you would build a solution that combined both using Blazor? I still don't understand, this is just like if you were to build a WebAPI and a front-end JavaScript SPA, except Blazor is your JavaScript SPA. You have your unit tests for your WebAPI, and you have your tests for your JavaScript SPA (in this case Blazor, but fill in Vue or React, etc.). You could then write integration tests if you wished, but there isn't any more testing or development process than if you were building a WebAPI with a traditional JavaScript SPA. Blazor is just affording you the ability to use C# rather than JavaScript.

If you were to include your business logic directly into your Blazor application, then you are setting yourself up to run into the exact same issues that you faced with WebForms, if Blazor were to be discontinued. You stated, "Stick to WebAPI and put whatever you want in front. That way you can migrate either front OR back independently of one another (and or do piecemeal migrations)." Blazor is what you put in front. Blazor gets discontinued, you put a standard JavaScript framework in front. The amount of code written and the amount of tests written should be the same whether you use Blazor or React/Vue/Angular/Svelte/JS Framework of the week. What you get with Blazor is the ability to do all your front-end in C#. I think you are going at it as if you build old WebForms or Silverlight, and I just don't see why you would do that knowing full well that front-end tech changes rapidly.

Re:.NET Blazor by osigurdson on Tuesday November 21, 2023 @10:19AM (#38364775)
Agree, but a dying star creates new life and pathways from old to new. A dying snowflake, just evaporates.
Re:.NET Blazor by seti0Cha on Tuesday November 21, 2023 @10:57AM (#38365396)
I used to be a frontend coder, but am no longer. In part this is because I couldn't bring myself to keep up with the constant ecosystem churn of the JS world. I recently worked at a company that was trying to migrate from Vue 2 to Vue 3. It was not going quickly. Is Vue going to even be around in a few years, or will React eat it entirely? Or will react itself be eaten by Svelte? I have no idea, I'm not involved in these things. But after watching how such things play out for a couple of decades, my conclusion is that if you are building for the web, you should use whatever you are comfortable with and what provides the features you want now, because there's no way to know what things will look like a few years down the road. Even if the framework you chose sticks around, you may end up doing a rewrite because of other concerns or throw the whole thing away altogether.
Re:.NET Blazor by tester756 on Wednesday November 22, 2023 @06:36AM (#38377890)
>How about, for example, making it as easy as possible to use React with a C# backend?

Aint is easy already?