Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Domain-Driven Design

Your Ports Are Lying About Your Business: Name Them for the Work They Do

By Freedom251 Team · · 4 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In hexagonal architecture, a port named createUser may tell you how data is handled without saying why the application handles it. If the business process is customer registration, the port should make that intent visible—unless the domain genuinely describes the work as creating a record. Here, “ports” means application-boundary interfaces, not network ports.

What a port name should tell you

Hexagonal architecture separates an application’s behavior from the technologies around it. In Alistair Cockburn’s original 2005 description, a port represents a purposeful conversation with the application; an adapter translates between that interaction and a particular external technology. The same application can be driven by a user, another program, an automated test, or a batch process, without making its core behavior depend on a database or runtime device. Cockburn’s original article describes that aim.

As an Amazon Associate I earn from qualifying purchases.

A port is therefore more than a convenient place to put an interface. Its name can explain what the application offers. A method such as createUser might reflect a REST endpoint or database operation; register on a CustomerRegistration interface instead points toward a business process. The second name is useful when it matches the language people in the domain use, not simply because it sounds more businesslike.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

CRUD-shaped or business-shaped?

Christoph Thonhauser’s SQUER article contrasts controller-like methods such as createUser and updateUser with a customer-registration interaction. The distinction is about what the boundary communicates: a record operation, or the reason someone performs it. Thonhauser’s article frames the diagnostic this way: “Will a domain expert know exactly what process this port refers to, simply by its name?”

#1 Best Overall
Wrap-It Storage - Cable Labels, Medium, Multi-Color (30-Pack) Write On Cord Tags for Wire Management and Identification
  • Tired of unplugging the wrong cord? We were! Avoid the frustration with Cable Labels
  • Quickly and Easily Identify Cords, Cables, Wires and More: These cable identifiers are perfect as cord labels for electronics, computer cable labels, charger labels, network cable labels, ethernet cable labels, wiring labels, wire tags, speaker wire labels, audio cable labels and for anywhere else you need cable management
  • Easy to Write On: Surface is easy to write on with a pen
  • No Sticky Residue: These cord labels feature hook and loop closure so there is no sticky residue left over from other cable tags or identifiers
  • Includes 30 size medium cable labels // PATENT PENDING"
Question CRUD-shaped port Business-shaped port
What does the name foreground? A record operation, such as creating or updating a user. A process or intent, such as registering a customer.
What might a test emphasize? That data can be written and read back, or that fields are handled correctly. A business rule, such as whether a customer may check out before confirming an email.
Does the wording survive a technology change? It may be tied to a transport or persistence operation. It can remain meaningful if REST or the persistence layer changes, provided the business process stays the same.
When is it a natural fit? When domain experts themselves describe the work as creating or editing a row. When the interaction represents a recognizable business process rather than a generic data operation.

These are design considerations, not measured guarantees. The SQUER examples illustrate how naming can shape the questions a test asks; they do not establish that one naming style always improves testing or maintenance.

Let tests exercise the promise, not just the plumbing

If a port models customer registration, a useful test can ask whether the application enforces the rules around registration. For example, the SQUER article suggests testing meaningful behavior such as checkout eligibility after email confirmation. That is different from merely checking that a row was saved and retrieved: it asks whether the application keeps the promise its business interaction implies.

Rank #2
Wmiwulien 8 Sheet 240 Pcs Cable Labels for Management
  • Cable Labels Tag Size - A4 size 210 mm x 297 mm (sheet size); 3.31 x 1.02 inch (each sticker size, please see the Second Pictures). Quantity: 8 sheets (30 pcs small label per sheet, 240 pcs totally). Contains 8 colors, Including: Pink, Green, Red, White, Blue, Orange, Brown, Yellow.
  • Advantages – these durable cord labels for electronics are tear resistant, oil-proof, high temperature resistant, can stay in shape and last long, these ethernet cable labels are perfect for both indoor and outdoor use.
  • Widely Usages - Our waterproof cord labels tags write on can be used in homes, offices, cars, and other places. They can help you organize messy cables and wires more efficiently. Different colors allow you to distinguish different cables in a bunch of cables easily. Perfect for organizing ethernet cords, computer cords, charger cords, electrical cords, power cords, and so on.
  • Suitable for Handwriting & Laser Printer - This cable labels are suitable for laser printer, you can print the text on the label. And you can write on it with pens or markers as you need. (PLEASE NOTE: NOT compatible with inkjet printers.)
  • We are responsible for every speaker labels sold.If you have any product problems, please contact us. Our service team will respond quickly to your problems within 24 hours.

This does not mean tests should ignore adapters or persistence. It means the application-level interaction can be tested without making the test a duplicate of an HTTP controller or database schema. Cockburn’s stated purpose for the pattern includes developing and testing the application in isolation from its eventual runtime devices and databases; adapters remain responsible for translating at those boundaries. The original account explains that separation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep business intent inside; translate at the adapters

A domain-oriented port does not require every consumer to use domain language or receive domain objects. An HTTP client may expect a particular response shape; a persistence system expects its own representation. An adapter can translate the application interaction and its result into the format a particular consumer needs. Thonhauser recommends involving domain experts to clarify intent and consumers to clarify response needs, then keeping that translation at the boundary rather than letting transport conventions define the application’s vocabulary.

Rank #3
Cable Labels,300 PCS Waterproof Cable Tags in 10 Colors,Wire Labels for Management,Cord Label Can Write On,Self Adhesive Wire Label Printable for Laser Printer and Handwriting
  • Complete Set Specifications: Contains 10 colors, including red, orange, yellow, blue, light blue, purple, light green, green, white, and black. A4 size 210 mm x 297 mm (sheet size); 3.3 x 1 inch (each sticker size). Quantity: 10 sheets (30 pcs small label per sheet, 300 pcs totally)
  • Durable and Versatile Features: These cable labels have the advantages of handwriting, printability, resistance to color fading, tear resistance, water and oil discharge, and high temperature resistance. Various colors can help you organize and distinguish different cables easily
  • Printer Compatibility and Writing Recommendations: Compatible with laser printer only, ink-jet printer is not supported. To write on cable label stickers by hand is also available. Use a dark-colored marker when using light-colored label paper, and use a light-colored or white marker pen with dark-colored label paper for better visibility
  • Color Coding System: Organize your different groups of cables with different vivid colored labels, easy to identify the kind of labels at a glance. The color of the cable label is different for different color skins. For example, for white cables, you can choose yellow, blue, orange, etc., and for black skins, choose more eye-catching orange, blue, and so on
  • Multiple Application Scenarios: Cable tags are suitable for use in homes, offices, cars and other places, allowing you to quickly and easily organize messy cables and wires. Suitable for organizing computer cord labels, charger cord labels, electrical cord labels, ethernet cable labels, network cable labels, wire labels, power cord labels and more

That separation is most valuable when the interaction needs to make sense across different drivers or adapters, or when application behavior should be isolated from external technologies. The port describes the conversation the application supports; each adapter handles the mechanics of carrying it to or from a specific system.

When CRUD names are the honest choice

Do not rename a simple operation just to make it sound strategic. Thonhauser acknowledges that CRUD vocabulary can be appropriate when the domain is genuinely CRUD—for example, a reference-data editor where users really do think in terms of creating a row. A business-sounding label that domain experts would not use obscures intent rather than clarifying it.

Rank #4
Trilancer Cable Cord Labels Large Size for Wire Organizing & Identification
  • ✅【Get Organized】- Sick of unplugging the wrong cord? So were we. Avoid the frustration with the cable cord labels. Label computer cords, power strips, charging cables, and anything, without tape or twist ties.
  • ✅【Easy To Write On】- What makes these cable labels different from other brands is that they don't bleed ink- you can write on the surface of cable tags with a marker, pen, or ink pen, clearly without any blur vision.
  • ✅【No Sticky Residue】- Instead of using tape or other one-time solutions that leave a gunky lint magnet, these labels for cords and wires feature reusable hook and loop closure, which means clean and tidy wires.
  • ✅【Reusable】- Our hook and loop type waterproof cable labels are uncluttered, reusable, waterproof, and easy to open and close. Forget your sticky cable tags that leave sticky, dirty residues.
  • ✅【Multiple Uses】- These cable identifiers can be used to identify cables, wires, and more. They can also be used to store cables, organize cables, organize electrical systems, manage home theater cables, and more.

Nor does every design need another interface by default. A single-adapter application may not benefit enough from an additional boundary to justify its complexity. AWS’s hexagonal architecture guidance also notes complexity and possible latency as trade-offs. Decide whether the separation serves a real need—such as supporting multiple ways to drive the application or isolating its core behavior—rather than treating architecture as a naming exercise.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

A practical review for an existing port

  1. Read the name without the implementation. Ask whether a domain expert can identify the process and actor from the port name alone.
  2. Compare it with the domain’s language. If people talk about registration, approval, or confirmation, check whether a generic create or update operation hides that intent. If they genuinely talk about editing reference data, CRUD wording may be accurate.
  3. Inspect what the tests assert. Look for business outcomes and rules, not only database writes, reads, and field mappings.
  4. Locate technology-specific translation. Check whether HTTP, persistence, and consumer-specific formats are handled by adapters rather than leaking into the application interaction.
  5. Weigh the boundary’s cost. Keep the abstraction when it gives useful isolation or supports meaningful drivers; avoid adding layers that do not solve a real problem.

Why naming conventions matter for AI-assisted coding

Thonhauser argues that AI coding agents can reproduce the conventions already present in a repository. That makes established vocabulary consequential: if examples and interfaces consistently describe database operations, new code may follow that pattern; if they express the business interactions the team wants, those examples can guide future work. This is an architectural observation, not a quantified claim about agent accuracy or error rates.

Quick Recap

Bestseller No. 1
Wrap-It Storage - Cable Labels, Medium, Multi-Color (30-Pack) Write On Cord Tags for Wire Management and Identification
Wrap-It Storage - Cable Labels, Medium, Multi-Color (30-Pack) Write On Cord Tags for Wire Management and Identification
Tired of unplugging the wrong cord? We were! Avoid the frustration with Cable Labels; Easy to Write On: Surface is easy to write on with a pen
$14.99
SaleBestseller No. 5
Klein Tools 56250 Wire Marker Book for Cable Management, Electric Panel Organization Wire Label Stickers, Numbered 1-48
Klein Tools 56250 Wire Marker Book for Cable Management, Electric Panel Organization Wire Label Stickers, Numbered 1-48
More pages of the frequently used low numbers (1-24); Easily dress each side of the panel with separate pages of odd or even markers
$12.80
Best Value
Sale
Klein Tools 56250 Wire Marker Book for Cable Management, Electric Panel Organization Wire Label Stickers, Numbered 1-48
  • More pages of the frequently used low numbers (1-24)
  • Easily dress each side of the panel with separate pages of odd or even markers
  • Larger, easy-to-read print on 0.25-Inch x 1.5-Inch labels
  • Each page is perforated so that a third, two-thirds or entire the page can be easily detached
  • Label can be easily split for thin wire

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Domain-Driven Designhexagonal architectureports and adapterssoftware architecturetesting

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.