143 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris

Building a Web App with Blazor and ASP .Net Core , livre ebook

-

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris
Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus
143 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus

Description

Learn how to create and deploy a SPA in C# with Blazor

 

KEY FEATURES

● Get familiar with the basic and advanced concepts of the Blazor framework 

● Understand how to implement JavaScript interop in Blazor

● Learn how to inject the service dependency in Blazor

● Learn how to implement security using Authentication and authorization

● Deploy and host your Blazor app on IIS and Azure

 

DESCRIPTION

Blazor is a new, open-source, and SPA web framework that allows you to build a web application using C# and HTML. Blazor enables you to write C# code instead of JavaScript. 

 

This book is a comprehensive guide about the new modern Blazor framework. It begins with an introduction to the Blazor and its components and concepts. It explains how you can start the development process, what tools you can use to develop an application, and how you can deploy it. You will then learn more about Databind, Eventbinding, layout, routing, JavaScript interop, and Dependency Injection. Concepts such as Authentication and authorization, error handling are also covered. Towards the end, you will learn how to deploy your Single Page Application Using Blazor.

 

WHAT YOU WILL LEARN

● Explore and use a various way to create a Blazor component

● Get familiar with the working of Data Binding, Event Binding, Layouts, Routing, and Validation

● Learn how to invoke JavaScript functions from .NET methods

● Preserving State in Server-Side Blazor applications

● Authentication and Authorization using Facebook API & Google API

● Host and Deploy your Blazo app on IIS and Azure

 

WHO THIS BOOK IS FOR 

This book is for web developers who want to use Blazor to build web apps. This book will also help and guide web developers who are currently using Blazor.

 

AUTHOR BIO 

Jignesh Trivedi is working as a software developer with a leading organization and having more than 14 years of experience. He is very passionate about Microsoft Technologies. He is an author, speaker, and Microsoft MVP. He loves building great products and POC (proof of concepts) using the best available technologies. He loves to share his knowledge by contributing to the Developer community.

 


Sujets

Informations

Publié par
Date de parution 02 mars 2021
Nombre de lectures 26
EAN13 9789389845464
Langue English

Informations légales : prix de location à la page 0,1100€. Cette information est donnée uniquement à titre indicatif conformément à la législation en vigueur.

Extrait

Building a Web App with Blazor and ASP .NET Core

Create a Single Page App with Blazor Server and Entity Framework Core

by
Jignesh Trivedi
FIRST EDITION 2020
Copyright © BPB Publications, India
ISBN: 978-93-89845-457
All Rights Reserved. No part of this publication may be reproduced or distributed in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication.
LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY
The information contained in this book is true to correct and the best of author’s & publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but cannot be held responsible for any loss or damage arising from any information in this book.
All trademarks referred to in the book are acknowledged as properties of their respective owners.
Distributors:
BPB PUBLICATIONS
20, Ansari Road, Darya Ganj
New Delhi-110002
Ph: 23254990/23254991
MICRO MEDIA
Shop No. 5, Mahendra Chambers,
150 DN Rd. Next to Capital Cinema,
V.T. (C.S.T.) Station, MUMBAI-400 001
Ph: 22078296/22078297
DECCAN AGENCIES
4-3-329, Bank Street,
Hyderabad-500195
Ph: 24756967/24756400
BPB BOOK CENTRE
376 Old Lajpat Rai Market,
Delhi-110006
Ph: 23861747
Published by Manish Jain for BPB Publications, 20 Ansari Road, Darya Ganj, New Delhi-110002 and Printed by him at Repro India Ltd, Mumbai
Dedicated to
I would like to say many thanks to my mother Mrs Saryuben Trivedi and my wife Mrs Poorvi for their support. They deserve to have their name on the cover as much as I do for all their support made this possible. I would also like to say thanks to all my family members Girish Kumar Trivedi (father), Rakesh and Tejas (brother) for their continuous guidance and support to achieve my goals.
-Jignesh Trivedi
About the Author
Jignesh Trivedi is working as a software developer with a leading organization and having more than 14 years of experience. He is very passionate about Microsoft Technologies. He is an author, speaker, and Microsoft MVP. He loves building great products and POC (proof of concepts) using the best available technologies. He loves to share his knowledge by contributing to the Developer community.
He is awarded as MVP by Microsoft for his exceptional contribution in Microsoft technologies under the category “Developer Technologies” since year 2016. He is also a blogger and author of articles on various technologies. He is also a speaker and delivered talk on various technologies like ASP.NET Core, Angular, MVC etc. in the public events.
About the Reviewer
Tejas Trivedi has over 14 years of industry experience and currently works as a Software Architect for a leading organization. He is technical enthisiastic and his experience in Microsoft technologies raninging from VC++,C++ to his current speciality in .NET with C#, ASP.NET, Azure Clould, Micro services and DevOps.
Tejas has been developing in .NET technologies since .NET was first in beta, and is a Technical architect for software solutions using .NET technology. He is active member, blogger and speaker of various Microsoft communities in India. Tejas is currently focusing on overall architecture, solution design and Microsoft cloud solutions.
Acknowledgement
There are a few people I would like to say thanks for their continued and ongoing support given to me during the writing of this book. First and foremost, I would like to thank my wife for support me as I was spending many weekends and evenings on writing this book. I could have never completed this book without her support. I would like to say thanks to my both brother for their support and guidance.
I would also like to say thanks BPB Publications for giving me this opportunity to write my first book for them and also say thanks to the all team member who are contribute in this book.
Preface
Blazor is a new, open-source, and SPA web framework that allows you to build a web application using C# and HTML. Blazor enables you to write C# code instead of JavaScript.
This book is a comprehensive guide about the new modern Blazor framework. It begins with an introduction to the Blazor and its components and concepts. It explains how you can start the development process, what tools you can use to develop an application, and how you can deploy it. You will then learn more about Data-bind, Event-binding, layout, routing, JavaScript interop, and Dependency Injection. Concepts such as Authentication and authorization, error handling are also covered. Towards the end, you will learn how to deploy your Single Page Application Using Blazor. Over the 10 chapters in this book, you will learn the following:
Chapter 1 explain basic of the Blazor, and the programmer needs to get started with Blazor. Also, explain the Blazor booting process and how component renders in Blazor application.
Chapter 2 explain about the Blazor component, a different way to create the Blazor component, the life cycle of component, and the templated component.
Chapter 3 talk about the basic concept of Blazor, such as data binding, event binding, layouts, routing, and validation.
Chapter 4 discusses about how to inject the service dependency in Blazor application.
Chapter 5 explains how to invoke JavaScript function using the .net code and invoke the .net function from JavaScript.
Chapter 6 talks about state management. Blazor application is a stateful app framework. The user state is held in server memory in the circuit. This chapter addresses state persistence in Blazor server-side apps.
Chapter 7 explains the essentials of authentication & authorization and how can we achieve in Blazor application. It also explains the different ways to do authentication & authorization using third-party services such as Google API, Microsoft and Facebook API.
Chapter 8 describes about handling error and introduction to the logging framework provided by ASP.net core. It also explains about 3rd party logging framework providers.
Chapter 9 explains how to start the development of Blazor server /client project / SPA. This chapter do revision of all preceding chapters.
Chapter 10 explains the hosting and deployment of Blazor server/client application on various platforms such as IIS and Azure.
Downloading the code bundle and coloured images:
Please follow the link to download the Code Bundle and the Coloured Images of the book:
https://rebrand.ly/t83tggi
Errata
We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors if any, occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at :
errata@bpbonline.com
Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family.
Table of Contents
1. An Introduction to Blazor
Introduction
Objectives
What is Web Assembly?
Security considerations
WebAssembly limitations
Facts about WebAssembly
Is WASM kill JavaScript?
Is WASM a new programming language?
Can other programming languages write WASM code other than C and Rust?
Is it an upgraded version of Silverlight?
What is Blazor?
Interpreted mode
Ahead-of-time compiled mode
Features of Blazor
Blazor (client) supported platforms
Prerequisite Blazor development
.NET Core Framework (.NET Core SDK)
Integrated Development Environment - IDE
Creating first Blazor application
Creating a project with Visual Studio 2019
Creating a project using dotnet CLI
Understand project structure and component
Understand Blazor booting process
Render tree in Blazor application
Blazor client-side
Blazor server side
Summary
What did you learn in this chapter?
What next?
Questions
2. Components and Structure for Blazor Applications
Introduction
Objectives
What is the Blazor component?
Create Blazor component
Using a single file - inline
Component with code behind
Class only component
Life Cycle methods of component
OnInitialized and OnInitializedAsync
OnParametersSet and OnParametersSetAsync
OnAfterRender and OnAfterRenderAsync
SetParametersAsync
StateHasChanged
Dispose component with IDisposable
Component parameters
Child component
Templated components
Grid view template example
List view template example
Define template inline - using Razor template syntax
Cascading values
Declaring HTML attributes using parameters
Import components
Summary
What did you learn in this chapter?
What next?
Questions
3. Blazor Concepts
Introduction
Objectives
Data Binding
One-way data binding
Two-way data binding
Event Binding
Event Callback
Layouts
Introduction to Layouts page
Specify a layout in a component
Define layout globally
Nested layouts
Example
Routing
@page directive/route attribute
Example
Route parameters
Route constraints
Example
Programmatically navigate one component to another component
Query parameters
Forms and validation
Data annotations
Summary
What do you learn in this chapter?
What is next?
Questions
4. Dependency Injection
Introduction
Objective
Types of dependency injection
Construction injection
Setter injection
Interface based injection
Service lifetime
Scoped
Singleton
Transient
Add services to the application
Default services
Inject the service in the component
Example of adding service as a dependency
Use dependency in services
Using OwningComponentBase
Summary
What you l

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents
Alternate Text