7 ms·
The amount of energy Microsoft is pouring into these front-end efforts is pretty incredible. A more recent development that has me very excited is Blazor Deskto
by bob1029 6y ago
The amount of energy Microsoft is pouring into these front-end efforts is pretty incredible. A more recent development that has me very excited is Blazor Desktop:
https://medium.com/young-coder/blazor-desktop-the-electron-for-net-ecdcf5c30027 https://medium.com/young-coder/blazor-desktop-the-electron-f...
> This leads to the second difference — in a Blazor Desktop app hosted in WebWindow, there’s no built-in web server. Instead, it’s pure .NET all the way down. And while we haven’t seen exactly how this will be implemented, it offers the chance to simplify the hosting model quite a bit. If everything comes together just right, it will be like using Electron without needing to learn Node.
I honestly believe this model is going to revolutionize front-end development. The productivity uplift of not having to fuck around with JSON APIs alone is worth the price of admission. We already use Blazor (server-side) for several of our webapps. I have been able to implement things in 4 hours that would easily have taken 4 weeks if I had to argue with other developers about the shape of a JSON blob on the wire. Need a projection involving 3 collections to produce a table? No problem. It's literally 3-5 lines of LINQ in your razor file. With a "proper" JSON API, you would probably have to fetch 3 different resources to the client or develop a special unicorn method for each unique projection.
- Scarbutt 6y agoIsn't asp.net the equivalent of javaee in the microsoft world?
- ripley12 6y agoAgreed, I really think Blazor is the way forward for .NET UI. It's bittersweet, but: the Windows and .NET teams have failed to deliver a compelling alternative to web UI, and I'm impressed with how well Blazor integrates web UI with .NET. I think the killer feature is that it will work on any platform with a decent webview control (Windows will finally be joining that club soon when WebView2 ships in-box), including MAUI; so you can use the native hosting bits of MAUI and the web UI bits of Blazor, no XAML required. And then you can reuse that same UI on another platform or a web browser, trivially. Hot reload for Blazor dropped in the recent .NET 6 preview 3 so this is a really good time to get started with it. It blows XAML Hot Reload out of the water because it can reload many C# changes in addition to HTML/CSS changes; XAML Hot Reload breaks down as soon as you need to change any C# code that touches your UI.
- eyegor 6y agoXaml hot reload only works on about half of our views at work, and even then it tends to break itself. I've tried net framework, net core, and net 5. The newer targets break less often but we still can't ship net 5 thanks to Windows 7 extended support contracts from Microsoft. It doesn't even compare to blazors implementation. And c# hot reload breaks frequently around asyncs and lambdas.
- GiorgioG 6y ago> The newer targets break less often but we still can't ship net 5 thanks to Windows 7 extended support contracts from Microsoft You make it sound like it's Microsoft's fault your customers won't move off of Windows 7.
- mattmanser 6y agoHe has a point, for example now they've finally stopped supporting IE11 you can legitimately say to customers that supporting IE11 is no longer possible because it's a security hole. Extended support by MS for Windows 7 means the only reason you're not supporting it yourself is your lack of motivation, and so to your customers (and your own upper management), for a big contract that's not going to wash. You might even find that their contract even says something to that effect.
- wokwokwok 6y ago> I have been able to implement things in 4 hours that would easily have taken 4 weeks if I had to argue with other developers about the shape of a JSON blob on the wire. I can’t comment on your specific circumstances because I don’t know the details, but this reads like someone who is drinking the blazer coolaid. It’s a technology like any other, with specific trade offs. If you have a front end team who lacks the basic competence to do something that takes four hours in blazor in less than 4 weeks, then maybe it’s a good trade off. ...but in most cases, for most people, that won’t be the case. It’s also quite slow, hard to integrate with existing js technology (ie bridge) and very difficult to debug production issues with in my experience.
- ithrow 6y agoI haven't use Blazor but they mentioning about avoiding the json API with all the encoding/deconding that entails sounds nice, plus only doing routing in the backend. These frameworks (liveview, blazor, hotwire, etc...) seem like a nice compromise that can serve well most webapps out there.
- manigandham 6y agoThe fact that you have to interface between different teams/languages is often a big part of the slowdown. The productivity improvements are real. Not having to design and expose an API for the frontend and instead just reuse the same classes and services is a massive shortcut. Running Blazor on the server is even easier because there's no serialization at all and you can directly call database queries in response to UI events. I suggest watching some of the Blazor presentations to see just how much complexity can be built in minutes compared to more traditional frontend frameworks: https://www.youtube.com/watch?v=CEjqhTGrqDY https://www.youtube.com/watch?v=CEjqhTGrqDY
- nirav72 6y agoIsn't load balancing still an issue with server side blazor? Because of SignalR for the delta between server and client?
- 6y ago
- TeeMassive 6y agoI really changed my mind about Microsoft over the years in a positive way since they changed their attitude over everything that's not Windows based.
- fsloth 6y agoThat's like saying someone would not like Apple because the support only iOS and macOS. Championing Windows really has never been the problem with MS. It's the business practices why people generally have bad memories of them.
- sandGorgon 6y agoHave you tried Flutter Web instead? https://devblogs.microsoft.com/surface-duo/flutter-dual-screen-foldable/ https://devblogs.microsoft.com/surface-duo/flutter-dual-scre...
- oaiey 6y agoMaui is targeting React Native and Flutter. Same for Blazer with Electron. They make this attempts to bring C# everywhere. Using Flutter, Angular or setting else is the context switch they try to avoid. For me, as a .NET fanboy, they are a year or two late.
- sandGorgon 6y agothis is very interesting. Are you saying that Maui will generate Flutter code using c# ? BTW, there's a very interesting (and amusing) bug that advocated "dumping Maui for Flutter" https://github.com/dotnet/maui/issues/160 https://github.com/dotnet/maui/issues/160
- oaiey 6y agoHaha ... no. Sorry for writing the sentence like that. My fault. It is not a compiler target but from a business perspective the target audience they address. Flutter with its Dart language and an own VM is not a goal for .NET. This is the .NET team building a UI framework for C#/CLR/.NET developers. Flutter is different from WebAssembly (which is more a CPU architecture) in that regards. From a .NET team perspective, they see themselves (most likely rightfully) as a full stack competitor to JavaScript and Java and that requires Browser, Apps/Desktop, Server, Web Pages and native Cloud in the portfolio. Dart, Go and even mighty Python are not in the place were .NET, Java and JavaScript is in this regards (yet and from a non-hacky perspective ;)).
- dnndev 6y agoWhy not just go all in and back react native? looks like they use it extensively already https://appfigures.com/resources/insights/microsoft-goes-all-in-on-react-native https://appfigures.com/resources/insights/microsoft-goes-all...
- kumarvvr 6y ago> fuck around with JSON APIs alone is worth the price of admission This is true for Blazor Server as well. I just love the fact that you can generate HTML on the server and have the productivity boost of having to work with a React like component system.
- ab_testing 6y agoWhat is a good way to learn the .NET framework or a guided path to understand the development hierarchy in .NET. It seems expansive with tools for everything from web, app and desktop development. Microsoft provides tutorials but it feels like they are all over the place and not really directed.
- oaiey 6y agoLearn C# in vscode and console applications. After that, search the app model (they have like 20 of them). And you want to .NET and not the .NET Framework :). What tutorial is best, depends a lot on your experience and target.
- ChicagoDave 6y agoWell this is a very loaded question. I’d tackle it by basic aspects of base development. - File Handling, IO, Streams - Data Storage, ADO.NET - Generics, Collections - Linq, Lambdas - Threading, Tasks - Cryptography I’d just build console apps, which you can do on Windows, Linux, or MacOS. Just install dotnet-core.
- tester34 6y agoI'd recommend skipping ADO and learn Dapper/EF Core (this is harder to learn because its huge)
- bob1029 6y agoI'd consider going straight into Dapper. It's where you'll end up anyways if you start worrying about performance. Direct SQL queries and matching projection models allow for much more flexibility in all areas. If you are bad at SQL, EF Core won't save you for very long. Might as well learn it the hard way.
- nor0x 6y agoi can recommend the .NET 101 series on YouTube. If you want to quickly write .NET code you should try the .NET Interactive extension for VSCode
- flukus 6y ago> The amount of energy Microsoft is pouring into these front-end efforts is pretty incredible. After winforms, silverlight, wpf, webforms and WinUI I don't want energy, I want to see them focus for more than 5 minutes. The only stable UI tech from MS with any long term support has been Win32 that came out 25 years ago. I predict blazor will be quietly dropped (they won't actually admit it for 5 years), just like the others and you'll be forced to rewrite your software in a few years.
- scaladev 6y agoThese blog posts are as relevant as ever. https://www.joelonsoftware.com/2002/01/06/fire-and-motion/ https://www.joelonsoftware.com/2002/01/06/fire-and-motion/ https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost-the-api-war/ https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost...
- manigandham 6y agoOther than Silverlight, the rest are still available today. Microsoft is unmatched in backwards compatibility. How are you being forced to rewrite your software?
- flukus 6y ago.net core broke compatibility with many more, c#/.net is now decoupled from MS legendary backwards compatibility. Then you've got things like hiring concerns, $nextJob will want people with $nextTech on their resume, it doesn't matter if something is still technically supported because hiring people willing to work on dead platforms is a tough ask, moreso when the tech is a couple of generations old. This churn isn't happening in a vacuum.
- manigandham 6y agoAgain, you do not need to rewrite anything if you don't want to upgrade to .netcore/5.0 because .NET Framework is still supported and has a long lifecycle tied to Windows itself. You can even write C# 1.0 code and it will still compile and run today without any issue. Do you expect software to stand still for decades? Please show which other language stack comes anywhere close to this kind of stability because several of them (go, nodejs, rust) didn't even exist when .NET was first released and running critical systems in major companies. You can still find COBOL and Fortran jobs if you want to avoid anything new, no need to complain about the industry moving on.
- 3dee 6y agoWhile I agree Blazor is great, everytime I use it it feels unfinished. For example binding select inputs to object is not possible while it has been working in other Javascript frameworks for years. Ofcourse you can use workarounds but it always feels like a step back. And for some project that use custom auth it can be difficult to auth both Blazor and Controllers if you need some. But overall it is a great experience. And I think frameworks like Blazor and Liveview are the future.
- andix 6y agoThat's what I always think about MS GUI frameworks. My rant towards Microsoft: Get some average students and let them build a real world demo application. Write down all the stupid questions they have and all the problems they struggle with. Consider them as bugs or bad design choices and solve them. Do that before you release stuff. Microsoft delivers amazing quality in some fields, language design (c# and f#), ASP.NET Core and everything in Micrsoft.Extsions.* is amazing. Also .NET Core was a very successful project (after the hell of PCL and .NET Standard). But WHY can't you build a proper and usable UI framework?!?!?!!!
- andix 6y agoThe concept is revolutionary, for sure. But for now it doesn't work as well as a classic SPA architecture. The server-side mode works not very well on poor connections (mobile), and the client-side WASM builds are extremely slow. Especially on first load, this takes seconds. Blazor may be well suited for Intranet apps already, where quick&cheap development is very important, and connections are fast and stable. Blazor Desktop is an example for that use case (no latency between frontend and backend). For internet apps, something like Gmail or Instagram, it seems to be not very well suited. Especially not for websites with interactive content, for example a comment-box inside a blog. Nobody wants to wait multiple seconds until the content is responsive, or the "reconnecting to server" overlay disappears
- manigandham 6y agoPages can be server-side rendered and then hydrated after load, in either mode. This makes a dramatic difference in usable latency.
- andix 6y agoSure. But it still takes some time until the interactive part works. And it doesn't solve connectivity issues a SPA can easily handle.
- manigandham 6y agoSPA = single page application. You can make one entirely in Blazor and can host it on any static file host. Are you talking about Javascript specifically?
- andix 6y agoThe difference of Blazor compared to a "classic" SPA (for example React + JSON API) is: Blazor Server: On a broken/poor connection there is no interactivity anymore Blazor WASM (=SPA): Keeps working when connection is lost, but everything is sooo slow classic SPA: Keeps working with lost connection and is fast.
- Rapzid 6y agoI really, really want to like Blazor. I like the shared code. I like that it borrows ideas from VueJS. I like that the recent hot reload efforts have put plugins on the table. I like the VSCode support and debugging experience once I got it working. I don't like the thought of all the js interopt I will need to do. I don't like thinking about how shimming jointjs is going to go. I don't like the lack of pipeline for working alongside an npm/typescript project for the inevitable js bits that need to be written. I don't like the lack of a preprocessor, bundling, and asset pipeline.. P.S. I hope the culmination of the hot reload work in asp.net will result in official guidance for creating proper plugins (controllers, services, models, assets, Blazor, etc) ala Grails. It feels close with the low level infra gaps being closed.