1. 11

  2. 19

    If the current trends in web development is adding as much abstractions as possible and making the simplest possible website bigger and bigger. Yes, Blazor is the obvious evolution, a really big step in that direction.

    1. 4

      In some cases sure. New patterns are always exploited and used incorrectly. And there are folks who will use that same pattern to make applications less complex. Depending on the use case, Blazor could provide a great opportunity for skilled C# developers to build sane front end applications without downloading any plugins. Inversely they can build slick thin client scenarios to make a server application more accessible.

      It’s all in how you use it. It’s not magical unicorn dust, but it’s a fantastic concept.

      1. 14

        IMHO, the downsides are way bigger than the benefits.

        In case of C# developers, the advantages aren’t as big when you realize Typescript exists.

        The application size for a WebAssembly build is insane.

        The lag with the “Blazor server” option is plain terrible.

        The complexity introduced by both solutions is over the roof.

        I’ve worked with Microsoft technologies exclusively for nearly 4 years. Can’t think a single scenario in which Blazor would make any sense.

        1. 7

          you realize Typescript exists

          and is strongly supported by Microsoft, having been worked on prior to its public release by the lead architect of C# too.

          1. 3
            • App size will drop, and steadily.
            • Typscript is not quite as powerful as C#, we need that power these days.
            • Complexity => all being neatly abstracted, that’s the point.

            It was released over the last few months, give it a chance to mature.

            1. 4

              App size will drop, and steadily.

              I would love to see how, taking in count that C# needs a runtime (Mono for example). You can do work to shrink a runtime, but enough to make it acceptable for a internet connection that isn’t perfect? Like, 3G mobile tethering or somewhere outside the first world.

              Typscript is not quite as powerful as C#, we need that power these days.

              Can agree that C# is more powerful, but Typescript is enough, and produces minifiable javascript code that doesn’t depend on an extra runtime, other than the browser’s build-in javascript interpreter. I would love to see some evolution on the Haxe compilation on JS.

              Complexity => all being neatly abstracted, that’s the point.

              By experience, I know how are the Microsoft’s abstractions: Complex and rigid. Which means leaky and you will not be able to do anything about it.

              1. 3

                in what way is c# more powerful than ts? Pattern matching? I can’t think of anything else, I’d argue in more ways typescript is more powerful in the type department with proper unions + intersection types, mapped types, conditional types. See https://www.typescriptlang.org/docs/handbook/advanced-types.html

      2. 8

        @jeremymorgan This is a clickbaity title that i didn’t bother clicking on. Descriptive title would have been useful, e.g. ‘Blazor is a %s that makes %s %d% faster and improves %s and %s with %s’

        1. 2

          Mods can we change the title? I’m with james, it’s way too sensationalist.

        2. 7

          Hype aside, I’ve gone looking through Java and C# frontends a few times as a serious alternative to TypeScript.

          TypeScript is a huge improvement on JavaScript for web apps. But lacking runtime types (e.g. for safety and pattern matching) is such a pain. Even as a big ML guy, none of the Haskell/Elm/Reason/BuckleScript/Scala.js options are seriously something I’d consider introducing at work.

          I am looking forward to the next generation of mainstream typed frontends after TypeScript. I’d consider Blazor or even GWT/J2CL next time around. But my guess is that it the next generation mainstream frontend will be something else completely.

          1. 2

            If you don’t mind losing async/await functionality, check out Haxe compilation to JavaScript… Is able to check if something implements an interface on runtime, for example.

            I would be all-in with it, but the lack of async/await is a bit painful. I don’t want to get back to the callback hell, or chain promises in obscure ways.

            1. 1

              typescript can be used as an extremely strict language with compiler options (like no implicit any, strict null checks, and probably some more). I know this isn’t the default so its hard to introduce into existing codebases but honestly the only downside to typescript is that it doesn’t expand on features like pattern matching and it doesn’t have proper tuples, but the type aspect of it is probably the most powerful of any mainstream language I’ve seen - see type operators like conditional types, mapped types, keyof operator, etc.

              1. 1

                Did you consider clojurescript?

                1. 2

                  While I’ve seen more companies using Clojure(script) or Scala(.js) they are both on the same list of languages I don’t think will ever be mainstream enough for me to feel comfortable introducing for a long-term project at work.

                  Edit: also, Clojure is as bad as JavaScript (give or take macros and limited pattern matching). If I wanted a dynamic language without type safety I’d stick with JavaScript. I like JavaScript a lot. I just want something safer at work.

                2. 1

                  You probably weren’t looking for swathes of suggestions as replies but I enjoyed Ocsigen (OCaml) several years ago and it looks like it’s still going strong. Eliom is an extension of OCaml that basically does what Blazor does.

                3. 4

                  TL;DR; but based on

                  Both client and server code is written in C#

                  and what I see on pictures:

                  Have they reinvented Java frameworks like Vaadin (since circa 2009) or Echo2 (2005)? Happy new year 2020 :-)

                  1. 1

                    I wish I could have both the WASM and Blazor Server method. Let me use the server method while the runtime downloads for the first time, and then transition to WASM once it’s ready.