Book Image

Mastering ABP Framework

By : Halil İbrahim Kalkan
Book Image

Mastering ABP Framework

By: Halil İbrahim Kalkan

Overview of this book

ABP Framework is a complete infrastructure for creating modern web applications by following software development best practices and conventions. With ABP's high-level framework and ecosystem, you can implement the Don’t Repeat Yourself (DRY) principle and focus on your business code. Written by the creator of ABP Framework, this book will help you to gain a complete understanding of the framework and modern web application development techniques. With step-by-step explanations of essential concepts and practical examples, you'll understand the requirements of a modern web solution and how ABP Framework makes it enjoyable to develop your own solutions. You'll discover the common requirements of enterprise web application development and explore the infrastructure provided by ABP. Throughout the book, you’ll get to grips with software development best practices for building maintainable and modular web solutions. By the end of this book, you'll be able to create a complete web solution that is easy to develop, maintain, and test.
Table of Contents (24 chapters)
1
Part 1: Introduction
6
Part 2: Fundamentals of ABP Framework
11
Part 3: Implementing Domain–Driven Design
15
Part 4: User Interface and API Development
19
Part 5: Miscellaneous

What this book covers

Chapter 1, Modern Software Development and ABP Framework, discusses the common challenges of developing a business application and explains how ABP addresses these challenges.

Chapter 2, Getting Started with ABP Framework, explains how you can create and run a new solution with ABP Framework.

Chapter 3, Step-By-Step Application Development, is the longest chapter of the book and shows application development with ABP Framework with an extensive example application. It is the main chapter for putting everything together. After this chapter, you may not understand all the ABP features but will be able to create your own application with the fundamental ABP concepts. You will understand the big picture here. Then, you will fill in the gaps and learn about all the details in the next chapters.

Chapter 4, Understanding the Reference Solution, explains the architecture and structure of the reference solution, EventHub, that was created as a large example application for the readers of this book. It is suggested that you read this chapter and make the solution work in your environment.

Chapter 5, Exploring the ASP.NET Core and ABP Infrastructure, explains some fundamental concepts such as dependency injection, basic modularity, configuration, and logging. These topics are essential to understanding development with ABP and ASP.NET Core.

Chapter 6, Working with the Data Access Infrastructure, introduces the entity, repository, and unit of work concepts, and shows how to work with Entity Framework Core and MongoDB. You will learn different ways of querying and manipulating data and controlling database transactions.

Chapter 7, Exploring Cross-Cutting Concerns, focuses on three important concerns you will need in your application: authorization, validation, and exception handling. These concerns are implemented in every part of your application. You will learn how to define and use a permission-based authorization system, validate user inputs, and deal with exceptions and exception messages.

Chapter 8, Using the Features and Services of ABP, covers some of the commonly used ABP features such as working with the current user, using the data filtering and audit log systems, caching data, and localizing the user interface.

Chapter 9, Understanding Domain-Driven Design, is the first part of the DDD-related chapters. It starts by defining DDD and structuring a .NET solution based on DDD. You will learn how ABP’s startup template has been evolved from DDD’s standard four-layered solution model. You will also learn about the building blocks and principles of DDD.

Chapter 10, DDD – The Domain Layer, continues looking at DDD with the domain layer. It begins by explaining the EventHub domain objects, since the examples in this chapter and the next chapter will be based on these objects. You will learn how to design aggregates; implement domain services, repositories, and specifications; and use an event bus to publish domain events.

Chapter 11, DDD – The Application Layer, focuses on the application layer. You will learn the best practices for designing and validating data transfer objects and implementing your application services. You will also find discussions and examples in this chapter to help you understand the responsibilities of the domain and application layers.

Chapter 12, Working with MVC/Razor Pages, covers developing MVC (Razor Pages) applications that generate the HTML on the server side. You will learn about ABP’s theming approach and learn about fundamental aspects such as bundling and minification, tag helpers, forms, menus, and modals. You will also learn how to make client-to-server API calls and use the JavaScript utility APIs provided by ABP Framework to show notifications, message boxes, and more.

Chapter 13, Working with the Blazor WebAssembly UI, is similar to the previous chapter and explains UI development with Microsoft’s new Blazor SPA framework and ABP Framework. Blazor is a great framework for developers to use their existing .NET skills in the browser. ABP takes things a few steps further by providing built-in solutions for consuming HTTP APIs, implementing theming, and providing utility services to make common UI tasks easier.

Chapter 14, Building HTTP APIs and Real-Time Services, explains how to create API controllers with the classic ASP.NET approach and ABP’s auto API controller system, and it discusses when you need to define controllers manually. In this chapter, you will also learn about dynamic and static C# proxies to automate client-to-server API calls from your .NET clients to your ABP-based HTTP services. This chapter also covers using SignalR with ABP Framework.

Chapter 15, Working with Modularity, explains reusable application module development with an example case. We’ll create a payment module for the EventHub solution and explain the structure of that module in this chapter. In this way, you will understand how to develop reusable modules and install them in an application.

Chapter 16, Implementing Multi-Tenancy, focuses on another fundamental ABP architecture, multi-tenancy, which is an architectural pattern to build Software-as-a-Service (SaaS) solutions. You will see whether multi-tenancy is the right architecture for your solution and learn how to develop your code to be compatible with ABP’s multi-tenancy system. This chapter also covers ABP’s features system, which is used to define application functionalities as features and assign them to tenants in a multi-tenant solution.

Chapter 17, Building Automated Tests, explains ABP’s test infrastructure and how to build unit and integration tests for your applications using xUnit as the test framework. You will also learn the basics of automated tests, such as assertions, mocking and replacing services, and dealing with exceptions.