ASP.NET Core and Vue.js
Build real-world, scalable, full-stack applications using Vue.js 3, TypeScript, .NET 5, and Azure
Devlin Basilan Duldulao
- 478 pages
- English
- ePUB (adapté aux mobiles)
- Disponible sur iOS et Android
ASP.NET Core and Vue.js
Build real-world, scalable, full-stack applications using Vue.js 3, TypeScript, .NET 5, and Azure
Devlin Basilan Duldulao
Ă propos de ce livre
A busy.NET developer's step-by-step guide to building fully functional, cloud-ready, and professional web apps without diving into the theory of frameworks and libraries
Key Features
- Discover tenants of clean architecture in the latest ASP.NET Core 5 Web API
- Develop Vue.js 3 single-page applications (SPAs) using TypeScript and Vuex
- Learn techniques to secure, test, and deploy your full-stack web apps on Azure
Book Description
Vue.js 3 is faster and smaller than the previous version, and TypeScript's full support out of the box makes it a more maintainable and easier-to-use version of Vue.js. Then, there's ASP.NET Core 5, which is the fastest.NET web framework today. Together, Vue.js for the frontend and ASP.NET Core 5 for the backend make a powerful combination.
This book follows a hands-on approach to implementing practical methodologies for building robust applications using ASP.NET Core 5 and Vue.js 3. The topics here are not deep dive and the book is intended for busy.NET developers who have limited time and want a quick implementation of a clean architecture with popular libraries.
You'll start by setting up your web app's backend, guided by clean architecture, command query responsibility segregation (CQRS), mediator pattern, and Entity Framework Core 5. The book then shows you how to build the frontend application using best practices, state management with Vuex, Vuetify UI component libraries, Vuelidate for input validations, lazy loading with Vue Router, and JWT authentication. Later, you'll focus on testing and deployment. All the tutorials in this book support Windows 10, macOS, and Linux users.
By the end of this book, you'll be able to build an enterprise full-stack web app, use the most common npm packages for Vue.js and NuGet packages for ASP.NET Core, and deploy Vue.js and ASP.NET Core to Azure App Service using GitHub Actions.
What you will learn
- Discover CQRS and mediator pattern in the ASP.NET Core 5 Web API
- Use Serilog, MediatR, FluentValidation, and Redis in ASP.NET
- Explore common Vue.js packages such as Vuelidate, Vuetify, and Vuex
- Manage complex app states using the Vuex state management library
- Write integration tests in ASP.NET Core using xUnit and FluentAssertions
- Deploy your app to Microsoft Azure using the new GitHub Actions for continuous integration and continuous deployment (CI/CD)
Who this book is for
This app development book is for.NET developers who want to get started with Vue.js and build full-stack enterprise web applications. Web developers looking to build a proof-of-concept application quickly and pragmatically using their existing knowledge of ASP.NET Core as well as developers who want to write readable and maintainable code using TypeScript and the C# programming language will also find this book useful. The book assumes intermediate-level.NET knowledge along with an understanding of C# programming, JavaScript, and ECMAScript.
Foire aux questions
Informations
Section 1: Getting Started
- Chapter 1, Getting Started with ASP.NET Core and Vue.js
- Chapter 2, Setting Up a Development Environment
Chapter 1: Getting Started with ASP.NET Core and Vue.js
- Introducing ASP.NET Core
- What's new in .NET?
- What's new in ASP.NET Core?
- Introducing Vue.js
Technical requirements
Introducing ASP.NET Core
What's new in .NET?
- It includes the new C# 9 and F# 5.
- A new single-file publish type that executes your app out of a single binary.
- Runs .NET natively on Windows ARM64.
- Improves ARM64 performance (Linux and Windows) in the JIT and BCL libraries.
- Reduces the container image size and implements new container APIs to enable .NET to stay up to date with container runtime evolution.
- It enables easier migration from Newtonsoft.Json to System.Text.Json.
What's new in ASP.NET Core?
- Performance Improvements to HTTP/2: .NET 5 improves the performance of HTTP/2 by adding support for HPack dynamic compression of HTTP/2 response headers in Kestrel.
- Reduction in container image sizes: Sharing layers between two images dramatically reduces the size of the aggregate images that you pull. This reduction is achieved by re-platting the SDK image on the ASP.NET runtime image.
- Reloadable endpoints via configuration for Kestrel: Kestrel can now observe changes to configurations passed to KestrelServerOptions.Configure. Then it can be applied to any new endpoints without restarting your application.
- JSON extension methods for HttpRequest and HttpResponse: Using the new ReadFromJsonAsync and WriteAsJsonAsync extension methods, you can now easily consume and use JSON data from HttpRequest and HttpResponse. The JSON extension methods can also be written with an endpoint routing to create JSON APIs like so:endpoints.MapGet("/weather/{city:alpha}",async context =>{var city = (string)context.Request.RouteValues["city"];var weather = GetFromDatabase(city);await context.Response.WriteAsJsonAsync(weather);});
- An extension method allows anonymous access to an endpoint: The AllowAnonymous extension allows anonymous access to an endpoint when using endpoint routing. In the following code, the extension method, AllowAnonymous(), is chained after calling the MapGet method:public void Configure(IApplicationBuilder app, IWebHostEnvironment env){app.UseRouting();app.UseAuthentication();app.UseAuthorization();app.UseEndpoints(endpoints =>{endpoints.MapGet("/...