Web development with Blazor a practical guide to build interactive UI's with C# 11 and .NET 7

Develop modern web UIs with Blazor Server and Blazor WebAssembly Purchase of the print or Kindle book includes a free eBook in PDF format. Key Features Create a production-ready Blazor application from start to finish Learn Blazor fundamentals, gain actionable insights, and discover best practices F...

Descripción completa

Detalles Bibliográficos
Otros Autores: Engstrom, Jimmy, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England : Packt Publishing, Limited [2023]
Edición:Second edition
Colección:Expert insight.
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009849092606719
Tabla de Contenidos:
  • Cover
  • Copyright
  • Table of Contents
  • Preface
  • Chapter 1: Hello Blazor
  • Technical requirements
  • Why Blazor?
  • Preceding Blazor
  • Introducing WebAssembly
  • Introducing .NET 7
  • Introducing Blazor
  • Blazor Server
  • Blazor WebAssembly
  • Blazor WebAssembly versus Blazor Server
  • Blazor Hybrid / .NET MAUI
  • Summary
  • Further reading
  • Chapter 2: Creating Your First Blazor App
  • Technical requirements
  • Setting up your development environment
  • Windows
  • macOS
  • Linux (or macOS or Windows)
  • Creating our first Blazor application
  • Exploring the templates
  • Blazor Server App
  • Blazor WebAssembly App
  • Blazor Server App Empty
  • Blazor WebAssembly App Empty
  • Creating a Blazor Server application
  • Creating a WebAssembly application
  • Using the command line
  • Creating projects using the command line
  • Figuring out the project structure
  • Program.cs
  • WebAssembly Program.cs
  • Blazor Server Program.cs
  • Index/_Host
  • _Host (Blazor Server)
  • Index (WebAssembly)
  • App
  • MainLayout
  • Bootstrap
  • CSS
  • Summary
  • Chapter 3: Managing State - Part 1
  • Technical requirements
  • Creating a data project
  • Creating a new project
  • Creating data classes
  • Creating an interface
  • Implementing the interface
  • Adding the API to Blazor
  • Summary
  • Chapter 4: Understanding Basic Blazor Components
  • Technical requirements
  • Exploring components
  • Counter
  • FetchData
  • Learning Razor syntax
  • Razor code blocks
  • Implicit Razor expressions
  • Explicit Razor expressions
  • Expression encoding
  • Directives
  • Adding an attribute
  • Adding an interface
  • Inheriting
  • Generics
  • Changing the layout
  • Setting a namespace
  • Setting a route
  • Adding a using statement
  • Understanding dependency injection
  • Singleton
  • Scoped
  • Transient
  • Injecting the service
  • Figuring out where to put the code.
  • In the Razor file
  • In a partial class
  • Inheriting a class
  • Only code
  • Lifecycle events
  • OnInitialized and OnInitializedAsync
  • OnParametersSet and OnParametersSetAsync
  • OnAfterRender and OnAfterRenderAsync
  • ShouldRender
  • Parameters
  • Cascading parameters
  • Writing our first component
  • Creating a components library
  • Using our components library
  • Creating our own component
  • Summary
  • Chapter 5: Creating Advanced Blazor Components
  • Technical requirements
  • Exploring binding
  • One-way binding
  • Two-way binding
  • Actions and EventCallback
  • Using RenderFragment
  • ChildContent
  • Default value
  • Building an alert component
  • Exploring the new built-in components
  • Setting the focus of the UI
  • Influencing the HTML head
  • Component virtualization
  • Error boundaries
  • Summary
  • Chapter 6: Building Forms with Validation
  • Technical requirements
  • Exploring form elements
  • EditForm
  • InputBase&lt
  • &gt
  • InputCheckbox
  • InputDate&lt
  • TValue&gt
  • InputNumber&lt
  • TValue&gt
  • InputSelect&lt
  • TValue&gt
  • InputText
  • InputTextArea
  • InputRadio
  • InputRadioGroup
  • InputFile
  • Adding validation
  • ValidationMessage
  • ValidationSummary
  • Custom validation class attributes
  • Looking at bindings
  • Binding to HTML elements
  • Binding to components
  • Building an admin interface
  • Listing and editing categories
  • Listing and editing tags
  • Listing and editing blog posts
  • Summary
  • Chapter 7: Creating an API
  • Technical requirements
  • Creating the service
  • Adding data access
  • Learning about Minimal APIs
  • Adding the API controllers
  • Adding APIs for handling blog posts
  • Adding APIs for handling categories
  • Adding APIs for handling tags
  • Creating the client
  • Summary
  • Chapter 8: Authentication and Authorization
  • Technical requirements
  • Setting up authentication.
  • Configuring Blazor Server
  • Securing Blazor Server
  • Securing Blazor WebAssembly
  • Adjusting Auth0
  • Securing the API
  • Configure Auth0
  • Configure the API
  • Adding roles
  • Configuring Auth0 by adding roles
  • Adding roles to Blazor Server
  • Adding roles to Blazor WebAssembly
  • Summary
  • Chapter 9: Sharing Code and Resources
  • Technical requirements
  • Adding static files
  • Choosing between frameworks
  • Adding a new style
  • Adding CSS to BlazorServer
  • Adding CSS to BlazorWebAssembly.Client
  • Making the admin interface more usable
  • Making the menu more useful
  • Making the blog look like a blog
  • CSS isolation
  • Summary
  • Chapter 10: JavaScript Interop
  • Technical requirements
  • Why do we need JavaScript?
  • .NET to JavaScript
  • Global JavaScript (the old way)
  • JavaScript Isolation
  • JavaScript to .NET
  • Static .NET method call
  • Instance method call
  • Implementing an existing JavaScript library
  • JavaScript interop in WebAssembly
  • .NET to JavaScript
  • JavaScript to .NET
  • Summary
  • Chapter 11: Managing State Part 2
  • Technical requirements
  • Storing data on the server side
  • Storing data in the URL
  • Route constraints
  • Using a query string
  • Scenarios that are not that common
  • Implementing browser storage
  • Creating an interface
  • Implementing Blazor Server
  • Implementing WebAssembly
  • Implementing the shared code
  • Using an in-memory state container service
  • Implementing real-time updates on Blazor Server
  • Implementing real-time updates on Blazor WebAssembly
  • Summary
  • Chapter 12: Debugging the Code
  • Technical requirements
  • Making things break
  • Debugging Blazor Server
  • Debugging Blazor WebAssembly
  • Debugging Blazor WebAssembly in the web browser
  • Hot Reload
  • Summary
  • Chapter 13: Testing
  • Technical requirements
  • What is bUnit?
  • Setting up a test project.
  • Mocking the API
  • Writing tests
  • Authentication
  • Testing JavaScript
  • Summary
  • Chapter 14: Deploy to Production
  • Technical requirements
  • Continuous delivery options
  • Hosting options
  • Hosting Blazor Server
  • Hosting Blazor WebAssembly
  • Hosting on IIS
  • Summary
  • Chapter 15: Moving from, or Combining, an Existing Site
  • Technical requirements
  • Introducing Web Components
  • Exploring Custom Elements
  • Exploring the Blazor Component
  • Adding Blazor to an Angular site
  • Adding Blazor to a React site
  • Adding Blazor to MVC/Razor Pages
  • Adding Web components to a Blazor site
  • Migrating from Web Forms
  • Summary
  • Chapter 16: Going Deeper into WebAssembly
  • Technical requirements
  • .NET WebAssembly build tools
  • AOT compilation
  • WebAssembly Single Instruction, Multiple Data (SIMD)
  • Trimming
  • Lazy loading
  • PWA
  • Native dependencies
  • Common problems
  • Progress indicators
  • Prerendering on the server
  • Preloading and persisting the state
  • Summary
  • Chapter 17: Examining Source Generators
  • Technical requirements
  • What a source generator is
  • How to get started with source generators
  • Community projects
  • InterfaceGenerator
  • Blazorators
  • C# source generators
  • Roslyn SDK samples
  • Microsoft Learn
  • Summary
  • Chapter 18: Visiting .NET MAUI
  • Technical requirements
  • What is .NET MAUI?
  • Creating a new project
  • .NET MAUI App
  • .NET MAUI Class Library
  • .NET MAUI Blazor App
  • Looking at the template
  • Developing for Android
  • Running in an emulator
  • Running on a physical device
  • Developing for iOS
  • Hot restart
  • Simulator
  • Developing for macOS
  • Developing for Windows
  • Developing for Tizen
  • Summary
  • Chapter 19: Where to Go from Here
  • Technical requirements
  • Learnings from running Blazor in production
  • Solving memory problems
  • Solving concurrency problems.
  • Solving errors
  • Old browsers
  • The next steps
  • The community
  • The components
  • Summary
  • Packt Page
  • Other Books You May Enjoy
  • Index.