Glossary
Web Developer Dictionary
Визначення технічних термінів з PHP, DevOps, MySQL та AI — з прикладами коду та поясненнями простою мовою.
228
terms
27
letters
I
Idempotency
An idempotent operation is one that can be executed multiple times and produce the same result as the first execution. Critical for APIs and queues where a request may be retried due to a network error.In HTTPIdempotent: GET, PUT, DELETE, HEAD — safe to repeatNot idempotent: POST — each call creates a new resourceIdempotency KeyFor POST requests, the client generates a unique key (Idempotency-Key: uuid) and sends it in a header. The server stores the result under that key: if the same request arrives again, it returns the stored result without reprocessing. Stripe, Twilio, and other payment APIs require this.In queuesA worker must be prepared to receive the same message twice (at-least-once delivery). Store processed IDs and check before processing.
Immutability
An immutable object is one whose state cannot be changed after creation. Instead of mutation, a new object is returned with updated values. This eliminates an entire class of bugs caused by unexpected mutations.BenefitsThread safety: an immutable object can be safely read from multiple threads simultaneouslyEasier reasoning: a value cannot change "somewhere else"; state is simpler to trackUndo/Redo: the old state is always availablePure functions: no side effects — easier to testExample (Value Object)class Money {
public function __construct(
public readonly int $amount,
public readonly string $currency
) {}
public function add(Money $other): self {
return new self($this->amount + $other->amount, $this->currency);
}
}In JavaScriptconst, Object.freeze(), spread operator {...obj, key: newVal}. Libraries: Immer, Immutable.js.
Index (MySQL)
An index in MySQL is a separate data structure (usually a B-Tree) that lets the database find rows without scanning the entire table. Proper indexes are the fastest way to speed up slow queries — sometimes by orders of magnitude.When an index helpsColumns in WHERE, JOIN ON, ORDER BY, GROUP BYHigh-cardinality columns (many unique values) — ideal for email, UUIDWhen an index hurtsTables with frequent INSERT/UPDATE/DELETE — every change updates the indexLow-cardinality columns (boolean, a status with 3 values) — MySQL may choose a full scan over the indexComposite indexesAn index on (a, b, c) is used left to right: a query with WHERE a = 1 AND b = 2 uses the index, but WHERE b = 2 alone does not. This is the leftmost prefix rule.
Infrastructure as Code (IaC)
Infrastructure as Code is managing infrastructure through code instead of manual actions in a console. Servers, networks, and databases are described in configuration files, stored in Git, and deployed automatically. Infrastructure becomes versioned and reproducible.Declarative vs ImperativeDeclarative — describe the desired state; the tool figures out how to reach it. Terraform, PulumiImperative — describe the steps to reach the state. Ansible playbooks (partially)Popular toolsTerraform — multi-cloud, HCL syntax, huge provider ecosystemAnsible — configuring existing servers, agentless (over SSH)Pulumi — IaC in regular programming languages (TypeScript, Python, Go)
Inheritance
Inheritance is a mechanism where a child class receives the properties and methods of a parent class and can override or extend them. PHP supports single inheritance: a class can have only one parent.
Basic example
class Animal {
public function __construct(protected string $name) {}
public function speak(): string { return '...'; }
}
class Dog extends Animal {
public function speak(): string { return 'Woof!'; }
public function fetch(): void { /* ... */ }
}
$d = new Dog('Rex');
$d->speak(); // "Woof!" — overriding
$d->fetch(); // own method
When NOT to use it
Inheritance is often overused. Ask: "is B genuinely a kind of A?" (is-a). If yes — fine. If you are inheriting only to reuse code — prefer Composition or a Trait.
Composition over Inheritance
Embedding objects instead of inheriting is more flexible. Instead of class EmailService extends Mailer → class EmailService { private Mailer $mailer; }.
Integration Testing
Integration tests verify that several components work together correctly: a service + a real database, a controller + a real HTTP request. Unlike unit tests, they do not isolate dependencies — they test real integration.Where a unit test is not enoughA unit test verified that the save() method is called. But is the DB mapping configured correctly? Does the foreign key fire? Is the SQL right? Only an integration test answers those questions.Testing pyramidUnit (many, fast) → Integration (fewer, slower) → E2E (few, slow). Unit tests find most bugs, but some only surface in integration.In practiceTest database or in-memory (SQLite) — don't pollute production dataTransactions with rollback after each test — isolate tests from each otherHTTP tests via a test HTTP client — no real server needed
Interface
An interface is a contract describing what a class must be able to do, but not how. A class that implements an interface must implement all of its methods. An interface has no implementation — only method signatures.Why it mattersInterfaces let you write code that depends on an abstraction rather than a concrete class. Any implementation that satisfies the contract can be substituted — the foundation of Dependency Injection and unit testing.Exampleinterface Logger {
public function log(string $message): void;
}
class FileLogger implements Logger { ... }
class NullLogger implements Logger { ... }Interface vs Abstract ClassInterface — signatures only; a class can implement multiple interfacesAbstract class — may contain implementation; a class inherits only one
Internationalisation (i18n) and Localisation (l10n)
i18n (internationalization, 18 letters between i and n) is designing an application to support different languages and regions without changing the code. l10n (localization) is adapting for a specific region: translations, date/number/currency formats.
What i18n includes
Outputting text through translation functions (__(), t()) rather than hardcoded strings
Unicode (UTF-8) support throughout the stack
Correct plural handling (1 file / 2 files / 5 files)
RTL (right-to-left) for Arabic, Hebrew
Date/time, number, currency formats via Intl API or locale-aware libraries
l10n in practice
// PHP — via ICU format (recommended)
$msg = (new MessageFormatter('en', '{count, plural,
one {# file}
other {# files}
}'))->format(['count' => $n]);
Common mistakes
Concatenating translated strings (word order differs between languages)
Ignoring plurality rules
Hardcoding date formats like d/m/Y