Behavior
Behavior is the observable actions, responses, outputs, or effects of a system or object under specified conditions or interactions.
Unit Testing Principles, Practices, and Patterns
Observable behavior is the externally detectable functionality and outcome produced by software.
- How it is used
- Guides unit-test design toward externally visible outcomes and away from implementation coupling.
- How deep it goes
- Defines observable operations and state, contrasts APIs, and demonstrates encapsulation and refactoring consequences.
- Examples
- Uses user-name normalization, customer discounts, private price calculation, and dog behavior to distinguish outcomes from internal steps.
- What you can do after
- Apply it by writing black-box tests against client goals and refactoring leaked or overly complex implementation details.
Read how Unit Testing Principles, Practices, and Patterns explains behavior →
Get Programming: Learn to code with Python
An object behavior is an operation that defines how objects of a type can act or interact.
- How it is used
- Organizes object design by specifying the operations objects may perform independently or through interaction.
- How deep it goes
- Defines behaviors as operations and illustrates them with cars, circles, map points, rooms, classes, and methods.
- Examples
- Uses calculators, cats, cars, circles, map points, rooms, lists, numbers, and a queue to demonstrate operations.
- What you can do after
- Apply it via Python classes by choosing behaviors, implementing methods, creating objects, and performing operation sequences.
Read how Get Programming: Learn to code with Python explains behavior →
.NET MAUI in Action
Behavior is the part of user-interface logic that specifies what interface elements do in response to conditions or interaction.
- How it is used
- Defines UI actions and connects control events to ViewModel commands within MVVM-based interfaces.
- How deep it goes
- Defines behavior conceptually, then demonstrates attachment, event handling, command binding, and parameter passing.
- Examples
- Uses an animated label example and a to-do CheckBox that updates completion state through an event-to-command behavior.
- What you can do after
- Apply it via EventToCommandBehavior to extend controls and send event-triggered commands with custom parameters.
The Art of Unit Testing 3e
Behavior of software that can be detected through outputs, state changes, or other effects visible to an external observer.
- How it is used
- Guides unit tests toward effects relevant to end users instead of private implementation details.
- How deep it goes
- Defines observable behavior and applies it to assertions, test names, overspecification, and private-method decisions.
- Examples
- Uses verifyPassword with a failing rule to show a test name containing the unit, scenario, and expected result.
- What you can do after
- Evaluate tests for user-relevant behavior and write names and assertions that avoid unnecessary implementation coupling.
Data-Oriented Programming in Java
A behavior is a discrete computation or operation that changes a system from one state to another and produces outputs from inputs.
- How it is used
- Uses behavior modeling to make domain operations expressive, self-describing, and resistant to incorrect use.
- How deep it goes
- Defines behaviors as state transformations and sketches their design, while deferring implementation details.
- Examples
- Uses late-fee invoice processing, API calls, and a generic billing submission method as examples.
- What you can do after
- Build behaviors by identifying input and output states and separating domain transformations before implementation.
Read how Data-Oriented Programming in Java explains behavior →
AI Model Evaluation
The observable outputs and actions produced by a model in response to inputs and conditions.
- How it is used
- Uses offline diagnostic evaluations to inspect model outputs before exposing them to users through A/B testing.
- How deep it goes
- Explains behavior through segment, feature, edge-case, error, fairness, generalization, and coverage diagnostics.
- Examples
- Uses false positives, false negatives, demographic disparities, overfitting, feature contributions, and data shifts as diagnostic cases.
- What you can do after
- Diagnose/debug model failures, bias, and weak generalization before they become user-facing product problems.
Also covered in
- The Well-Grounded Rubyist, Fourth Edition
- Clean Applications with Hexagonal ArchitectureIn early access (MEAP)
- LLM Customization and Fine-TuningIn early access (MEAP)
- Reinforcement Learning from Human Feedback
- Functional Programming in Scala, Second Edition
- Think Distributed Systems
- Machines that ThinkIn early access (MEAP)
- Grokking Software ArchitectureIn early access (MEAP)
- Object-Oriented Software Design in C++
- LLM Evaluation and Alignment, The Foundational IdeasIn early access (MEAP)
- Data Analysis with LLMs
What to know first
- dataData is recorded or represented information, observations, measurements, or values that can be stored, processed, communicated, or interpreted.
- atomic typeAn atomic type is a type whose supported accesses and operations are indivisible with respect to concurrent execution and provide defined synchronization semantics.
- factoryA factory is a function, method, or component that creates and returns values or objects while encapsulating construction or selection logic.
Related concepts
- alignment trainingconfigured by · Alignment training is the process of adjusting an AI system’s behavior to better conform to intended human goals, preferences, values, or constraints.
- canary promptmeasured by · A prompt selected to reveal model behavior changes or failures during a limited check.
- atomic typepart of · An atomic type is a type whose supported accesses and operations are indivisible with respect to concurrent execution and provide defined synchronization semantics.
- EventToCommandBehaviorincludes · EventToCommandBehavior is a .NET MAUI behavior that invokes a command when a specified UI event occurs and can pass event-derived parameters.
- implementation detailcontrasts with · An implementation detail is an internal design, representation, or mechanism describing how software realizes behavior, rather than part of its externally observable behavior or contract.
Questions about behavior
What is behavior?
Behavior is the observable actions, responses, outputs, or effects of a system or object under specified conditions or interactions.
Which Manning books explain behavior?
Unit Testing Principles, Practices, and Patterns, Get Programming: Learn to code with Python, .NET MAUI in Action, The Art of Unit Testing 3e, Data-Oriented Programming in Java and AI Model Evaluation.
What should I know before learning behavior?
Manning books that teach behavior usually introduce data, atomic type, factory and object-oriented language first.
What is the difference between behavior and implementation detail?
Behavior is the observable actions, responses, outputs, or effects of a system or object under specified conditions or interactions. An implementation detail is an internal design, representation, or mechanism describing how software realizes behavior, rather than part of its externally observable behavior or contract.
What kinds of behavior are there?
Kinds of behavior include human-like behavior and EventToCommandBehavior.
What is behavior part of?
Behavior is part of atomic type. An atomic type is a type whose supported accesses and operations are indivisible with respect to concurrent execution and provide defined synchronization semantics.
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.





