liveBook · Manning

Class

A class is a programming-language construct that defines a type’s structure and behavior and provides a basis for creating or representing objects.

How 27 Manning books explain it

Python How-To

How it is used
Models application data and related operations as custom types suited to specific needs.
How deep it goes
Explains initialization, method types, encapsulation, inheritance, dataclasses, and refactoring, with attention to instance creation and object lifecycle.
Examples
Uses a task-management model, direction constants, and a mixed-purpose student class to demonstrate construction and design trade-offs.
What you can do after
Build classes from scratch with initialized attributes and methods, and evaluate their interfaces and responsibilities for maintainability.

Read how Python How-To explains class →

The Well-Grounded Rubyist, Fourth Edition

Class is Ruby's built-in class whose instances represent classes and whose behavior supports class-level operations and instantiation.

How it is used
Organizes shared instance behavior while treating classes as objects that receive messages and create instances.
How deep it goes
Works through `Class.new`, instantiation, and class-object method lookup, including inherited methods and the role of `self`.
Examples
Uses ticket instances, an anonymous class with `say_hello`, and reopened class definitions.
What you can do after
Build it from scratch with `class` or `Class.new`, then distinguish methods called on a class from methods called on its instances.

Read how The Well-Grounded Rubyist, Fourth Edition explains class →

Get Programming: Learn to code with Python

How it is used
Packages shared properties and operations into object types that organize reusable parts of larger programs.
How deep it goes
Works from class syntax through initialization, attributes, methods, instances, and class design, without detailing Python’s implementation of classes.
Examples
Uses Circle and Rectangle definitions, a list-backed Stack, a Queue exercise, and a card-game program.
What you can do after
Build it from scratch by defining attributes and methods, creating instances, and using cooperating classes in programs.

Read how Get Programming: Learn to code with Python explains class →

Software Engineering for Data Scientists

A class is a programming construct that defines a type of object by combining data attributes with associated functions.

How it is used
Organizes repeated data-processing and machine-learning tasks into portable, maintainable Python components.
How deep it goes
Explains class creation, constructors, self, attributes, methods, object use, and reusable model wrappers without covering language internals.
Examples
Uses integers, RandomForestClassifier objects, customer-churn dataset preparation, summary plots, precision evaluation, and model tuning.
What you can do after
Build it from scratch to package dataset preparation, visualization, evaluation, and scikit-learn model-tuning operations.

Read how Software Engineering for Data Scientists explains class →

Python Workout: 50 ten-minute exercises

How it is used
Uses classes to model object types, store instance data, organize behavior, and structure larger object-oriented systems.
How deep it goes
Explains definitions, instances, attributes, self, initialization, composition, inheritance, and the __new__ to __init__ creation sequence.
Examples
Demonstrates ice-cream scoops, zoo animals and cages, beverage defaults, files, phones, bread, and inheritance hierarchies.
What you can do after
Build classes with initialized attributes, instantiate them, call methods, compose objects, and extend behavior through inheritance.

Read how Python Workout: 50 ten-minute exercises explains class →

100 C++ Mistakes and How to Avoid Them

A class is a C++ language construct that defines a user-defined type containing data members and member functions with specified access control.

How it is used
Uses classes to define types with meaningful state and predictable operations.
How deep it goes
Explains invariants and selected special-member rules through design mistakes and corrected declarations.
Examples
Illustrates a nonnegative student age, a copyable but nonassignable container, and a rational-number type.
What you can do after
Evaluate class designs for valid state, understandable operations, and explicit special-member behavior.

Read how 100 C++ Mistakes and How to Avoid Them explains class →

Python Workout, Second Edition

A class is a Python construct that defines the attributes and behavior of objects and can serve as a template for creating them.

How it is used
Uses classes to organize related data and behavior into domain-specific objects.
How deep it goes
Explains definitions, instances, attributes, methods, initialization, self, composition, inheritance, and dataclasses through exercises.
Examples
Uses ScoreList, Scoop, Bowl, Book, Shelf, and Zoo examples alongside class-building and relationship exercises.
What you can do after
Build classes with attributes and methods, compose objects, extend classes through inheritance, and reduce boilerplate with dataclasses.

Read how Python Workout, Second Edition explains class →

The Joy of JavaScript

How it is used
Uses classes to simplify domain modeling and express inheritance hierarchies.
How deep it goes
Explains prototype linking versus copying and compares class syntax with constructor functions, while emphasizing that classes can obscure prototype mechanics.
Examples
Uses Transaction and HashTransaction examples, and contrasts a Transaction class with a module-pattern implementation.
What you can do after
Evaluate when classes simplify inheritance-based modeling and recognize how JavaScript prototypes differ from class-based copying.

Read how The Joy of JavaScript explains class →

Kotlin in Action, 2E

A class is a Kotlin declaration that defines the structure and behavior of objects through members such as properties, functions, and constructors.

How it is used
Introduces classes as Kotlin’s concise way to encapsulate object data and behavior.
How deep it goes
Explains primary constructors, properties, initializer blocks, defaults, and type distinctions; defers fuller class details.
Examples
Uses Person and User declarations, including explicit initialization, default constructor values, and named-argument calls.
What you can do after
Build Kotlin classes with constructor-backed properties, initialization code, defaults, and named constructor arguments.

Read how Kotlin in Action, 2E explains class →

High Performance Unity Game Development

A language construct that defines the data and behavior of objects created from that type.

How it is used
Uses classes to group long-lived game data and hold arrays for enemy updates.
How deep it goes
Compares class and struct storage, array locality, and function passing through C# examples; does not develop class methods or inheritance.
Examples
Shows an enemy-data class holding arrays and a game-data class passed to a player-movement function.
What you can do after
Apply it by choosing classes for suitable game data and anticipating how class references behave in functions and arrays.

Read how High Performance Unity Game Development explains class →

Secrets of the JavaScript Ninja, Third Edition

A class is JavaScript syntax for defining object construction and behavior that is implemented through the prototype system.

How it is used
Defines object construction and shared behavior with class syntax rather than direct prototype manipulation.
How deep it goes
Works through constructors, prototype methods, static methods, and instanceof; sketches extends and super without a worked inheritance example.
Examples
Tests an instance’s own fields, inherited method, and instanceof result, then compares two instances with a static method.
What you can do after
Build it from scratch: define a class with instance and static methods, and recognize how its instances inherit behavior.

Read how Secrets of the JavaScript Ninja, Third Edition explains class →

Essential TypeScript 5, Third Edition

A class is a programming construct that defines the structure and behavior of objects of a data type.

How it is used
Defines reusable object behavior and typed data-model entities, including orders in an Angular application.
How deep it goes
Works through construction, inheritance, static and private methods, typed properties, emitted JavaScript, and subclass-array inference.
Examples
Uses product pricing, typed employees, mixed subclass arrays, and an Angular order data model.
What you can do after
Build it from scratch: define typed classes and subclasses, then annotate mixed-subclass arrays when inference is too narrow.

Read how Essential TypeScript 5, Third Edition explains class →

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond

A language construct that defines a blueprint for creating objects with shared behavior and state.

How it is used
Uses classes to create resource-store instances with shared methods and per-instance setup.
How deep it goes
Works through declaration, instantiation, exports, static members, and extension; notes method binding and constructor rules.
Examples
Uses API resource stores, a pet constructor check, and a car-extension exercise.
What you can do after
Build it from scratch: define, instantiate, export, and extend a JavaScript class.

Read how Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond explains class →

Practices of the Python Pro

How it is used
Uses classes to separate concerns by grouping closely related data and behaviors into objects.
How deep it goes
Explains attributes, methods, self, and __init__, with inheritance appearing as a separate debugging and testing concern.
Examples
Demonstrates class extraction, initialization, self-based state access, and instance use through a Rock, Paper, Scissors simulator.
What you can do after
Builds a Python class from cooperating functions and shared data, then creates an instance and invokes its behavior.

Read how Practices of the Python Pro explains class →

Web Components in Action

How it is used
Expresses custom-element behavior and inheritance from HTMLElement when building a Web Component.
How deep it goes
Demonstrates HTMLElement inheritance and connectedCallback in a slider, while deferring fuller treatment of component concepts.
Examples
Builds a slider class that adds markup and styling when connected to the DOM.
What you can do after
Build from scratch a custom element class that extends HTMLElement and adds behavior through connectedCallback.

Read how Web Components in Action explains class →

Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

A class is a .NET type that defines the members and behavior of objects or provides class-level functionality.

How it is used
Uses classes as PowerShell's interface to .NET functionality and Windows automation capabilities.
How deep it goes
Defines types, instances, members, static access, and assembly loading, but stops short of detailed class implementation.
Examples
Demonstrates Math.Abs, SpeechSynthesizer, assembly loading, speech output, and PowerShell wrappers for .NET functionality.
What you can do after
Apply it via PowerShell to locate .NET classes, call static members, create instances, and reuse .NET functionality in scripts.

Read how Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools explains class →

Secrets of the JavaScript Ninja, Second Edition

JavaScript syntax introduced in ES6 for defining classes, including constructor behavior, methods, and inheritance over the prototype system.

How it is used
Simplifies class-like object creation and inheritance while retaining JavaScript’s prototype-based implementation.
How deep it goes
Explains constructors, instance and static methods, and extends/super inheritance, while identifying prototypes beneath the syntax.
Examples
Uses Ninja instances to demonstrate methods and static comparison, then Person and Ninja to show inheritance.
What you can do after
Build ES6 classes with constructors, instance and static methods, and extends/super inheritance.

Read how Secrets of the JavaScript Ninja, Second Edition explains class →

Pro Angular 16

A JavaScript class is a language construct that defines the structure and behavior of objects and provides a basis for creating instances.

How it is used
Organizes application data and behavior into reusable object types, including Angular models and framework classes.
How deep it goes
Explains declaration, construction, methods, concise constructors, static methods, and inheritance through runnable examples.
Examples
Uses Product, DiscountProduct, TodoItem, TodoList, and an Angular tax pipe to demonstrate models, inheritance, factories, and framework integration.
What you can do after
Build reusable TypeScript data models with constructors, methods, concise properties, static factories, and inheritance.

Read how Pro Angular 16 explains class →

The Well-Grounded Python Developer: How the pros use Python and Flask

A class is a Python construct that defines the structure and behavior of objects and provides a namespace for their attributes and methods.

How it is used
Organizes application data and behavior into reusable objects and provides a structured API for functionality.
How deep it goes
Explains definitions, instantiation, self, public members, inheritance, composition, and refactoring, without covering advanced class mechanics.
Examples
Uses a Person class with optional names, full_name(), multiple instances, and a UML representation.
What you can do after
Build it from scratch by defining classes, instantiating objects, assigning state, and implementing methods that operate on that state.

Read how The Well-Grounded Python Developer: How the pros use Python and Flask explains class →

Data-Oriented Programming: Reduce software complexity

A class is an object-oriented programming construct that defines the structure and behavior of objects and can serve as a type or inheritance basis.

How it is used
Uses classes to model domain entities, inheritance, endpoint handling, and data conversion in object-oriented system design.
How deep it goes
Explores class responsibilities and relationships through designs, then stops short of presenting a complete implementation.
Examples
Uses a library management design and JSON search endpoint to expose modeling choices and repeated conversion logic.
What you can do after
Evaluate when class-based decomposition clarifies a system and when generic data manipulation can reduce duplication and coupling.

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

Data-Oriented Programming in Java

A Java declaration that defines a type by specifying its state representation and optionally its behavior.

How it is used
Models fixed domain decisions as named data while leaving decision-making behavior on an object such as ScheduledTask.
How deep it goes
Defines classes through names and attributes, demonstrates state refactoring, and stops short of explaining how the data types connect.
Examples
Uses ScheduledTask, RetryImmediately, ReattemptLater, Abandon, and Scheduler examples to expose retry-state semantics.
What you can do after
Apply classes to refactor implicit state into explicit domain data and make downstream conditions easier to read.

Read how Data-Oriented Programming in Java explains class →

Object-Oriented Software Design in C++

How it is used
Guides requirements analysis and object-oriented design by turning application concepts into stateful, behavioral types.
How deep it goes
Defines state, behavior, instantiation, and access levels, then stops short of detailed implementation mechanics.
Examples
Uses a book catalogue, book, attributes, form, member variables, and requirements nouns to illustrate class selection and state.
What you can do after
Apply requirements analysis to propose initial classes and assign their state, behavior, and access boundaries.

Read how Object-Oriented Software Design in C++ explains class →

F# in Action: A Revised Edition of Get Programming with F#

A class is an object-oriented programming construct that defines the structure and behavior of instances.

How it is used
Uses classes for object-oriented .NET interoperability, specific corner cases, and compositions requiring methods or interfaces.
How deep it goes
Explains instances, constructors, methods, interfaces, and composition, while contrasting classes with functions without detailing class internals.
Examples
Demonstrates C# Person consumption, FileInfo construction, filesystem access, and an ATM using interchangeable printer implementations.
What you can do after
Builds F# applications that instantiate .NET classes, call methods, define classes, and inject interface implementations.

Read how F# in Action: A Revised Edition of Get Programming with F# explains class →

Simple Object-Oriented Design: Create clean, maintainable applications

A programming-language construct that defines the structure and behavior of objects and can be extended or instantiated according to the language's object model.

How it is used
Uses classes to control complexity, isolate business features, and preserve object consistency during code evolution.
How deep it goes
Explains class size, cohesion, isolation, and consistency responsibilities, while deferring encapsulation, state, and broader abstractions.
Examples
Uses Enrollment cancellation, Offering enrollment limits and seats, dedicated feature classes, and class-size reflection exercises.
What you can do after
Apply it to split growing responsibilities, isolate complex features, and enforce data consistency inside the responsible class.

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

Clojure: The Essential Reference

A Java class is a JVM type definition that specifies the state and behavior of objects and may implement interfaces or extend another class.

How it is used
Supports JVM interoperability and runtime inspection by obtaining an object’s underlying Java class.
How deep it goes
Defines class and contrasts it with metadata-aware type, but stops short of detailed JVM class mechanics.
Examples
Uses vectors, strings, functions, nil, metadata-tagged vectors, and Java Number and Comparable checks.
What you can do after
Diagnose runtime Java types and distinguish underlying classes from metadata-based type labels.

Read how Clojure: The Essential Reference explains class →

JavaScript in Depth

A JavaScript language construct that defines a blueprint for creating objects with methods, initialization behavior, inheritance, and optionally private state.

How it is used
Organizes initialization, methods, inheritance, and private state behind a familiar object-construction syntax.
How deep it goes
Explains prototype translation, constructor guardrails, property placement, inheritance calls, and private fields, stopping short of engine implementation details.
Examples
Uses FilingCabinet, Drawer, SecureDrawer, descriptor inspection, and a private Vault field.
What you can do after
Apply it via JavaScript class syntax while predicting instance properties, prototype sharing, inheritance behavior, and private-state access.

Read how JavaScript in Depth explains class →

Grokking Software Architecture

A programming construct that defines the properties and behavior shared by its object instances.

How it is used
Uses classes to separate responsibilities and organize systems that must handle change.
How deep it goes
Shows practical service-class examples and historical context, but does not explain class internals.
Examples
Uses order-processing services and a hospital simulation with patient types and a generic treatment room.
What you can do after
Build it from scratch by splitting order processing into focused service classes coordinated by OrderService.

Read how Grokking Software Architecture explains class →

Also covered in

What to know first

Related concepts

Questions about class

What is class?

A class is a programming-language construct that defines a type’s structure and behavior and provides a basis for creating or representing objects.

Which Manning books explain class?

Python How-To, The Well-Grounded Rubyist, Fourth Edition, Get Programming: Learn to code with Python, Software Engineering for Data Scientists, Python Workout: 50 ten-minute exercises, 100 C++ Mistakes and How to Avoid Them, Python Workout, Second Edition, The Joy of JavaScript and 19 more.

What should I know before learning class?

Manning books that teach class usually introduce object, function, method and Python first.

What kinds of class are there?

Kinds of class include dataclass, base exception class, BasicObject and generics.

What is class a kind of?

Class is a kind 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.