Whether you are an architect, developer, or manager, Building Solutions with the Microsoft .NET Compact Framework is your guide to creating effective solutions for mobile devices with .NET. Authors Dan Fox and Jon Box walk you through four essential architectural concepts and programming techniques,
Mastering ABP Framework: Build Maintainable .NET Solutions by Implementing Software Development Best Practices
β Scribed by Halil Ibrahim Kalkan
- Tongue
- English
- Leaves
- 526
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Table of Contents
Cover
Title page
Copyright and Credits
Dedication
Foreword
Contributors
Table of Contents
Preface
Part 1: Introduction
Chapter 1: Modern Software Development and ABP Framework
Challenges of developing an enterprise web solution
Setting up the architecture
Don't repeat yourself!
Building a UI base
Implementing common business requirements
Understanding what ABP Framework offers
The ABP architecture
The startup templates
The ABP infrastructure
The community
Summary
Chapter 2: Getting Started with ABP Framework
Technical requirements
IDE/Editor
.NET 6 SDK
Database management system
Installing the ABP CLI
Creating a new solution
Downloading the startup solution
Using the ABP CLI
Running the solution
The connection string
Creating a database
Running the web application
Exploring the pre-built modules
Account module
Identity module
Tenant Management module
Summary
Chapter 3: Step-By-Step Application Development
Technical requirements
Creating the solution
Defining the domain objects
Category
ProductStockState
Product
Constants
EF Core and database mappings
Adding entities to the DbContext class
Mapping entities to the database tables
The Add-Migration command
Seeding data
Migrating the database
Listing the product data
The ProductDto class
IProductAppService
ProductAppService
Object to object mapping
Testing the ProductAppService class
Auto API Controllers and the Swagger UI
Dynamic JavaScript proxies
Creating a products page
Adding a new menu item
Creating the products data table
Creating products
Application service contracts
Application service implementation
UI
Editing products
Application service contracts
Application service implementation
UI
Deleting products
Summary
Chapter 4: Understanding the Reference Solution
Technical requirements
Introducing the application
Understanding the architecture
Authentication flow
Exploring the solution
Project dependencies
Running the solution
Cloning the GitHub repository
Running the infrastructure
Opening the solution
Creating a database
Running the applications
Using the Tye project
Summary
Part 2: Fundamentals of ABP Framework
Chapter 5: Exploring the ASP.NET Core and ABP Infrastructure
Technical requirements
Understanding modularity
The Startup class
Defining a module class
Module dependencies and the startup module
Module lifecycle methods
Using the dependency injection system
Service lifetime
Conventional service registrations
Dependency interfaces
The Dependency attribute
Exposing services
Configuring an application
Setting the configuration values
Reading the configuration values
Implementing the options pattern
Defining an options class
Configuring the options
Using the configured option values
Setting the options via the configuration
ASP.NET Core and ABP options
Logging
Summary
Chapter 6: Working with the Data Access Infrastructure
Technical requirements
Defining entities
AggregateRoot classes
Entity classes
Entities with CPKs
The GUID PK
Working with repositories
Generic repositories
Custom repositories
EF Core integration
Configuring the DBMS
Defining DbContext
Registering DbContext with DI
Configuring entity mappings
Implementing custom repositories
Loading related data
MongoDB integration
Defining DbContexts
Configuring object mappings
Registering DbContext with DI
Implementing custom repositories
Understanding the UoW system
Configuring UoW options
Manually controlling the UoW
Summary
Chapter 7: Exploring Cross-Cutting Concerns
Technical requirements
Working with authorization and permission systems
Simple authorization
Using the permission system
Policy-based authorization
Authorizations outside of controllers
Validating user inputs
Using data annotation attributes
Custom validation with the IValidatableObject interface
Understanding the validation exception
Disabling the validation
Validation in other types
Integrating the FluentValidation library
Exception handling
User-friendly exceptions
Business exceptions
Controlling exception logging
Controlling the HTTP status code
Summary
Chapter 8: Using the Features and Services of ABP
Technical requirements
Obtaining the current user
Defining custom claims
Using the data filtering system
The soft-delete data filter
The multi-tenancy data filter
Disabling a data filter
Defining custom data filters
Controlling the audit logging system
Audit log object
Audit log scope
Auditing options
Disabling and enabling audit logging in detail
Caching data
Using the IDistributedCache
Configuring cache options
Error handling
Using the cache in a multi-tenancy application
Using Redis as the distributed cache provider
Invalidating cache values
Localizing the user interface
Configuring supported languages
Determining the current language
Defining a localization resource
Working with the localization JSON files
Getting localized texts
Configuring localization resources
Localizing in special services
Using localization on the client side
Summary
Part 3: Implementing DomainβDriven Design
Chapter 9: Understanding Domain-Driven Design
Technical requirements
Introducing DDD
What is domain-driven design?
DDD layers
Building blocks
Structuring a .NET solution based on DDD
Creating a simple DDD-based .NET solution
Evolution of the ABP startup solution
Separating the hosting from the UI
Dealing with multiple applications
Understanding the execution flow
Understanding the common principles
Database provider independence
Presentation technology-agnostic
Summary
Chapter 10: DDD β The Domain Layer
Technical requirements
Exploring the example domain
Designing aggregates and entities
What is an aggregate root?
Referencing other aggregates by their ID
Keep aggregates small
Determining the primary keys for entities
Implementing entity constructors
Using services to create aggregates
Implementing business logic and constraints
Using external services in entity methods
Implementing domain services
Implementing repositories
Building specifications
Parameterless specifications
Parameterized specifications
Combining specifications
Publishing domain events
Using the local event bus
Using the distributed event bus
Summary
Chapter 11: DDD β The Application Layer
Technical requirements
Implementing application services
Designing DTOs
Designing DTO classes
Validating input DTOs
Object-to-object mapping
DTO design best practices
Understanding the responsibilities of the layers
Authorizing users
Controlling the transaction
Validating the user input
Working with the current user
Summary
Part 4: User Interface and API Development
Chapter 12: Working with MVC/Razor Pages
Technical requirements
Understanding the theming system
The base libraries
The layouts
Using the bundling and minification system
Installing NPM packages
Using the standard packages
Importing script and style files
Creating page bundles
Configuring global bundles
Creating named bundles
Controlling the bundling and minification behavior
Working with menus
Working with Bootstrap tag helpers
Creating forms and implementing validation
Rendering form elements
Validating user inputs
Localizing forms
Implementing AJAX forms
Working with modals
Understanding the basics of modals
Working with forms inside modals
Adding JavaScript for modals
Using the JavaScript API
Accessing the current user
Checking user permissions
Checking the tenant features
Localizing strings
Showing message boxes
Showing notifications
Consuming HTTP APIs
Using the abp.ajax API
Using dynamic client proxies
Using static client proxies
Summary
Chapter 13: Working with the Blazor WebAssembly UI
Technical requirements
What is Blazor?
Getting started with the ABP Blazor UI
Authenticating the user
Understanding the theming system
Working with menus
Using the basic services
Authorizing the users
Localizing the user interface
Accessing the current user
Using the UI services
Showing message boxes
Showing notifications
Showing alerts
Consuming HTTP APIs
Working with global scripts and styles
Summary
Chapter 14: Building HTTP APIs and Real-Time Services
Technical requirements
Building HTTP APIs
Creating an HTTP API project
Creating ASP.NET Core controllers
Understanding the Auto API Controllers
Consuming HTTP APIs
Using ABP's dynamic client-side proxies
Using ABP's static (generated) client proxies
Using SignalR with ABP Framework
Using the ABP SignalR integration package
Configuring SignalR clients
Summary
Part 5: Miscellaneous
Chapter 15: Working with Modularity
Technical requirements
Understanding modularity
Class libraries and NuGet packages
Application modules
Building the Payment module
Creating a new application module
Restructuring the Payment module solution
Understanding the payment process
Providing configuration options
Installing the Payment module into EventHub
Setting the project dependencies
Configuring the database integration
Summary
Chapter 16: Implementing Multi-Tenancy
Technical requirements
Understanding multi-tenancy
What is SaaS?
What is multi-tenancy?
The database architecture
Working with the ABP multi-tenancy infrastructure
Enabling and disabling multi-tenancy
Determining the current tenant
Working with the current tenant
Switching between tenants
Disabling the data isolation
Designing the domain as multi-tenant
Using the feature system
Defining the features
Checking for the features
Managing tenant features
When to use multi-tenancy
Summary
Chapter 17: Building Automated Tests
Technical requirements
Understanding the ABP test infrastructure
Exploring the test projects
Exploring the test libraries
Running the tests
Building unit tests
Testing static classes
Testing classes with no dependencies
Testing classes with dependencies
Building integration tests
Understanding ABP integration
Mocking the database
Seeding the test data
Testing repositories
Testing domain services
Testing application services
Summary
Index
About Packt
Other Books You May Enjoy
π SIMILAR VOLUMES
Many developers are already familiar with the basics of ASP.NET and have been impressed with its potential to ease the creation of Web applications. However, few resources exist for those looking to translate their knowledge of ASP.NET into tailored solutions for actual challenges developers face on
Why does poor software quality continue to plague enterprises of all sizes in all industries? Part of the problem lies with the process, rather than individual developers. This practical guide provides ten best practices to help team leaders create an effective working environment through key adjust
Say what you will about Microsoft, they know how to successfully build and release software. Vince Maraia has been a key member of the build teams for many of their major software releases over the last fifteen years. In this book he distills the wisdom he has learned about building software, whi