Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Why JavaScript when you can see sharp?

Why JavaScript when you can see sharp?

So far JavaScript had a monopoly on web code - we could either write some form of JavaScript or not execute code on the web.
The WebAssembly standard changes that, by defining a binary code standard that could be directly executed by the browser. That binary code could be written in any language compilable to wasm - and that could mean C# as well.

In this session we'll take a look at Blazor, an engine that enables us to write C# code for the server, C# code for the client, run it, and, if we're lucky, it might even work.

Wekoslav Stefanovski

November 17, 2018
Tweet

More Decks by Wekoslav Stefanovski

Other Decks in Programming

Transcript

  1. Nov 17, 2018 Sofia var title=“Why JavaScript when you can

    see sharp?“; var info = { name: “Wekoslav Stefanovski”, position: “Head of development”, company: “Sourcico”, country: “Macedonia”, twitter: “@swekster”, };
  2. Nov 17, 2018 whoami(); •Head of Development in Sourcico Macedonia

    •Coding professionally since last century •I love programming, I love programmers •Long and fruitful love relationship with C# •Long and fruitful love / hate relationship with JavaScript •Love web development, hate all the drama Wekoslav Stefanovski @swekster
  3. Nov 17, 2018 agenda(); • Web applications, what are those?

    • Why JavaScript sucks? • What is Blazor? • How does it work? • What can we make with it? Wekoslav Stefanovski @swekster
  4. Nov 17, 2018 Thanks to our Sponsors: General Sponsor: Gold

    Sponsors: Technological Partner: Hosting Partner: Silver Sponsors: Lunch Sponsor: Innovation Sponsor: Bronze Sponsors: Infotainment Sponsor:
  5. Nov 17, 2018 Regular Web Application • We have to

    use a client and a server architecture • We can write the server in many, many languages (including C# and JavaScript) • We have to write the client in JavaScript Wekoslav Stefanovski @swekster
  6. Nov 17, 2018 Why JavaScript sucks • Built as a

    scripting language – and the legacy shows • No language solutions to common problems (i.e. namespaces) • Weird type coercion and equality rules • Half-baked object orientation • It's gotten much, much better in recent years • Still, sometimes feels like putting lipstick on a pig • And still, it's the only choice! Wekoslav Stefanovski @swekster
  7. Nov 17, 2018 And now for something completely different... •

    Let's build the server in JavaScript (because we want to) • Let's build the client in C# (because we now can :D ) Wekoslav Stefanovski @swekster
  8. Nov 17, 2018 What did we see? Wekoslav Stefanovski @swekster

    C# running in the browser !!! .net dlls executing on the client !!! MASS HYSTERIA !!!
  9. Nov 17, 2018 What did we see? • C# running

    on top of the mono runtime, built on top of wasm • Razor-like syntax • Still highly experimental, but showing tremendous promise Wekoslav Stefanovski @swekster
  10. Nov 17, 2018 So, what can Blazor do? • A

    component model for building composable UI • Routing • Dependency injection • JavaScript interop • Usage of existing code libraries Wekoslav Stefanovski @swekster
  11. Nov 17, 2018 Bottom line • Great potential for development

    • Not ready for production (yet) o You can help with development • Gives us an (real) alternative for modern web development Wekoslav Stefanovski @swekster
  12. Nov 17, 2018 Thanks to our Sponsors: General Sponsor: Gold

    Sponsors: Technological Partner: Hosting Partner: Silver Sponsors: Lunch Sponsor: Innovation Sponsor: Bronze Sponsors: Infotainment Sponsor: