# Ports and Adapters Ports-and-adapters architecture keeps core domain behavior independent of external systems. Ports declare what the core needs; adapters connect those ports to files, HTTP, databases, browsers, editors, or other hosts. The X modernization uses this distinction directly: deterministic text, slug, parsing, and transformation capabilities belong in the core; Obsidian, Node, PHP, Python, Perl, filesystem, and network behavior belong in host adapters. Related: [[wiki/Host Adapter|Host Adapter]], [[wiki/Portable Contract|Portable Contract]], [[projects/X and XApps - Drop the Folder and It Runs|X and XApps]]. Source: [AWS Prescriptive Guidance — Hexagonal architecture](https://docs.aws.amazon.com/prescriptive-guidance/latest/hexagonal-architectures/best-practices.html)