Glossary
Web Developer Dictionary
Визначення технічних термінів з PHP, DevOps, MySQL та AI — з прикладами коду та поясненнями простою мовою.
228
terms
27
letters
A
Abstract Class
An abstract class is a class from which you cannot create an instance directly. It defines a common structure and may contain both implemented methods and abstract ones (signature only; implementation in subclasses).When to choose abstract class vs interfaceAbstract class — when subclasses share code (shared logic) and have an "is-a" relationship. Cannot implement multipleInterface — when a contract without implementation is needed; a class may implement multiple interfacesExampleabstract class Shape {
abstract public function area(): float;
public function describe(): string {
return "Area: " . $this->area(); // shared code
}
}
class Circle extends Shape {
public function area(): float { return M_PI * $this->r ** 2; }
}
Accessibility (a11y)
Accessibility (a11y) is building the web so that people with disabilities can use it fully. Around 15% of the population has some form of disability. In many countries, web accessibility is a legal requirement.Main categoriesVisual — blindness, low vision. Tool: screen reader (NVDA, VoiceOver)Auditory — deafness. Captions and transcripts neededMotor — keyboard-only control. All functionality must be reachable without a mouseCognitive — plain language, predictable navigationPracticeSemantic HTML: <button> instead of <div onclick>Alt text for imagesText contrast: minimum 4.5:1 (WCAG AA)aria-label, role for custom componentsVisible keyboard focus (:focus-visible)
Adapter Pattern
Adapter is a wrapper pattern that converts one class's interface into the interface expected by the client. It lets two incompatible interfaces work together without changing their code.
Example
// Third-party logging library with its own interface
class ThirdPartyLogger {
public function writeLog(string $level, string $msg): void {}
}
// Our interface
interface Logger {
public function log(string $msg): void;
}
// Adapter — bridge between them
class LoggerAdapter implements Logger {
public function __construct(private ThirdPartyLogger $lib) {}
public function log(string $msg): void {
$this->lib->writeLog('info', $msg);
}
}
Classic uses
Integrating third-party libraries under your own interface
Migrating to a new API version without changing client code
Testing: a MockAdapter instead of the real service
Agile / Scrum / Kanban
Agile is a set of principles for flexible development: iteration, collaboration, and responding to change. Scrum and Kanban are concrete frameworks for implementing Agile.ScrumSprint — a fixed iteration (1–4 weeks) with a clear goalProduct Backlog — a prioritised list of tasksDaily Standup — 15-minute sync: what I did, what I'm doing, what's blocking meSprint Review — demo of results to the stakeholderRetrospective — discuss the process: what to improveKanbanNo fixed sprints — a continuous flow. A board with columns (To Do → In Progress → Done). WIP limits (Work In Progress) — a maximum of N tasks simultaneously "in progress". More flexible than Scrum.Agile ≠ no planAgile is about adapting to change, not about chaos. Planning happens, but the horizon is shorter and the plan is easier to change.
Algorithm Complexity (Big O)
Big O notation is a way to describe how the execution time or memory usage of an algorithm grows with input size n. It lets you compare algorithms independently of hardware.Common classesO(1) — constant time. Array index access, hash table lookup. Does not depend on nO(log n) — logarithmic. Binary search. Fast even for billions of elementsO(n) — linear. Array traversal. Double n → double timeO(n log n) — Merge Sort, QuickSort (average case)O(n²) — nested loops. Bubble Sort. Impractical for n > 10,000O(2ⁿ) — exponential. Enumerating all subsets. Far too slowIn practiceA SQL query without an index is O(n). With an index it is O(log n). That is why indexes matter 100× more than optimising application code.
Anti-patterns
An anti-pattern is a common "solution" to a problem that looks logical at first glance but causes harm in practice: it complicates code, reduces performance, or creates new problems.
Common anti-patterns
God Object — a class that knows and does everything. Violates SRP. Sign: more than 500 lines and 20+ methods
Magic Numbers — unnamed numbers directly in code: if ($status === 3). Replace with constants or enums
Copy-Paste Programming — duplicating code instead of abstracting. DRY violation
Premature Optimisation — optimising before measuring where the problem is
Spaghetti Code — tangled execution flow with no clear structure
Golden Hammer — applying one tool to every problem
Lava Flow — legacy code nobody touches out of fear of breaking something
N+1 Query — a separate query per record in a loop
API
API (Application Programming Interface) is a contract between two programs: one declares what requests it accepts and what it returns, the other follows those rules. This lets services communicate regardless of language, platform, or internal implementation.How it worksA client sends a request (usually HTTP) specifying a resource and method. The server processes it and returns a response — most commonly JSON or XML. Internal implementation details stay hidden behind the contract.API typesREST — most common, uses HTTP methods (GET, POST, PUT, DELETE)GraphQL — client specifies exactly which fields it needsgRPC — binary protocol for microservices, very fastWebSocket — bidirectional real-time connection
API Gateway
An API Gateway is the single entry point for all clients in a microservices architecture. The client talks to the gateway, which routes requests to the appropriate services, aggregates responses, and handles cross-cutting concerns.What the gateway doesRouting — /users/* → User Service, /orders/* → Order ServiceAuthentication — token verification once, not in every serviceRate limiting — centralised for all servicesAggregation — one client request → multiple microservice calls → one responseSSL termination, logging, cachingPopular solutionsKong, AWS API Gateway, Nginx, Traefik, Envoy. Often combined with a service mesh for internal traffic.
API Versioning
API versioning is an approach to managing changes in an API that allows it to be updated without breaking existing clients. APIs change over time, but clients using an older version must keep working.StrategiesURL versioning — /api/v1/users, /api/v2/users. Most explicit, easy to cache. The most popular approachHeader versioning — Accept: application/vnd.api+json; version=2. Cleaner URL, but more complex clientQuery parameter — /api/users?version=2. Simple, but clutters the URLBreaking change rulesRemoving a field — breaking change → new major versionAdding a field — usually non-breaking (if clients ignore unknown fields)Changing a field type — breaking changeDeprecationMaintain the old version for at least 6–12 months after announcing deprecation. Notify clients via the Sunset header and documentation.
API-First Approach
API-first is a development methodology where the API is designed and documented before any code is written. The API contract (OpenAPI/Swagger) becomes the single source of truth for all teams.
Traditional vs API-first
Traditional: code the backend → document what was built → frontend adapts
API-first: design the API → everyone agrees → backend and frontend develop in parallel
Benefits
Frontend can start immediately — a mock server is generated from the OpenAPI spec
Design problems are found early, before any code is written
Automatic generation of SDKs, documentation, and tests from the contract
Easier versioning — the contract is versioned in Git
Tools
OpenAPI 3.x → Swagger UI (docs), Prism (mock server), OpenAPI Generator (SDK). Stoplight, Postman — for API design.
Auto Scaling
Auto scaling is the automatic adjustment of the number of servers or resources based on load. At peak traffic, new instances are added. When load drops, extra instances are removed. You pay only for the capacity you need.Horizontal vs VerticalHorizontal scaling (scale out/in) — add/remove instances. Scales without limit; requires a stateless applicationVertical scaling (scale up/down) — increase/decrease the power of a single server (CPU, RAM). Simpler, but has a ceilingTrigger metricsCPU: above 70% → add an instanceMemory: above 80% → scale upRPS / Queue depth — application-specificThe stateful problemAuto scaling only works for stateless applications. Sessions and cache must live in external storage (Redis), not in process memory.