Taurius Litvinavicius
Jonava, Lithuania
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-5445-5 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-5445-5 e-ISBN 978-1-4842-5446-2
https://doi.org/10.1007/978-1-4842-5446-2
Taurius Litvinavicius 2019
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Introduction
For many years the web development community has been waiting for something new, something to escape that dreaded JavaScript monopoly. Finally, the prayers have been answered first with the release of WebAssembly and now with the release of Blazor. This book will explore Blazor in its full depth, and alongside that, you will understand what role WebAssembly plays in this whole arrangement. In fact, this is where we will begin; we will learn what Blazor is, where it runs, and how to start using it. Being a businessman with software development skills, the author has a unique view toward technologies and may base his predictions of the future for the technology not only on it being convenient to code but also on having tremendous business value. Although the technology is still young, the author has already managed and taken part in the development of a large-scale platform mashdrop.com and from that experience can tell you firsthand about the ease of use and efficiency of using Blazor for the project.
The book will focus on practicality and practice; therefore, you can expect lots of sample code and some exercises to complete. In fact, we will have five exercises, covering all types of Blazor, and with that, we will explore some use cases. The author believes in experiential learning; that is why, from the early stages of the book, we will be exploring Blazor by looking at code samples or folder structures of projects. Since Blazor is not a stand-alone technology, such as a programming language, the best way to learn it is to interact with it, see what it looks like in the code, and uncover some similarities with technologies using the same programming language in this case C#. You will see, you will do, and most importantly you will learn.
About the Author and About the Technical Reviewer
About the Author
Taurius Litvinavicius
is a businessman and technology expert based in Lithuania who has worked with various organizations in building and implementing various projects in software development, sales, and other fields of business. He works on a platform called MashDrop, which is a modern way to monetize the influence of an influencer. As with most of his projects, this one uses cutting-edge technologies such as Blazor. He is responsible for technological improvements, development of new features, and general management.
Taurius is also the director at the Conficiens solutio consulting agency, where he supervises development and maintenance of various projects and activities.
About the Technical Reviewer
Carsten Thomsen
is a back-end developer primarily, but working with smaller front-end bits as well. He has authored and reviewed a number of books, and created numerous Microsoft Learning courses, all to do with software development. He works as a freelancer/contractor in various countries in Europe, using Azure, Visual Studio, Azure DevOps, and GitHub as some of the tools he works with. Being an exceptional troubleshooter, asking the right questions, including the less logical ones, in a most logical to least logical fashion, he also enjoys working with architecture, research, analysis, development, testing, and bug fixing. Carsten is a very good communicator with great mentoring and team lead skills, and great skills researching and presenting new material.
Taurius Litvinavicius 2019
T. Litvinavicius Exploring Blazor https://doi.org/10.1007/978-1-4842-5446-2_1
1. Introduction
Before you start, you need to know and prepare a few things. This is not an introductory book to C# or .NET Core development, so you should have good knowledge of C# and be able to build applications with it. It does not matter if you develop back-end applications, Windows applications, or mobile applications; as long as you use C#, you will find something familiar in Blazor. You need to install some software on your system, starting with Visual Studio 2019, followed by the latest version of .NET Core 3.0.
What is Blazor?
Blazor is a web UI framework allowing you to use C# and .NET Core on the front end. It allows you to develop your front-end logic in a couple of different ways using the C# programming language, and that is something that we will explore later in this chapter.