.NET MAUI Cross-Platform Application Development: Leverage a first-class cross-platform UI framework to build native apps on multiple platforms 180056922X, 9781800569225

Build apps for Android, iOS, macOS, and Windows using Microsoft's .NET Multi-platform App UI and Blazor Key Feature

2,660 34 29MB

English Pages 400 Year 2023

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Cover
Title Page
Copyright and credits
Contributors
Table of Contents
Preface
Part 1: Exploring .NET MAUI
Chapter 1: Getting Started with .NET MAUI
An overview of cross-platform technologies
Native applications
Web applications
Backend services
Cross-platform technologies
A comparison of .NET, Java, and JavaScript
Exploring the .NET landscape
.NET Framework
Mono
.NET Core
.NET Standard and portable class libraries
Using Xamarin for mobile development
Xamarin.Forms
Xamarin.Essentials
Moving to .NET MAUI
.NET MAUI Blazor apps
Choosing XAML versus Razor in .NET MAUI
Development environment setup
Installing .NET MAUI on Windows
Installing .NET MAUI on macOS
What you will learn in this book
The app that we will build in this book
Summary
Further reading
Chapter 2: Building Our First .NET MAUI App
Technical requirements
Managing the source code in this book
Setting up a new .NET MAUI project
Creating a new project using Visual Studio
Creating a new project using the dotnet command
App startup and lifecycle
Lifecycle management
Configuring the resources
App icon
Splash screen
Setting custom font icons
Building and debugging
Windows
Android
iOS and macOS
Scaffolding a Model-View-ViewModel project
Migrating and reusing a Shell template from Xamarin.Forms
Visual Studio project template
Summary
Chapter 3: User Interface Design with XAML
Technical requirements
Creating a XAML page
XAML syntax
Element
Attribute
XML namespaces and XAML namespaces
XAML markup extensions
Master-detail UI design
Side-by-side
Stacked
Controls in .NET MAUI
Layouts in .NET MAUI
Navigation in the master-detail UI design
Supporting multiple languages – localization
Creating a .resx file
Localizing text
Summary
Further reading
Chapter 4: Exploring MVVM and Data Binding
Technical requirements
Understanding MVVM and MVC
MVVM in PassXYZ.Vault
Data binding
Binding mode
Changing notifications in viewmodels
Improving the data model and service
KPCLib
PassXYZLib
Updating the model
Updating the service
Binding to collections
Summary
Further reading
Chapter 5: Navigation using .NET MAUI Shell and NavigationPage
Technical requirements
Implementing navigation
INavigation interface and NavigationPage
Using the navigation stack
Manipulating the navigation stack
Using Shell
Flyout
Tabs
Shell navigation
Improving our model
Understanding the data model and its services
Improving the login process
The Command interface
Summary
Chapter 6: Introducing Dependency Injection and Platform-Specific Services
Technical requirements
A quick review of design principles
Exploring types of design principles
Using design principles
Using DI
Dependency Service
Using built-in MS.DI DI service
Connecting to the database
Initializing the database
Performing CRUD operations
Summary
Further reading
Part 2: Implementing .NET MAUI Blazor
Chapter 7: Introducing Blazor Hybrid App Development
Technical requirements
What is Blazor?
Learning about Blazor Server
Understanding Blazor Wasm
Exploring Blazor Hybrid
Creating a new .NET MAUI Blazor project
Generating a .NET MAUI Blazor project with the dotnet command line
Creating a .NET MAUI Blazor project using Visual Studio on Windows
Running the new project
The startup code of the .NET MAUI Blazor app
Migrating to a .NET MAUI Blazor app
Understanding Razor syntax
Code blocks in Razor
Implicit Razor expressions
Explicit Razor expressions
Expression encoding
Directives
Directive attributes
Creating a Razor component
Redesigning the login page using a Razor component
The Model-View-ViewModel (MVVM) pattern in Blazor
Dependency injection in Blazor
CSS isolation
Summary
Chapter 8: Understanding the Blazor Layout and Routing
Technical requirements
Understanding client-side routing
Setup of BlazorWebView
Setup of Router
Defining routes
Using Blazor layout components
Applying a layout to a component
Nesting layouts
Implementing navigation elements
Implementing a list view
Adding a new item and navigating back
Summary
Chapter 9: Implementing Blazor Components
Technical requirements
Understanding Razor components
Inheritance
Creating a Razor class library
Using static assets in the Razor class library
Creating reusable Razor components
Creating a base modal dialog component
Data binding
Component parameters
Nested components
Two-way data binding
Communicating with cascading values and parameters
Understanding the component lifecycle
SetParametersAsync
OnInitialized and OnInitializedAsync
OnParametersSet and OnParametersSetAsync
ShouldRender
OnAfterRender and OnAfterRenderAsync
Implementing CRUD operations
CRUD operations of items
CRUD operations of fields
Summary
Chapter 10: Advanced Topics in Creating Razor Components
Technical requirements
Creating more Razor components
Creating the Navbar component
Creating a Dropdown component for the context menu
Using templated components
Creating a ListView component
Using the ListView component
Built-in components and validation
Using built-in components
Using the EditForm component
Creating an EditFormDialog component
Summary
Further reading
Part 3: Testing and Deployment
Chapter 11: Developing Unit Tests
Technical requirements
Unit testing in .NET
Setting up the unit test project
Creating test cases to test the IDataStore interface
Sharing context between tests
Razor component testing using bUnit
Changing project configuration for bUnit
Creating a bUnit test case
Creating test cases in Razor files
Using the RenderFragment delegate
Testing Razor pages
Summary
Further reading
Chapter 12: Deploying and Publishing in App Stores
Technical requirements
Preparing application packages for publishing
What to prepare for publishing
Publishing to Microsoft Store
Publishing to the Google Play Store
Publishing to Apple’s App Store
GitHub Actions
Understanding GitHub Actions
Summary
Index
Other Books You May Enjoy

.NET MAUI Cross-Platform Application Development: Leverage a first-class cross-platform UI framework to build native apps on multiple platforms
 180056922X, 9781800569225

  • Commentary
  • Original True PDF
  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Recommend Papers