Skip to content

Add Architecture section to README.md#1853

Merged
yegor256 merged 1 commit intojcabi:masterfrom
bibonix:architecture-section
May 7, 2026
Merged

Add Architecture section to README.md#1853
yegor256 merged 1 commit intojcabi:masterfrom
bibonix:architecture-section

Conversation

@bibonix
Copy link
Copy Markdown
Contributor

@bibonix bibonix commented May 6, 2026

@yegor256, this pull request adds an Architecture section to README.md that was previously missing.

What was added

A new ## Architecture section placed immediately before ## How to contribute?, covering six key design decisions in jcabi-github:

  1. Dual Rt/Mk interface hierarchy — every GitHub concept is modeled as a Java interface with two complete implementations: Rt* (live REST API) and Mk* (in-memory mock), so no mocking framework is needed in tests.
  2. Smart decorator pattern — each interface has a static inner Smart class that wraps the core interface and adds convenience methods, keeping the base interface minimal.
  3. JSON as canonical state — all domain objects implement JsonReadable/JsonPatchable; there is no ORM or eager mapping, and every json() call is a live HTTP round trip.
  4. Link-header pagination with Bulk cachingRtPagination<T> follows Link: rel="next" headers lazily; Bulk<T> pre-injects list-response JSON to eliminate N+1 HTTP requests.
  5. Wire-based HTTP composition — rate limiting (CarefulWire), retries, and redirects are composed as standalone immutable Wire decorators from jcabi-http, not interceptor chains.
  6. XML mock storage via Xembly — the Mk* mock persists state in a single XML document mutated with Xembly directives, providing cross-object consistency without HTTP replay.

Formatting

All prose lines follow the 80-character soft wrap with two-space continuation indent as specified in the project style. markdownlint passes with zero warnings.

This PR is ready for merge. @yegor256

Adds an Architecture section that explains the six key design
decisions: dual Rt/Mk implementation hierarchy, Smart decorator
pattern, JSON-as-state model, Link-header pagination with Bulk
caching, Wire-based HTTP composition, and XML-backed mock storage
with Xembly.
@yegor256 yegor256 merged commit 51f51bf into jcabi:master May 7, 2026
8 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants