liveBook · Manning

Business logic

Also called domain logic, application logic, business rules

Business logic is the domain-specific rules, computations, and decisions that determine how a software system processes operations and behaves.

How 15 Manning books explain it

Simple Object-Oriented Design: Create clean, maintainable applications

Business logic is the set of rules and behavior that implement an application's problem-domain requirements.

How it is used
Places problem-domain rules in backend entities and services while keeping external communication outside them.
How deep it goes
Explains class extraction, data generalization, infrastructure boundaries, testing effects, and coupling tradeoffs without detailing cache implementation.
Examples
Uses Enrollment cancellation, author lists and discounts, configuration files, and cached employee repository lookups.
What you can do after
Evaluate/understand where domain rules belong and refactor infrastructure or retrieval concerns behind focused boundaries.

Read how Simple Object-Oriented Design: Create clean, maintainable applications explains business logic →

Functional Design and Architecture: Examples in Haskell

Business logic is the set of domain rules and application behaviors that determine how a system responds to business situations.

How it is used
Organizes domain and auxiliary scenarios separately from service implementations and server integration.
How deep it goes
Explains layered responsibilities and works through interface design, state management, and a Servant handler integration.
Examples
Uses a sandwich recipe, logger interfaces, meteor reporting, and an astronomical object lookup to illustrate design choices.
What you can do after
Evaluate/understand how interface and layering choices expose implementation details or keep business behavior more testable.

Read how Functional Design and Architecture: Examples in Haskell explains business logic →

Practices of the Python Pro

A business logic layer is a software layer that contains application rules and operations governing how inputs are transformed into business outcomes.

How it is used
Organizes application-specific actions between user-facing presentation and data-storing persistence layers.
How deep it goes
Demonstrates commands for CRUD operations and discusses coupling, while deferring broader implementation beyond the application example.
Examples
Uses Bark’s bookmark commands for creating tables, adding, listing, deleting, and importing or extending application functionality.
What you can do after
Build it from scratch by separating application actions into commands that coordinate presentation input and persistence operations.

Read how Practices of the Python Pro explains business logic →

ASP.NET Core in Action, 3e

Business logic is the application behavior that implements domain rules, decisions, and processes independently of presentation or infrastructure concerns.

How it is used
Organizes application rules and processes behind handlers in server-rendered applications and HTTP APIs.
How deep it goes
Defines separation and service responsibilities, then stops short of detailing domain internals or advanced architecture.
Examples
Uses RecipeService operations, MVC product and shopping-cart interactions, and currency-conversion controller tests.
What you can do after
Build it in services that handlers call, then unit-test the behavior separately from HTTP framework systems.

Read how ASP.NET Core in Action, 3e explains business logic →

Grokking Software Architecture

Business logic is the application code that implements domain-specific rules and coordinates the system's behavior.

How it is used
Uses business logic to express domain rules and coordinate application behavior separately from UI and data storage.
How deep it goes
Explains separation through layered and hexagonal designs, including ports, adapters, dependency direction, and testing tradeoffs.
Examples
Illustrates logic with a favorite button, order processing, injected logging, and checkout connected to a payment provider.
What you can do after
Evaluate application boundaries and identify coupling that makes business logic harder to test or change.

Read how Grokking Software Architecture explains business logic →

Data-Oriented Programming: Reduce software complexity

Business logic is the domain-specific rules and computations that determine how an application processes requests and data.

How it is used
Structures request and response processing while keeping domain rules distinct from generic data manipulation.
How deep it goes
Explains separation, named utilities, tests, and implementation steps, but stops short of broader domain modeling.
Examples
Demonstrates book lending ratios, nested book-item data, countByBoolField, Lodash reduce, and a focused unit test.
What you can do after
Build it from scratch by extracting named data utilities, testing them, and expressing business intent concisely.

Read how Data-Oriented Programming: Reduce software complexity explains business logic →

Microservices Patterns, Second Edition

Business logic consists of the rules and computations that implement an application's domain behavior.

How it is used
Centers domain behavior in an application and separates it from the adapters that handle outside interactions.
How deep it goes
Defines the boundary through ports and adapters, but does not detail the domain computations themselves.
Examples
Uses FTGO modules for orders, delivery, billing, and payments, plus consumer verification and courier delivery scheduling.
What you can do after
Understand how ports and adapters keep business logic independent of external systems.

Read how Microservices Patterns, Second Edition explains business logic →

Crack Any Codebase with AI

A business rule is a domain-specific condition or policy that governs how a system should behave.

How it is used
Guides codebase exploration by locating domain rules at public interfaces and tracing their downstream effects.
How deep it goes
Explains handlers as combinations of reads, writes, checks, and external calls, while contrasting them with static schemas.
Examples
Uses booking cancellation and refund policy, Cal.com endpoints, Git commands, and a simplified Next.js booking handler.
What you can do after
Evaluate and understand unfamiliar systems by starting at an interface and following every triggered service, query, and external call.

Read how Crack Any Codebase with AI explains business logic →

Clean Applications with Hexagonal Architecture

The rules and processing that express an application's business behavior independently of external technologies.

How it is used
Protects domain decisions from framework and infrastructure concerns by keeping them inside the application core.
How deep it goes
Defines placement through business-rule decisions and a framework-removal test, while deferring full domain-entity construction.
Examples
Uses article validity, author existence, duplicate titles, and rules scattered across services, controllers, and persistence callbacks.
What you can do after
Apply a framework-removal test to identify logic for extraction into a framework-free domain package.

Read how Clean Applications with Hexagonal Architecture explains business logic →

The Art of Code

A business logic error is a failure caused by incorrect implementation of the application's domain rules or intended behavior.

How it is used
Classifies rule violations so applications can anticipate them and respond with clear, user-friendly recovery paths.
How deep it goes
Defines the category and response principles, but stops short of implementation patterns or detailed validation code.
Examples
Uses invalid forms, expired discounts, unsupported files, duplicate emails, excessive login attempts, and oversized avatar images.
What you can do after
Evaluate failures by category and design explicit validation, communication, translation, recovery, or fallback behavior.

Read how The Art of Code explains business logic →

Building User-Friendly DSLs

The rules and decision-making behavior that encode an organization’s business knowledge in software.

How it is used
Computes customer-facing price quotes from rental inputs and organizational pricing policies.
How deep it goes
Explains rules, nested conditionals, and intermediate state, but defers a precise definition of business rules.
Examples
Uses car-rental pricing with holiday surcharges, weekly discounts, environmental fees, car rates, and contract types.
What you can do after
Evaluate how business knowledge becomes conditional software behavior for a car-rental price quote.

Read how Building User-Friendly DSLs explains business logic →

.NET MAUI in Action

Business logic is software logic that represents an application's business rules, processes, and decisions.

How it is used
Separates domain behavior from UI and presentation code so applications remain reusable, maintainable, and less tightly coupled.
How deep it goes
Defines models, rules, queries, and services, then demonstrates their placement in an MVVM application without detailing implementation internals.
Examples
Uses product searches, inventory counting, user-input rules, domain models, and services communicating with REST or GraphQL APIs.
What you can do after
Apply it via MVVM by placing domain behavior in models or services and exposing required functionality through ViewModels.

Read how .NET MAUI in Action explains business logic →

Spring Start Here, Second Edition

Business logic comprises the domain-specific rules and processes governing an application's core operations.

How it is used
Implements application requirements that deliver the functionality users expect.
How deep it goes
Defines the term, distinguishes it from shared plumbing, and illustrates it with invoice and use-case examples.
Examples
Uses invoice generation, requesting a car, and ordering a pizza as examples of user-facing functionality.
What you can do after
Understand which code implements user-facing requirements and which supports shared application infrastructure.

Read how Spring Start Here, Second Edition explains business logic →

Unit Testing Principles, Practices, and Patterns

The set of rules and decisions that implement an application's domain-specific behavior.

How it is used
Prioritizes unit-testing effort around domain behavior because it offers the strongest return on time invested.
How deep it goes
Defines testing priority and isolation boundaries, but defers detailed implementation techniques.
Examples
Contrasts domain models with databases, third-party systems, infrastructure code, and application glue.
What you can do after
Apply unit testing to isolated domain behavior and use integration tests for broader system interactions.

Read how Unit Testing Principles, Practices, and Patterns explains business logic →

Shipping Go: Develop, deliver, discuss, design, and go again

Business logic is the application logic that implements domain rules and required business behavior.

How it is used
Uses a service to convert application requests into domain-specific results before handlers and servers return them.
How deep it goes
Defines a small service boundary and test cases, but stops short of detailing complex domain rules or implementation internals.
Examples
Uses a translation service, Translate function, and cases for English, capitalization, and extra spaces.
What you can do after
Diagnose behavior by isolating the service and asserting outputs against given-when-then cases.

Read how Shipping Go: Develop, deliver, discuss, design, and go again explains business logic →

Also covered in

What to know first

Related concepts

Questions about business logic

What is business logic?

Business logic is the domain-specific rules, computations, and decisions that determine how a software system processes operations and behaves.

Which Manning books explain business logic?

Simple Object-Oriented Design: Create clean, maintainable applications, Functional Design and Architecture: Examples in Haskell, Practices of the Python Pro, ASP.NET Core in Action, 3e, Grokking Software Architecture, Data-Oriented Programming: Reduce software complexity, Microservices Patterns, Second Edition, Crack Any Codebase with AI and 7 more.

What should I know before learning business logic?

Manning books that teach business logic usually introduce contract, client, entity and HTML first.

What is the difference between business logic and user interface?

Business logic is the domain-specific rules, computations, and decisions that determine how a software system processes operations and behaves. A user interface is the part of a system through which a person interacts with it, providing input and receiving information or other output.

What kinds of business logic are there?

Kinds of business logic include business rule.

What is business logic part of?

Business logic is part of three-layer architecture. A three-layer architecture organizes an application into presentation, business-logic, and data-management layers with distinct responsibilities.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.