Glossary

Web Developer Dictionary

Визначення технічних термінів з PHP, DevOps, MySQL та AI — з прикладами коду та поясненнями простою мовою.

228 terms
27 letters
E
E2E Testing
E2E (End-to-End) tests automatically simulate real user actions in a browser: fill in a form, click a button, verify that data appears. They test the entire stack from UI to database.When neededCritical flows: registration, login, checkout, paymentComplex multi-step UI flowsRegression tests after major changesPopular toolsPlaywright (Microsoft) — supports Chromium, Firefox, WebKit. The most popular todayCypress — JavaScript, excellent DX, Chromium-based onlySelenium — older, supports all browsersDownsidesE2E tests are slow (seconds per test), brittle (depend on UI details), and require a running application. Keep them few and run them less frequently than unit tests.
ELK Stack (Logging)
ELK Stack — Elasticsearch + Logstash + Kibana. A platform for centralised collection, storage, search, and visualisation of logs from all services. The modern version is the Elastic Stack, adding Beats (collection agents). Components Filebeat / Fluentd — an agent on each server that reads log files and ships them forward Logstash — parsing, filtering, transforming logs (can be replaced by Fluentd or Vector) Elasticsearch — indexes and stores logs; provides full-text search Kibana — web UI for log search, dashboards, alerts Alternatives Grafana Loki — lighter, stores only labels and lines (does not index content) Datadog, Splunk — cloud SaaS solutions Structured logs Log JSON instead of plain text. Elasticsearch then automatically indexes fields and you can query: level:error AND service:payments AND duration:>1000.
Embeddings
Embeddings are numerical vector representations of objects (text, images, audio) in a multi-dimensional space, where semantically similar objects are positioned close to each other. The foundation of semantic search and recommendation systems.ExampleThe phrases "PHP developer" and "backend programmer" will have similar vectors. "Cat" and "dog" are closer to each other than "cat" and "car".How to obtainThrough an embedding model: OpenAI Embeddings API, Sentence Transformers, BERT, FastText. The model takes text and returns a vector (typically 768–3072 numbers).Use casesSemantic search: find documents similar in meaning to a queryRAG: find relevant context for an LLMRecommendations: "similar products", "related articles"Text clustering and classificationDuplicate detection
Encapsulation
Encapsulation is hiding the internal implementation details of an object and providing controlled access through a public interface. External code knows only what the object does, not how. Access modifiers public — accessible from anywhere protected — class and subclasses only private — class only (strictest) readonly (PHP 8.1+) — can only be written in the constructor Why it matters A class can change its internal implementation without affecting external code. Example: changed balance storage from int to a Money VO — external code is unaware because it only calls getBalance(). Getters and setters Not mandatory — they are an implementation detail. Duplicating a field $name with a getter getName() for no reason violates DRY. Expose only what external code genuinely needs.
Encoding (UTF-8, ASCII, Base64)
Encoding is a way of representing characters as bytes. ASCII (1963) — 128 characters, 7 bits. UTF-8 (1993) — Unicode encoding: ASCII characters take 1 byte, others take 2–4. The de facto standard for the web. UTF-8 in PHP PHP strings are sequences of bytes, not characters. strlen('Привіт') = 12 (bytes), not 6. For correct Unicode handling, use mb_ functions: mb_strlen(), mb_substr(), mb_strtolower(). Base64 Encodes binary data as a string of 64 characters (A-Z, a-z, 0-9, +, /). Increases size by ~33%. Not encryption — just encoding. Uses: Transferring binary data over text protocols (email, JSON) Data URL: data:image/png;base64,iVBOR... JWT (header and payload are Base64URL encoded) base64_encode('Hello') // "SGVsbG8=" base64_decode('SGVsbG8=') // "Hello"
Enum (Enumeration)
An enum (enumeration) is a data type with a fixed set of named constants. Instead of "magic" strings like 'published', 'draft' throughout the code — a type with compile-time checking. PHP supports enums since version 8.1.Backed Enum (with type)enum Status: string { case Draft = 'draft'; case Published = 'published'; case Archived = 'archived'; } $post->status = Status::Published; echo Status::Published->value; // "published" $s = Status::from('draft'); // Status::DraftPure Enum (no type)enum Direction { case North; case South; case East; case West; }BenefitsIDE autocomplete and static analysis know all possible valuesImpossible to pass a non-existent valueEnums can implement interfaces and have methods
Environment Variables (.env)
Environment variables are configuration kept outside the code: passwords, API keys, database URLs. They are stored in the OS environment or in a .env file. Code reads them at runtime instead of hardcoding values in source.Why separate from codeOne codebase — many environments (local / staging / production) with different values.env is excluded from Git (listed in .gitignore) — secrets do not leakEasy to change configuration without modifying code or rebuildingBest practiceKeep a .env.example in the repository with all keys but no values — new developers will know what to configure. In CI/CD, inject variables via the provider's UI, not via files.12-Factor AppStoring configuration in environment variables is one principle of the 12-Factor App methodology — a set of practices for building scalable cloud applications.
Event Loop
Event Loop is the mechanism for executing asynchronous code in single-threaded environments (JavaScript, Node.js). It allows handling thousands of concurrent connections without threads by offloading I/O operations to the OS.How it worksCall Stack — synchronous code executes sequentiallyWhen an async operation is encountered (HTTP request, setTimeout) — it is handed to Web API/libuv and runs outside the main threadWhen the operation completes — the callback enters the Callback QueueThe Event Loop checks: if the Call Stack is empty — it moves the callback onto the stackMacrotasks vs MicrotasksMicrotasks (Promise.then, queueMicrotask) execute before the next macrotask (setTimeout, setInterval). So Promise.resolve().then(fn) runs before setTimeout(fn, 0).
Event Sourcing
Event Sourcing is an approach to state storage where, instead of current values, a sequence of events that led to that state is stored. The current state is derived by "replaying" all events from the beginning.ExampleInstead of storing balance = 1500, store events: AccountCreated(0), MoneyDeposited(2000), MoneyWithdrawn(500). Balance = 0 + 2000 − 500 = 1500.AdvantagesFull audit trail: always know why the state is what it is, not just what it isCan restore state to any point in timeNew read models are built by replaying existing eventsChallengesThe event store grows indefinitely — snapshots are neededComplex event schema evolution (versioning)High implementation complexity
Event-Driven Architecture
Event-Driven Architecture (EDA) is an architectural style where services communicate through events rather than direct calls. A single event (OrderPlaced) can trigger multiple independent handlers in parallel: sending an email, updating stock, writing analytics. Benefits Loose coupling — the event producer does not know about subscribers Scalability — handlers can be scaled independently Extensibility — a new handler plugs in without any change to the producer Components Producer — generates and publishes the event Event Broker — routes events (Kafka, RabbitMQ) Consumer — subscribes and processes Challenges Debugging: harder to trace the flow of execution Eventual Consistency: different services' state temporarily diverges Delivery guarantees: at-least-once requires idempotent handlers
Eventual Consistency
Eventual Consistency is a guarantee in distributed systems: if there are no new writes, all replicas will eventually converge to the same state. But at any given moment, different nodes may show different values.ExampleYou liked a post on a social network. The counter changed immediately for you (local replica), but your friend in another region still sees the old count — and will see the updated one in a second or two when replication catches up.Strong vs eventual consistencyStrong Consistency — after a write, all reads immediately see the new value. More expensive, higher latencyEventual Consistency — cheaper and faster, but a brief window of stale readsCRDTConflict-free Replicated Data Types — special data structures where conflicts between replicas are resolved automatically without coordination. For example, a distributed counter where each node independently increments its own value.
EXPLAIN (Query Plan)
EXPLAIN is a SQL command that shows how the database plans to execute a query: which tables it will read and in what order, which indexes it will use, how many rows it will scan. An indispensable tool for optimising slow queries.Basic syntaxEXPLAIN SELECT * FROM orders WHERE user_id = 42 AND status = 'paid'; -- more detail with actual execution analysis: EXPLAIN ANALYZE SELECT ...;What to look fortype: worst — ALL (full table scan); best — const, ref, eq_refrows: estimated row count. Millions with ALL — a problemExtra: Using filesort and Using temporary — warning signskey: which index was used (NULL = no index used)Step-by-step approachFind a slow query → EXPLAIN → spot the ALL scan → add an index → check EXPLAIN again.