<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shandor Sharvari</title>
    <description>The latest articles on DEV Community by Shandor Sharvari (@shandor_sharvari).</description>
    <link>https://dev.to/shandor_sharvari</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1653325%2F2aa8e78a-c1bb-4028-ba9a-3aad1eb508ae.jpg</url>
      <title>DEV Community: Shandor Sharvari</title>
      <link>https://dev.to/shandor_sharvari</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shandor_sharvari"/>
    <language>en</language>
    <item>
      <title>API-Led Connectivity - Practical Questions Answered - Part III</title>
      <dc:creator>Shandor Sharvari</dc:creator>
      <pubDate>Tue, 04 Nov 2025 16:45:22 +0000</pubDate>
      <link>https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-iii-6dl</link>
      <guid>https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-iii-6dl</guid>
      <description>&lt;h1&gt;
  
  
  Part 3 - Implementation and Design Choices
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-35ik"&gt;Read Part 1 here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-ii-5f81"&gt;Read Part 2 here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;API-Led Connectivity is a proven architectural pattern for separating data, business logic, and representations across APIs. Numerous articles have been written about its advantages, but putting them into practice often raises many questions.&lt;br&gt;
We looked at the basics in &lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-35ik"&gt;Part 1&lt;/a&gt;. In &lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-ii-5f81"&gt;Part 2&lt;/a&gt;, we discussed some questions about the structure and composition of APIs.&lt;br&gt;
In Part 3, we'll tackle real-world questions, often about implementation and design choices.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Should a System API return a domain model or a one-to-one mapping of data from SoR?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Domain model is better, but mapping is fine in specific cases
&lt;/h3&gt;

&lt;p&gt;It's better to return a domain model because it makes things more abstract and stable. However, sometimes one-to-one mappings might be acceptable for internal or CRUD-based tasks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4q6mmht4zou2h5z45xvj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4q6mmht4zou2h5z45xvj.png" alt="A System API should return a domain model" width="450" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;System APIs work best when they expose a clean, stable domain model that abstracts the underlying System of Record. This approach has important architectural advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Abstraction and decoupling:&lt;/strong&gt; It protects consumers (like Process APIs) from backend volatility. For example, if a field in the SoR is renamed or its structure changes, your domain model stays the same and the API contract is safe.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clear semantics:&lt;/strong&gt; SoR schemas don't always show what the business wants, but they do show what is technically possible. A domain model helps show things like Customer, Order, or Invoice in ways that make sense for the business and are easier for other APIs to consume.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-system consistency:&lt;/strong&gt; When multiple SoRs model similar entities in different ways, System APIs can standardize and expose them in a single format, which makes integration easier and cleaner.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Direct SoR mapping is okay in some specific scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Admin or CRUD interfaces:&lt;/strong&gt; Tools that need full control over raw fields and behaviors may need structures that don't change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Legacy migration or pass-through access:&lt;/strong&gt; If the purpose of the System API is proxying and replicating old systems without data transformation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even in those cases, it's best to keep them separate and document trade-offs.Tight coupling can expose internal parts and make integrations less stable.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Should Process or Experience APIs use domain models from lower layers, or should they map them to their own internal service models or DTOs?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Better to map, but direct use is sometimes okay
&lt;/h3&gt;

&lt;p&gt;By default, mapping makes things clearer, separates concerns, and adds a layer of abstractions. Only use models again when they are stable, shared within the domain, and owned within the same boundary.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0n8o6mbfktqzjadx20gv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0n8o6mbfktqzjadx20gv.png" alt="APIs map external domain models to internal service models" width="450" height="782"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Think of each API layer as a &lt;strong&gt;boundary with its own language&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;System APIs are based on SoRs.&lt;/li&gt;
&lt;li&gt;Process APIs show how business logic and orchestration work.&lt;/li&gt;
&lt;li&gt;Experience APIs meet the needs of consumers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mapping between models at each layer helps preserve that separation of concerns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System API domain models: Use or Map in Process APIs?&lt;/strong&gt;&lt;br&gt;
It's best to map to internal models (DTOs).&lt;br&gt;
Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Decoupling:&lt;/strong&gt; System APIs expose data that can be reused, but Process APIs often need to change, add to, or combine that data for business logic. With mapping, you can change things without getting stuck with the way the System API is set up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resilience to change:&lt;/strong&gt; If the System API changes (for example, by adding fields or renaming attributes), the DTO layer protects your Process API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic clarity:&lt;/strong&gt; Process APIs use the language of business processes, not systems. Mapping helps show what you want to do.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Process API domain models: Use or Map in Experience APIs?&lt;/strong&gt;&lt;br&gt;
Again, mapping is better because Experience APIs should focus on consumer needs.&lt;br&gt;
Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tailored payloads:&lt;/strong&gt; Mobile apps, web portals, and partner systems often need formats or field names that are different from each other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance optimization:&lt;/strong&gt; You might want to remove unused fields, flatten nested structures, or make content more relevant to consumers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Channel independence:&lt;/strong&gt; If two Experience APIs (like mobile and web) use the same Process API, mapping lets each one develop independently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are occasions when it is acceptable - and even better - to reuse upstream models without mapping them to internal DTOs for the sake of simplicity, performance, or alignment.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read-Only, Pass-Through APIs:&lt;/strong&gt; If a Process or Experience API is acting as a transparent proxy, passing data without changing or adding to it, mapping may not be needed. For instance, a customer lookup API that gets basic profile information from CRM without any business logic in between.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stable, Shared Canonical Models:&lt;/strong&gt; When teams share a well-defined, versioned domain model (like a shared &lt;code&gt;CustomerDto&lt;/code&gt; or &lt;code&gt;OrderModel&lt;/code&gt;) with clear ownership and contract stability, it's okay to reuse it across layers. This happens a lot when there is a centralized modeling team or a mature domain design across services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal Tools or Trusted Consumers:&lt;/strong&gt; In APIs that are only for internal use (like dev dashboards and admin tools), where:

&lt;ul&gt;
&lt;li&gt;Change impact is minimal.&lt;/li&gt;
&lt;li&gt;Consumers understand the source model.&lt;/li&gt;
&lt;li&gt;A single team or a few small teams own all the layers and work together closely.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Pure Composition APIs:&lt;/strong&gt; Sometimes, a Process API just collects data from several System APIs without making any significant changes to them. If the source APIs already return domain-aligned shapes, reusing their models saves time.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Thin Experience APIs:&lt;/strong&gt; If an Experience API doesn't make many changes, like if it's just a pass-through layer for analytics dashboards, it might be fine to use the Process API model directly, especially if performance is important.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Mapping vs. Reuse Decision Matrix&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criteria&lt;/th&gt;
&lt;th&gt;Map Upstream Models When&lt;/th&gt;
&lt;th&gt;Reuse Upstream Models When&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Layer Separation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Moving from System APIs to Process APIs or from Process APIs to Experience APIs&lt;/td&gt;
&lt;td&gt;Models have the same concern or layer boundary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model Ownership&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Models are owned outside your context (e.g., SoR models)&lt;/td&gt;
&lt;td&gt;Models are owned and versioned within your bounded context&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Transformation Needed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Models require enrichment, filtering, or business-specific composition&lt;/td&gt;
&lt;td&gt;Models are already shaped for its use&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Consumer-Specific Shaping&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Models are tailored to channel needs (e.g., UX or mobile optimization)&lt;/td&gt;
&lt;td&gt;Consumer needs are similar&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Change Risk from Upstream&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Changes to the upstream schema are very likely to happen&lt;/td&gt;
&lt;td&gt;Stable contracts and predictable changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Governance and Contract Clarity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Each layer defines its own stable contract&lt;/td&gt;
&lt;td&gt;A single team manages both sides or internal use&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prototyping or Internal Use&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Structure should support long-term stability and reuse&lt;/td&gt;
&lt;td&gt;Fast-moving use cases where simplicity matters&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Layer Separation&lt;/strong&gt;&lt;br&gt;
- Map models for moving from System APIs to Process APIs or from Process APIs to Experience APIs.&lt;br&gt;
- Reuse models if they have the same concern or layer boundary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model Ownership&lt;/strong&gt;&lt;br&gt;
- Map models if they are owned outside your context (e.g. SoR models).&lt;br&gt;
- Reuse models if they are owned and versioned within your bounded context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transformation Needed&lt;/strong&gt;&lt;br&gt;
- Map models if they require enrichment, filtering, or business-specific composition.&lt;br&gt;
- Reuse models if they are already shaped for its use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consumer-Specific Shaping&lt;/strong&gt;&lt;br&gt;
- Map models if they are tailored to channel needs (e.g., UX or mobile optimization).&lt;br&gt;
- Reuse models if consumer needs are similar.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Change Risk from Upstream&lt;/strong&gt;&lt;br&gt;
- Map models if changes to the upstream schema are very likely to happen.&lt;br&gt;
- Reuse models if contracts are stable and changes are predictable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Governance and Contract Clarity&lt;/strong&gt;&lt;br&gt;
- Map models if each layer defines its own stable contract.&lt;br&gt;
- Reuse models if a single team manages both sides or internal use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prototyping or Internal Use&lt;/strong&gt;&lt;br&gt;
- Map models if the structure should support long-term stability and reuse.&lt;br&gt;
- Reuse models for fast-moving use cases where simplicity matters.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Which layer should enforce user permissions?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Experience API, though others can too
&lt;/h3&gt;

&lt;p&gt;The Experience API layer should mostly enforce user permissions because it is closest to the user and best suited for customizing access based on identity, role, and context.&lt;br&gt;
Depending on how complex and sensitive the logic and data being protected are, both Process and System APIs might include additional permission checks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feiyt96edyaa052vd5r9r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feiyt96edyaa052vd5r9r.png" alt="Each API enforces a different permission model" width="453" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Experience API:&lt;/strong&gt; Customizes access based on the user's role, identity, or channel:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applies coarse-grained access control (for example, can the user see a certain part?).&lt;/li&gt;
&lt;li&gt;Filters or masks fields (for example, hide private data from people who aren't admins).&lt;/li&gt;
&lt;li&gt;Uses Attribute-Based Access Control or Role-Based Access Control that works with UI logic.
Optimized for quick, user-centered decision-making.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Process API:&lt;/strong&gt; Controls who can use business logic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validates roles within workflows (for example, can the user approve big bills?).&lt;/li&gt;
&lt;li&gt;Coordinates policy engines and identity providers.&lt;/li&gt;
&lt;li&gt;Interprets user context and compares it to business rules.
Best for making access decisions based on the situation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;System API:&lt;/strong&gt; Protects the data boundary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enforces strict data access control, especially in sensitive SoRs like patient records or financial data.&lt;/li&gt;
&lt;li&gt;Acts as the last line of defense in case the checks higher up are bypassed.&lt;/li&gt;
&lt;li&gt;Integrates with Anti-Corruption Layers or backend-level security.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still, permission control and other security features should be made in a way that &lt;strong&gt;keeps APIs reusable&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Security and permission control should be layered and flexible so that protection is enforced without hardcoding behaviors that make it hard to use across channels, teams, or contexts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Design APIs to check claims, not callers:&lt;/strong&gt; Instead of tying logic to specific apps or users, use roles, scopes, or attributes passed in tokens so that any authorized user can interact with them in the right way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep authorization context external and declarative:&lt;/strong&gt; Access rules should be centralized in policy engines or gateways so that APIs can stay stateless and reusable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To support reuse without compromising security, consider the following design practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Token scopes or claims:&lt;/strong&gt; Design endpoints to check claims like &lt;code&gt;read:customer&lt;/code&gt; or &lt;code&gt;write:invoice&lt;/code&gt;, so that they can be used by multiple users but only by those with the right role.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Centralized identity provider:&lt;/strong&gt; Use a shared identity provider, such as Entra ID, Auth0, Azure AD B2C, etc., to make sure that token issuance is consistent and claims are consistent across layers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-tenant support:&lt;/strong&gt; Use &lt;code&gt;tenant_id&lt;/code&gt; or &lt;code&gt;caller_id&lt;/code&gt; in tokens to limit access to data safely between business units or domains.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API gateway abstraction:&lt;/strong&gt; Let the gateway apply high-level policies, while APIs apply more specific, claim-based rules when necessary.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In real life, &lt;strong&gt;System APIs are usually made to be agnostic&lt;/strong&gt;, flexible, and broadly reusable.&lt;br&gt;
Their core responsibility is to expose data from Systems of Record without putting in any business- or consumer-specific logic. This neutrality supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cross-domain reuse:&lt;/strong&gt; Different Process or Experience APIs can use them at the same time without any problems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decoupling from consumer context:&lt;/strong&gt; System APIs don't make any assumptions about who is calling or why they need the data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalable security patterns:&lt;/strong&gt; Access is typically controlled using scopes or claims, rather than hardcoded roles or caller IDs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, some domains require additional permission checks, especially where regulatory, privacy, or ethical constraints demand stricter controls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Healthcare:&lt;/strong&gt; Patient data often requires checks for contextual access, consent verification, and audit logging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finance:&lt;/strong&gt; Account visibility, transactional access, and reporting are tightly controlled based on legal roles and jurisdiction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Government or defense systems:&lt;/strong&gt; Data segmentation, classification, and operator clearance all affect how APIs are made available.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, yes, agnosticism is the default, but design must be able to handle sensitive data flows. The trick is to add enforcement (through claims, policy engines, or gateways) without hardcoding the logic into the API so that you can still use it in other places.&lt;/p&gt;

&lt;p&gt;Access checks may be minimal or not needed at all when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Serving data that is low-risk and read-only.&lt;/li&gt;
&lt;li&gt;The entire call chain is trusted and tightly controlled, and the - Experience API enforces all relevant permissions.&lt;/li&gt;
&lt;li&gt;The API is stateless and generic, and the caller is trusted to filter or restrict data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even then, always log, monitor, and document the rationale, because trust without visibility is a risky business.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Which layer is best for caching and retry policies?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  All layers, but for different purposes
&lt;/h3&gt;

&lt;p&gt;Caching and retry policies can technically be used at any layer, but their value and effectiveness depend on the layer's duties and nature.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxh8dyok36i93ecl1pjx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxh8dyok36i93ecl1pjx.png" alt="Caching and retry policies can be used at any layer but for different purposes" width="440" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Caching&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System API:&lt;/strong&gt; Cache responses from slow or read-heavy SoRs (like product catalogs and reference data).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process API:&lt;/strong&gt; Cache composed results if orchestration is expensive and data is stable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience API:&lt;/strong&gt; Cache UI-optimized payloads (like homepage data and dropdown lists) for better performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Retry Policies&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System API:&lt;/strong&gt; For temporary problems such as network glitches, timeouts from SoRs or 3rd-party systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process API:&lt;/strong&gt; For orchestrated calls to several systems, especially when one might fail from time to time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience API:&lt;/strong&gt; For critical operations, but only if the downstream system is idempotent and the user experience is clear to stop duplicate actions or inconsistent state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; You might want to think about applying retry and caching policies declaratively at the gateway level (like Azure API Management) to keep infrastructure logic out of your code and make centralized management easier.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Where is the best place to deal with pagination, filtering, and sorting?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  In the System API
&lt;/h3&gt;

&lt;p&gt;The System API is usually the right layer because it is closest to the data. This gives the best performance, especially when you query large datasets directly from Systems of Record that support efficient indexing and querying.&lt;/p&gt;

&lt;p&gt;However, there are scenarios in which it makes sense to use these operations in other layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Process API:&lt;/strong&gt; When you need to combine or aggregate data from several SoRs and no single system can do those tasks on its own. For instance, you could combine customer orders from CRM and ERP systems and then filter them to show only the most valuable ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience API:&lt;/strong&gt; Good for lightweight pagination or consumer-specific filtering when working with small datasets, cached payloads, or for making the UI look different for each user. For instance, filtering a short list of dropdown values or ordering columns in a table based on the user's preferences.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Which layer is suitable for experimentation, like A/B testing and feature flags?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  All layers, but for different purposes
&lt;/h3&gt;

&lt;p&gt;Though the types of experiments vary between Experience and Process APIs, they are typically conducted in both. Experimenting with System APIs is dangerous.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9q6alkkfmzriotrcu0cl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9q6alkkfmzriotrcu0cl.png" alt="Experimentation is possible at any layer, thought for different purposes - but it's risky at the System API layer" width="453" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Experience APIs are the right place for user-facing or consumer-specific experiments. Here are a few examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;UI or personalization experiments:&lt;/strong&gt; See what improves user satisfaction or interaction. For example, send different field names or formats to web and mobile apps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A/B Testing:&lt;/strong&gt; Measure conversion or engagement. For instance, use different algorithms for product recommendations depending on the user segment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature Flags and progressive exposure:&lt;/strong&gt; Introduce new capabilities gradually. Say, give 10% of users access to a new feature.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because Experience APIs are closest to the user and are made to modify outputs without changing core logic, this experimentation is safe.&lt;/p&gt;

&lt;p&gt;Process APIs can be used to experiment with features like business logic, orchestration paths, and data transformation behaviors that are not related to consumer-facing or UI logic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A/B Testing of business rules:&lt;/strong&gt; Compare the effect on conversion or revenue. For example, give 50% of users a 10% discount and give the remaining 50% a loyalty-based discount.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alternate orchestration paths:&lt;/strong&gt; Test reliability or performance of a new backend. Suppose you redirect certain requests from the legacy inventory system to the new one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retry or fallback strategy changes:&lt;/strong&gt; Evaluate which strategy results in higher uptime or fewer errors. As an example, use exponential backoff for some users and fixed retry for others.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caching Strategy Tests:&lt;/strong&gt; Optimize performance and reduce load on SoRs. Let's say you try different caching durations for the same operation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limiting or throttling logic:&lt;/strong&gt; Evaluate how well tiered performance limits work. As an example, impose more stringent rate limits on trial accounts while easing them for subscribers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Aggregation Variants:&lt;/strong&gt; Check to see if more data leads to better decisions. For instance, add more specific information, such as the average weekly purchase value, to summaries for specific users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Experimentation with the Process API should concentrate on how it is gathered, processed, and chosen, rather than how data is presented. This aligns well with the API-Led Connectivity pattern, keeping responsibilities clear and allowing experimentation without compromising modularity.&lt;/p&gt;

&lt;p&gt;System APIs should not be used for experimentation in most cases because they:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are designed to &lt;strong&gt;expose and standardize SoR interfaces.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Must be &lt;strong&gt;stable and predictable.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Serve as the &lt;strong&gt;foundation for upstream APIs.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Changing how a System API behaves or what data it returns could break Process or Experience APIs.&lt;/p&gt;

&lt;p&gt;However, as with any rule, there may be some exceptions, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Changes in provider or infrastructure behind the scenes:&lt;/strong&gt; Improve performance or reliability without changing the expectations of consumers. For example, testing a new database connector or query optimization as long as the contract remains the same.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following table might help to make the right decision:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;API Layer&lt;/th&gt;
&lt;th&gt;Experimentation Type&lt;/th&gt;
&lt;th&gt;Acceptable?&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Experience API&lt;/td&gt;
&lt;td&gt;A/B tests, user-specific formatting, feature flags&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Safely tailors outputs to consumers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Process API&lt;/td&gt;
&lt;td&gt;Business rule variation, routing logic, orchestration paths&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Enables testing logic without exposing complexity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;System API&lt;/td&gt;
&lt;td&gt;Interface experiments, changing contract or data shape&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Risky, may break upper layers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;System API&lt;/td&gt;
&lt;td&gt;Internal performance tweaks, like DB tuning&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;td&gt;Only if output/contract remains consistent&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Experience API&lt;/strong&gt;&lt;br&gt;
A/B tests, user-specific formatting, feature flags are ** acceptable**.&lt;br&gt;
An Experience API safely tailors outputs to consumers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Process API&lt;/strong&gt;&lt;br&gt;
Business rule variation, routing logic, orchestration paths are &lt;strong&gt;acceptable&lt;/strong&gt;.&lt;br&gt;
A Process API enables testing logic without exposing complexity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System API&lt;/strong&gt;&lt;br&gt;
 - Interface experiments, changing contract or data shape are &lt;strong&gt;not acceptable&lt;/strong&gt;, because they may break upper layers.&lt;br&gt;
 - Internal performance tweaks, like DB tuning &lt;strong&gt;may be acceptable&lt;/strong&gt;, but only if output/contract remains consistent.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. How to safely expose internal errors?
&lt;/h2&gt;

&lt;p&gt;You can do the following to avoid giving away sensitive backend information while still giving useful feedback at the Experience layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use a clear error schema&lt;/strong&gt;, like "E5001: Service unavailable," to map internal errors to standard codes and messages. This way, you can show what you mean without giving away too much information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep detailed logs private and share summaries publicly.&lt;/strong&gt; For example, keep long stack traces and technical context in internal logs or observability tools, and send only error information that is relevant to the user or upstream system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use error translation middleware:&lt;/strong&gt; Wrap backend responses so that system-specific types of failure (like database timeout) are turned into domain-aware messages (like "Product data not available").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add correlation IDs to responses:&lt;/strong&gt; Let Experience APIs expose identifiers that developers can use to trace issues without revealing internal architecture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't send exception types or technical identifiers to the consumer:&lt;/strong&gt; Messages like &lt;code&gt;NullPointerException&lt;/code&gt; or &lt;code&gt;SQLTimeout&lt;/code&gt; should stay behind the scenes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not only does this protect internal systems, but it also makes error handling more consistent and user-friendly across layers.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Why not provide the business logic in a package instead of creating a Process API? It could speed up response time and reduce latency.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Both approaches have their pros and cons
&lt;/h3&gt;

&lt;p&gt;The right choice depends on what your system needs: Do you need speed and simplicity, or flexibility and reuse?&lt;/p&gt;

&lt;p&gt;A package might be best if performance is the most important thing and your logic is fixed or very specific. A Process API is a better choice for the long term if your logic covers more than one service and changes over time.&lt;/p&gt;

&lt;p&gt;Putting business logic into libraries like NuGet, Maven, and NPM has a lot of benefits, especially for performance-critical apps. Here are some of the main benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance and low latency:&lt;/strong&gt; Package code runs right in the application's process, so there are no network or service overheads. It's perfect for logic that needs to respond right away, like rendering a user interface, checking input, or processing on the client side. For instance, a high-throughput trading platform embeds its risk-scoring logic in a package instead of exposing it through an API. This guarantees that transactions are completed in minimal time during peak loads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy testing and debugging:&lt;/strong&gt; Developers can write unit tests for packaged logic without having to mock network calls or infrastructure. Also, running things locally makes behavior more predictable and easier to follow during development.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Development simplicity:&lt;/strong&gt; There is no need to set up services or manage infrastructure. You can simply import the package and use the logic. It works best when development speed is more important than design. It's also very helpful for early-stage projects or MVPs. It's a quick way to add features to many services without having to build APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline capabilities:&lt;/strong&gt; Packages don't need to be connected to the network, so they're great for apps that work in low-bandwidth environments or offline modes. Think about mobile apps for field service that need to work in places with no internet access.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strong encapsulation:&lt;/strong&gt; Packaged logic can enforce strict modular boundaries, such as strong typing and self-contained units. It makes things clearer, easier to document, and simpler to move between projects. You can provide your functionalities to desktop apps, microservices, or CLI tools - all from the same codebase.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, using packages might also cause duplication and limit visibility across systems.&lt;br&gt;
Here is how Process APIs address the drawbacks of packaged logic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Centralized control:&lt;/strong&gt; When logic is spread out through libraries, each consumer has to take care of their own copy. You have to recompile and redeploy every app to update business rules. A Process API makes orchestration more centralized, so updates happen right away and are the same for all consumers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal bug fixes:&lt;/strong&gt; When an issue or bug is found in the system, it can be resolved within the API. The consumers don't need to be redeployed or recompiled. In contrast, packaged logic requires coordination with the teams that own the consumer code, as any bug fix involves updating the package, changing the consumer code, and redeploying it. Upstream consumers may also need to be updated as a result, which could have a cascading effect that increases deployment effort and complexity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtime governance and monitoring:&lt;/strong&gt; Process APIs live at the service boundary, so you can use policies like rate limiting, quotas, logging, and auditing. Local packages run in the app, which is great for speed but not for operations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster innovation:&lt;/strong&gt; With a Process API, you can implement experimentation like A/B testing on the business logic level. Packages need coordinated deployments, which slows down experimentation and responsiveness.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tradeoff Summary&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Pros&lt;/th&gt;
&lt;th&gt;Cons&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Packages&lt;/td&gt;
&lt;td&gt;Fast, low-latency, easy unit testing&lt;/td&gt;
&lt;td&gt;Hard to manage changes, no runtime control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Process API&lt;/td&gt;
&lt;td&gt;Centralized, governed, dynamic orchestration&lt;/td&gt;
&lt;td&gt;Higher latency, network overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Packages&lt;/strong&gt;&lt;br&gt;
 - &lt;strong&gt;Pros:&lt;/strong&gt; Fast, low-latency, easy unit testing.&lt;br&gt;
 - &lt;strong&gt;Cons:&lt;/strong&gt; Hard to manage changes, no runtime control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Process API&lt;/strong&gt;&lt;br&gt;
 - &lt;strong&gt;Pros:&lt;/strong&gt; Centralized, governed, dynamic orchestration.&lt;br&gt;
 - &lt;strong&gt;Cons:&lt;/strong&gt; Higher latency, network overhead.&lt;/p&gt;




&lt;p&gt;This article is also available on &lt;a href="https://www.linkedin.com/pulse/api-led-connectivity-practical-questions-answered-part-sharvari-tijif" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://shandor-sharvari.medium.com/api-led-connectivity-practical-questions-answered-part-iii-3af40a610f1f" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>api</category>
      <category>designpatterns</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>API-Led Connectivity - Practical Questions Answered - Part II</title>
      <dc:creator>Shandor Sharvari</dc:creator>
      <pubDate>Thu, 23 Oct 2025 19:14:40 +0000</pubDate>
      <link>https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-ii-5f81</link>
      <guid>https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-ii-5f81</guid>
      <description>&lt;h1&gt;
  
  
  Part 2 - Structure and Composition
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-35ik"&gt;Read Part 1 here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-iii-6dl"&gt;Read Part 3 here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;API-Led Connectivity is a proven architectural pattern for separating data, business logic, and representations across APIs. Numerous articles have been written about its advantages, but putting them into practice often raises many questions.&lt;/p&gt;

&lt;p&gt;We looked at the basics in &lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-35ik"&gt;Part 1&lt;/a&gt;.&lt;br&gt;
Now, in Part 2, we'll dive into the questions that teams have to deal with when they start bringing this pattern to life.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Should a System API only connect to one SoR?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Yes
&lt;/h3&gt;

&lt;p&gt;A System API should only connect to one System of Record.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqovz3w43xxicowddxaqv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqovz3w43xxicowddxaqv.png" alt="A System API should only connect to one System of Record" width="663" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A System API is meant to be a clean layer of abstraction over a single data source. This one-to-one relationship makes your architecture clearer and more flexible:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Focus and simplicity:&lt;/strong&gt; the API clearly shows a single source, which makes it easier to understand where data comes from and how it is structured.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reusability and stability:&lt;/strong&gt; APIs that are linked to one SoR are easier to version, reuse, and change on their own as systems change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fault isolation&lt;/strong&gt;: If the SoR has issues, they affect only its API layer, which helps preserve the rest of the system from failures and makes debugging easier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplified governance:&lt;/strong&gt; it's easier to enforce security policies and access rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This tight coupling keeps the System API remain predictable and stops it from becoming a hidden orchestration layer. The Process API is better for that purpose.&lt;/p&gt;

&lt;p&gt;But there are some &lt;strong&gt;exceptions&lt;/strong&gt;.&lt;br&gt;
A System API may need to temporarily wrap multiple sources in some cases, such as when working with legacy systems or during a transition. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bringing together several similar legacy databases to provide unified models for new systems.&lt;/li&gt;
&lt;li&gt;Connecting different parts of a fragmented ERP system.&lt;/li&gt;
&lt;li&gt;Serving read-only views from different sources with as little logic as possible.
If you do break the one-SoR rule, it's important to clearly &lt;em&gt;document the trade-offs&lt;/em&gt; and think about moving those concerns to a Process API later.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Can a Process API connect to a SoR directly without a System API?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  No
&lt;/h3&gt;

&lt;p&gt;It &lt;strong&gt;breaks the architectural separation of concerns&lt;/strong&gt; that API-Led Connectivity is built on, which is to keep different parts of the architecture separate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxypaur60pjxpff6ehtcd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxypaur60pjxpff6ehtcd.png" alt="A Process API shouldn't connect to a SoR directly" width="469" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s why it’s generally discouraged:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tight coupling to core systems:&lt;/strong&gt; Process APIs shouldn't have code that gets data from core systems. Direct connections tie them to system-specific implementations, which makes them harder to maintain and change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loss of reusability:&lt;/strong&gt; Consumers can't use a consistent access layer without a System API in the middle. Every Process API may end up duplicating integration logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weakened security and governance:&lt;/strong&gt; When every Process API talks to the SoR on its own, it's harder to enforce centralized policies like logging, authentication, or rate limiting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are scenarios where it might be acceptable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rapid prototyping:&lt;/strong&gt; Work needs to be done quickly, and architectural integrity is not important.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimal or isolated systems:&lt;/strong&gt; A small database used only by a single process might not need to be fully separated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Legacy transitioning:&lt;/strong&gt; In older systems, Process APIs may temporarily access SoRs until System APIs are in place.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even then, it's best to think of it as a &lt;strong&gt;temporary solution&lt;/strong&gt; until the system can handle proper abstraction.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Can one System API call another System API?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  No
&lt;/h3&gt;

&lt;p&gt;A System API should not call another System API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgiru7azdjxavrwlnpqdw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgiru7azdjxavrwlnpqdw.png" alt="A System API shouldn't call another System API" width="435" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The goal of System APIs is to be direct abstractions of certain Systems of Record that are clean, focused, and independent. When one System API calls another, it adds layers of dependencies and coupling and breaks down boundaries.&lt;/p&gt;

&lt;p&gt;Here’s why it’s usually avoided:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tight coupling:&lt;/strong&gt; Each System API should be able to be maintained and tested on its own. When System APIs depend on each other, it can make integration patterns weak.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Violation of architectural boundaries:&lt;/strong&gt; System APIs are like contracts at the system level. When you link them together, they become orchestration, which is better suited to a Process API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance and reliability risks:&lt;/strong&gt; Every new dependency increases latency and adds potential failure points, which makes monitoring and troubleshooting harder.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s when it might be justifiable &lt;strong&gt;only as an exception&lt;/strong&gt;.This is generally not recommended unless there is a strong architectural reason for it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reuse of encapsulated logic:&lt;/strong&gt; If a System API wraps up complicated access or transformation logic that is already encapsulated in another System API and is hard to copy, it might be smart to reuse it again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Facade patterns:&lt;/strong&gt; When modernizing a system, a new System API might wrap a legacy one to provide a clean interface without changing the way the system works inside.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tightly coupled SoRs:&lt;/strong&gt; Some systems, like ERP and payroll, are so dependent on each other that it might not make sense to show them separately.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you decide to call another System API from your own, be careful of cascading failures. Also, think about whether a Process API might give you better separation and control.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Can a System API call other third-party or homegrown APIs?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Yes
&lt;/h3&gt;

&lt;p&gt;A System API can call third-party or homegrown APIs, but only if those APIs accurately represent or add to the &lt;strong&gt;System of Record&lt;/strong&gt;. Otherwise, it runs the risk of overstepping its bounds.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8r3suay5u8pywtid8w2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8r3suay5u8pywtid8w2.png" alt="A System API can call 3rd-party APIs which represent a System of Record" width="450" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The goal of System APIs is to make it easy to access data and functionality from a single System of Record through clean, reusable interfaces. Sometimes, this source is an external API, like Salesforce, Stripe, or a proprietary inventory system, which is the SoR. In those situations, the System API acts as a wrapper or adapter that standardizes access.&lt;/p&gt;

&lt;p&gt;Some other acceptable situations are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Acting as a gateway or compatibility layer for &lt;strong&gt;legacy or complicated external systems.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enhancing core data by calling &lt;strong&gt;external enrichment services&lt;/strong&gt; like geolocation, fraud detection, or validation APIs.&lt;/li&gt;
&lt;li&gt;Providing &lt;strong&gt;interoperability&lt;/strong&gt; when internal systems depend on external modules as part of their basic functionality.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Things to keep in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Avoid scope creep:&lt;/strong&gt; If you're combining different services or adding logic that doesn't belong together, you're probably getting into Process API territory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch for instability or latency:&lt;/strong&gt; External APIs can cause problems like rate limits, downtime, or long response times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mind security and governance:&lt;/strong&gt; Make sure you have the right authentication, follow the rules for handling data, and have clear monitoring when connecting to third-party systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short, it's all about what you want to do. If the external API &lt;strong&gt;acts as the SoR or directly supports its role&lt;/strong&gt;, it makes sense to wrap it in a System API. If not, you might want to use a Process API to handle the interaction instead.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Can a Process API call another Process API?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Yes
&lt;/h3&gt;

&lt;p&gt;A Process API can call another Process API, especially when it makes sense to reuse orchestration logic. But beware of overuse, as it could make things more complicated or slow down performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6mtw605z4qqy0bslyfd8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6mtw605z4qqy0bslyfd8.png" alt="A Process API call another Process API" width="435" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Process APIs are meant to wrap up business logic and connect actions or data from different System APIs. However, calling other Process APIs makes sense in scenarios like these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reusing orchestration:&lt;/strong&gt; If you've already made complicated flows in a Process API, reusing them keeps the tested logic and avoids duplication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composable services:&lt;/strong&gt; Building modular, layered processes aligns with good microservices-style architecture. In bigger workflows, smaller Process APIs can be used over and over again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain separation:&lt;/strong&gt; When different business domains are kept in separate Process APIs, they may need to call each other to work together.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Things to keep an eye on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tight coupling:&lt;/strong&gt; Too many chains can make dependencies hard to see and integrations weak. Each Process API should be able to be deployed and tested on its own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency and overhead:&lt;/strong&gt; Every chained call adds processing time, which raises the risk of timeouts or slower performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited traceability:&lt;/strong&gt; It can be hard to debug failures across interdependent Process APIs when there isn't centralized logging or tracing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you do call another Process API, just keep in mind that it can complicate the system and affect performance. Keep it short and purposeful.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Can an Experience API call System APIs directly without a Process API?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Yes
&lt;/h3&gt;

&lt;p&gt;An Experience API can call System APIs directly without a Process API if the logic is simple.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faa0s3m8w7arsl6l9fay0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faa0s3m8w7arsl6l9fay0.png" alt="An Experience API call System APIs directly" width="450" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Experience APIs work on the presentation layer, changing data and interactions for end-user applications. When the goal is simple transformation or aggregation that doesn't need business orchestration, they can connect directly to System APIs.&lt;/p&gt;

&lt;p&gt;When should you make direct calls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simple data aggregation:&lt;/strong&gt; The Experience API just gets data from a few places, formats it, and sends it on without any business logic or orchestration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Presentation-level formatting:&lt;/strong&gt; Formatting numbers, dates, or currencies so they show up correctly in a specific location.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency-sensitive endpoints:&lt;/strong&gt; Removing the middle layer can speed up response times for apps that need to be fast.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No shared logic:&lt;/strong&gt; If the data handling isn't used in more than one channel, it's fine to put it in the Experience API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But there are some risks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Drift into orchestration:&lt;/strong&gt; When your Experience API starts applying rules or coordinating flows, it stops being just a presentation tool. This should be implemented in the Process API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duplication across apps:&lt;/strong&gt; If you need the same orchestration for mobile, web, and partner portals, you'll end up duplicating logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tight backend coupling:&lt;/strong&gt; Experience APIs that rely heavily on the structure of System APIs may crash or require updates when those backends change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Direct calls can work in situations where the UI is clean and specific. But adding a Process API keeps your layers clean and ready for the future when it comes to business rules, orchestration, or shared workflows.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Can a consumer app use a System or Process API directly without an Experience API?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  No
&lt;/h3&gt;

&lt;p&gt;It &lt;strong&gt;breaks the principles of API-Led Connectivity&lt;/strong&gt; and creates long-term risks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fza4mezwlqaq70z9emysj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fza4mezwlqaq70z9emysj.png" alt="Consumer apps shouldn't call System and Process APIs directly" width="469" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;API-Led Connectivity separates responsibilities across layers to maintain modularity and maintainability. Experience API decouples consumers from the business logic. Although skipping the Experience API layer may seem easier, doing so will lead to numerous long-term issues.&lt;/p&gt;

&lt;p&gt;Here’s why it’s generally avoided:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tight coupling to backend logic:&lt;/strong&gt; When a System or Process API is called directly, the system becomes tied to how the backend works. If you change the structure or orchestration, the consumer app or frontend could break and might need to be rewritten.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tight coupling to the consumers:&lt;/strong&gt; On the other hand, skipping the Experience API makes the system tightly coupled to the consumers. The business logic must be updated every time any existing consumer is changed or a new one is added to the system. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UX optimization limitations:&lt;/strong&gt; Lower-level APIs aren't designed for user experiences. They often send back raw, large data that isn't good for mobile, web, or partner channels. Experience APIs let you format responses for each consumer individually.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security gaps and blurred responsibilities:&lt;/strong&gt; Providing consumers with direct access to System and Process APIs makes the entire system vulnerable. Security measures must be put inside those APIs to prevent that. It breaks the single responsibility principle, and the system becomes more akin to a monolith. Experience APIs act as a buffer that enforces authorization logic, permission checks, and access policies, which may be general or customized for a particular consumer.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  8. Can an Experience API be reused between multiple consumers?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Yes, in specific cases
&lt;/h3&gt;

&lt;p&gt;An Experience API can be used by more than one consumer, but only if their needs are the same and the API stays focused.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F962y40tjpnblzox8wrg8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F962y40tjpnblzox8wrg8.png" alt="Multiple consumers can call the same Experience API in specific cases" width="389" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Experience APIs are designed to provide customized and formatted data to specific consumers. In some cases, reusing one It can be beneficial to reuse the same Experience API between consumers, like mobile apps on different platforms, &lt;strong&gt;if their data and behavior needs are similar&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When it is useful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shared data functionality across platforms.&lt;/li&gt;
&lt;li&gt;Response formats that work for both consumers.&lt;/li&gt;
&lt;li&gt;Endpoints are compatible with all consumers.&lt;/li&gt;
&lt;li&gt;No endpoints are designed specifically for one consumer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When to be careful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input/output divergence&lt;/strong&gt;: When the API has to handle requests and responses in different formats, it has to use conditional logic, which makes it more complicated and harder to maintain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Risk of bloating:&lt;/strong&gt; Trying to serve all customers from one API can make it too complicated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fragility:&lt;/strong&gt; Changes or improvements to one platform may break another.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short, reuse works when consumer expectations are the same. If they don't match, it's best to separate the Experience APIs so that each one stays optimized and easy to maintain.&lt;/p&gt;




&lt;p&gt;In &lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-iii-6dl"&gt;Part 3&lt;/a&gt;, we’ll continue answering real-world questions often asked by teams when they start using API-Led Connectivity.&lt;/p&gt;




&lt;p&gt;This article is also available on &lt;a href="https://www.linkedin.com/pulse/api-led-connectivity-practical-questions-answered-partii-sharvari-lpckf" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://shandor-sharvari.medium.com/api-led-connectivity-practical-questions-answered-part-ii-96a5dabbe2c1" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>api</category>
      <category>designpatterns</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>API-Led Connectivity - Practical Questions Answered</title>
      <dc:creator>Shandor Sharvari</dc:creator>
      <pubDate>Thu, 09 Oct 2025 14:10:23 +0000</pubDate>
      <link>https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-35ik</link>
      <guid>https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-35ik</guid>
      <description>&lt;h1&gt;
  
  
  Part 1 - From Concepts to Foundations
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-ii-5f81"&gt;Read Part 2 here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-iii-6dl"&gt;Read Part 3 here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;API-Led Connectivity&lt;/strong&gt; is a simple but powerful way to build things. This architectural pattern defines a layered structure with clear responsibilities for each layer and well-defined connections between them. There are three types of APIs — &lt;strong&gt;System&lt;/strong&gt;, &lt;strong&gt;Process&lt;/strong&gt;, and &lt;strong&gt;Experience&lt;/strong&gt; — which handle data, business logic, and representation, respectively. The pattern also defines the order and flow of API calls. Not only does it help you separate data, representation, and business logic at the solution level, but it also enables you to reuse APIs in various ways across different systems and scenarios.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fflbmyrjgrguae61p9irp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fflbmyrjgrguae61p9irp.png" alt="API-Led Connectivity" width="362" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many articles and blogs discuss the benefits of this popular pattern. But the real challenge begins when you start implementing it. This article is inspired by the fact that teams tend to ask the same questions again and again when they begin development.&lt;/p&gt;

&lt;p&gt;When providing answers, it’s critical to consider that every decision involves trade-offs between business needs, technological capabilities, budget, and delivery time. Each design principle and pattern comes with strengths and limitations. The real challenge is determining whether the chosen solution resolves more issues than it creates. So, while a certain approach might seem like the obvious choice at first glance, there are always exceptions — scenarios where its principles may need to be bent, or even broken.&lt;/p&gt;

&lt;p&gt;The article examines API-Led Connectivity from that perspective, aiming to answer common practical questions.&lt;/p&gt;

&lt;p&gt;It turns out there’s more to unpack than expected, so let’s split it up into parts.&lt;br&gt;
In &lt;strong&gt;Part 1&lt;/strong&gt;, we’ll talk about the basics of API-Led Connectivity and look at when and where it makes sense to use it, taking into account its advantages and drawbacks.&lt;br&gt;
In &lt;strong&gt;&lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-ii-5f81"&gt;Part 2&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-iii-6dl"&gt;Part 3&lt;/a&gt;&lt;/strong&gt;, we’ll cover the questions that teams often ask when they start using API-Led Connectivity.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why Do We Need Yet Another Pattern?
&lt;/h2&gt;

&lt;p&gt;​​This question is often asked even before the definition of the pattern is given. So, let's start by answering it first, and then provide a detailed explanation afterward.&lt;/p&gt;

&lt;p&gt;API-Led Connectivity makes it easy to create modular APIs. The best part is that you can connect these APIs in many different ways to work with a lot of different systems, and you don't have to rewrite any code to do it. This pattern solves some common problems in system design and development by putting APIs into reusable parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reusability&lt;/strong&gt;: Modular APIs can be recombined across different projects and avoid doing the same work twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clear separation of concerns&lt;/strong&gt;: By splitting data access, business logic, and representation into separate layers, the structure is cleaner.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loose Coupling&lt;/strong&gt;: By aligning APIs with specific roles and communication boundaries, inter-service dependencies are kept to a minimum. This lets each component change and scale independently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Abstracted business logic&lt;/strong&gt;: Business logic doesn’t depend on the data structure or consumers. It allows for the development of clean, focused and reusable algorithms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Role-based system design&lt;/strong&gt;: APIs are structured based on what they do, which makes systems modular, easy to understand and maintain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: Individual components can scale independently without affecting the whole system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster development&lt;/strong&gt;: Teams can deliver faster because they don't have to start from scratch with reusable APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel teamwork&lt;/strong&gt;: Different teams can work on different parts of the system at the same time, which speeds up delivery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplified maintenance&lt;/strong&gt;: A clean structure means fewer bugs and smoother updates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost-efficiency&lt;/strong&gt;: Less duplicated effort means lower development costs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Therefore, if you want to create systems that are fast to develop, easy to scale and maintain, API-Led Connectivity might be helpful for you.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. How Does API-Led Connectivity Work?
&lt;/h2&gt;

&lt;p&gt;API-Led Connectivity introduces a layered approach with three types of APIs, each with a different purpose and clear connections between them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System API&lt;/strong&gt; hides the specific technology and structure of a data source from the rest of the system. It presents data as reusable models. The data source, usually called &lt;em&gt;System of Record (SoR)&lt;/em&gt;, is typically a database, but it can also be a third-party enterprise platform or another system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process API&lt;/strong&gt; wraps up essential business logic. It is decoupled from both data sources and consumers. Instead, it relies on models that are shared across API layers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience API&lt;/strong&gt; combines and formats these models into representations that meet the needs of a specific consumer, typically a user interface such as web pages or mobile applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;System and Process APIs&lt;/strong&gt; are usually created for internal use and are meant to be reused. They stay hidden from external systems and focus on modularity.&lt;br&gt;
Experience APIs, on the other hand, are designed for UI or integration with third-party systems. They adapt representations to fit the needs of each consumer. Experience APIs can be public and accessible from the internet.&lt;/p&gt;

&lt;p&gt;The API flow usually goes like this:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Consumer ➜ Experience API ➜ Process API ➜ System API ➜ System of Record&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But the Process API can be skipped if all you need to do is combine and map data, which means you don't need business logic:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Consumer ➜ Experience API ➜ System API ➜ System of Record&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;API-Led Connectivity outlines some important relationships and design principles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each &lt;strong&gt;System API&lt;/strong&gt; connects with just a single data source. But several System APIs may link up with the same source.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process APIs&lt;/strong&gt; can call multiple System APIs and even other Process APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience APIs&lt;/strong&gt; usually call Process APIs, but they can also call System APIs directly. But, they shouldn’t call other Experience APIs. Most of the time, each Experience API is designed for a certain consumer. But sometimes one API can work with more than one app. For example, both iOS and Android mobile apps can use a unified representation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pattern’s structure is usually shown in a simple way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64sl3yfeyryza51d0a8s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64sl3yfeyryza51d0a8s.png" alt="API-Led Connectivity" width="205" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can think of API-Led Connectivity as similar to the MVC pattern, but applied at the solution level:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System APIs&lt;/strong&gt; work similarly to &lt;em&gt;Models&lt;/em&gt;. They handle the raw data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process APIs&lt;/strong&gt; serve as &lt;em&gt;Controllers&lt;/em&gt;. They are where all the business logic takes place. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience APIs&lt;/strong&gt; are like &lt;em&gt;Views&lt;/em&gt;. They shape and present that data in a way that is applicable to the consumer.
This handy comparison makes it clear what each API layer does.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But in real life, things can get more complicated. Data often comes from more than one System API, and the business logic may cover several Process APIs. It’s common to see multiple consumers, each one served by its own Experience API. That’s why, even though it looks simple at first glance, real-world applications can get very complicated. Data is dispersed across several SoRs, each served by its own System APIs. Process APIs usually call multiple System APIs and sometimes other Process APIs. Various consumers, such as web and mobile apps, require more than one Experience API, which represents data coming from a number of Process APIs and, in some cases, directly from System APIs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvbmqva78rli9427o6k8k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvbmqva78rli9427o6k8k.png" alt="API-Led Connectivity - Practical Model" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s why API-Led Connectivity pairs well with Domain-Driven Development. Each API is implemented within a bounded context, and data is sent between them using domain models.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Example: An Online Retail System
&lt;/h2&gt;

&lt;p&gt;Think about a large online shopping site that offers a broad range of features for both customers and sellers, such as product catalog and comparison, wish lists, full-cycle order processing, marketing campaigns, inventory and customer management, and so on. Like any modern online store, it’s represented not only by a website but also by mobile apps for all popular platforms. Under the hood, the data is spread across multiple SoRs, including databases, CRM, ERP, and others.&lt;/p&gt;

&lt;p&gt;API-Led Connectivity aligns well with large, multifunctional systems like this, providing a scalable and modular solution with reusable components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Many System APIs, each communicating with a single SoR, such as product catalog, inventory, user data, and so on.&lt;/li&gt;
&lt;li&gt;Several System APIs connect to the same multipurpose SoR, like CRM and ERP, separating their data in a more granular way providing better reusability and scalability.&lt;/li&gt;
&lt;li&gt;Process APIs aggregate and process data from multiple System APIs.&lt;/li&gt;
&lt;li&gt;Different Process APIs can use the same System API, leveraging its data in different contexts. For example, pricing data is needed for both the Product Catalog and Orders Processing.&lt;/li&gt;
&lt;li&gt;Some Process APIs call other Process APIs - sometimes without retrieving data from System APIs - allowing for more complicated business logic.&lt;/li&gt;
&lt;li&gt;Experience APIs serve both web and mobile platforms. The web app has its own dedicated Experience API, while both iOS and Android apps share one to ensure a similar user experience on both platforms.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjcr6wzkwznooapvxw3w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjcr6wzkwznooapvxw3w.png" alt="API-Led Connectivity - Example of an Online Retail System" width="800" height="703"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This example demonstrates how API-Led Connectivity makes it possible to build a solution in which components are widely reused, reducing development time, simplifying the maintenance of each one, while also allowing each component to be scaled independently of the others.&lt;br&gt;
For instance, the Pricing System API is used by both the Order Processing and Product Catalog Process APIs, and the Product Catalog Process API is called not only by both Experience APIs, but also by the Product Comparison and Marketing Process APIs.&lt;br&gt;
Speaking of scalability, during Black Friday season, components like Product Catalog, Order Processing, Cart, Wishlists, Inventory, and others must be upscaled, while Articles, Marketing, and Suppliers can remain at their usual level.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. When Should We Use API-Led Connectivity?
&lt;/h2&gt;

&lt;p&gt;API-Led Connectivity is good for systems that require clean architecture and clear communication patterns due to their complexity and scale. Here are some suitable scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Complex systems with many APIs or microservices&lt;/strong&gt;, such as large enterprise projects with intricate interaction flows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration of multiple data sources or third-party systems&lt;/strong&gt; to make a consistent and structured format.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Platforms or ecosystems that offer a wide range of services&lt;/strong&gt;, such as cloud providers or enterprise systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Need for independent scaling of each part of the system&lt;/strong&gt; to get the best performance and lowest cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Development is spread out over several teams&lt;/strong&gt;, so it needs to be modular and have clear boundaries so that they can work on it at the same time.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. When Might API-Led Connectivity Not Be Worth It?
&lt;/h2&gt;

&lt;p&gt;API-Led Connectivity has a lot of benefits,  but it also has some drawbacks, most of which are due to its layered nature:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Layered overhead&lt;/strong&gt;: Each new layer adds more components that need to be designed, deployed, and maintained. That can slow things down and give development and operations teams more work, especially at first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency stack-up&lt;/strong&gt;: Every layer adds another step to the data flow. If not carefully optimized, this can slow down response times and decrease performance, especially for high-throughput or real-time services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Propagation of changes&lt;/strong&gt;: Some updates, like adding new features to a product, may require changes or retesting at multiple levels, which can make rollouts and versioning more difficult.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-layer coordination&lt;/strong&gt;: Teams need to work together closely across API layers to make sure everything stays in sync. Without clear boundaries and ownership, you could run into problems like bottlenecks or inconsistent implementations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debugging complexity across layers&lt;/strong&gt;: It is harder to fix problems when they span many layers. To find a bug, developers might have to follow the whole chain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redundant logic risks&lt;/strong&gt;: If the lower layers aren’t well-defined, higher layers might reimplement similar business logic again, which goes against the goal of abstraction and reuse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Costly setup and planning&lt;/strong&gt;: Making modular and reusable APIs takes time and effort up front. If you're in a hurry to deliver something, this structured approach can feel like extra work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Harder onboarding for new teams&lt;/strong&gt;: It takes time to understand how all the layers fit together. Without solid documentation and guidance, new teams might have difficulty learning the whole flow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Considering that, the pattern might not be the best option in every case. Here are some situations where the pattern might seem like overkill:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small and simple projects&lt;/strong&gt;: A lightweight architecture is faster to build and easier to manage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Short-lived projects or MVPs&lt;/strong&gt;: When delivery speed is more important than scalability or modularity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single or small teams&lt;/strong&gt;: Designing and keeping up with multiple API layers might slow things down instead of speeding them up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance-critical systems&lt;/strong&gt;: When getting ultra-low latency is essential, since every API layer adds HTTP overhead.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. How to Select the Right Type of API?
&lt;/h2&gt;

&lt;p&gt;You can think of each type of API as an answer to a simple question:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System API&lt;/strong&gt;: What kind of data are we dealing with?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process API&lt;/strong&gt;: How do we handle that data?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience API&lt;/strong&gt;: Who is the data meant for?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's a decision map that could come in handy:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Use This API Type&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Do you need to access or abstract a data source, like a database, ERP, or CRM?&lt;/td&gt;
&lt;td&gt;System API&lt;/td&gt;
&lt;td&gt;It encapsulates and projects the SoR, providing stable and reusable access.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Is the data source external or legacy that needs to be translated into a specific domain?&lt;/td&gt;
&lt;td&gt;System API&lt;/td&gt;
&lt;td&gt;It protects the domain model by acting as an Anti-Corruption Layer (ACL).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Are you applying business rules or orchestrating logic across multiple systems?&lt;/td&gt;
&lt;td&gt;Process API&lt;/td&gt;
&lt;td&gt;It combines data, applies logic, and coordinates workflows.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can the logic be reused across multiple channels or consumers?&lt;/td&gt;
&lt;td&gt;Process API&lt;/td&gt;
&lt;td&gt;It centralizes orchestration for consistency and reuse.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Are you customizing data for a certain frontend, channel, or consumer?&lt;/td&gt;
&lt;td&gt;Experience API&lt;/td&gt;
&lt;td&gt;It shapes payloads for UX needs, which separates the frontend from the backend logic.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Is the consumer a website, a mobile app, or a partner system?&lt;/td&gt;
&lt;td&gt;Experience API&lt;/td&gt;
&lt;td&gt;It optimizes for performance, payload size, and the needs of each channel.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  7. How to Write Composable and Reusable APIs?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Focus on capabilities, not endpoints
&lt;/h3&gt;

&lt;p&gt;Instead of asking, &lt;em&gt;"What API do I need?"&lt;/em&gt;, you might want to ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;What can this domain do?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;What building blocks can be reused?&lt;/em&gt;
This shifts the discussion from &lt;em&gt;“what to create”&lt;/em&gt; to &lt;em&gt;“how to put it all together”&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Approach APIs as modular and discoverable units
&lt;/h3&gt;

&lt;p&gt;Every API, whether it's a System, Process, or Experience API, should be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Focused&lt;/strong&gt;: Have a single responsibility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discoverable&lt;/strong&gt;: Listed in a developer portal or catalog.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composable&lt;/strong&gt;: Designed to be orchestrated, not just consumed.
This makes APIs feel more like building blocks rather than monoliths.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Rewire, don’t rebuild
&lt;/h3&gt;

&lt;p&gt;When you need a new feature, consider alternative options before creating a new API:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Search for existing APIs&lt;/strong&gt; that provide the data or functionality you need.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put them together&lt;/strong&gt; using Process APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expose them&lt;/strong&gt; via Experience APIs.
This approach speeds up delivery and cuts down on duplication.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Use ALC layers to enforce separation of concerns
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System APIs&lt;/strong&gt; are adapters to SoRs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process APIs&lt;/strong&gt; are orchestrators of business logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience APIs&lt;/strong&gt; are tailored views for consumers.
Connecting these layers together, you can build flexible and composable systems that are easier to develop and maintain.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can go back to the analogy that compares API-Led Connectivity to the MVC pattern. It’s a helpful way to understand how different API layers share their duties.&lt;/p&gt;

&lt;h3&gt;
  
  
  System API ≈ Model
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Like the &lt;em&gt;Model&lt;/em&gt; in MVC encapsulates data and business entities, the System API abstracts access to data sources like databases, ERPs, CRMs, etc.&lt;/li&gt;
&lt;li&gt;It hides complexity and reveals clean, reusable interfaces for the rest of the architecture.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Process API ≈ Controller
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;Controller&lt;/em&gt; in MVC handles orchestration, input processing, and coordination between the View and Model.&lt;/li&gt;
&lt;li&gt;Similarly, the Process API orchestrates logic, combines data from multiple System APIs, and puts business rules into action.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Experience API ≈ View
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;View&lt;/em&gt; presents data in a way that is best for the user or channel.&lt;/li&gt;
&lt;li&gt;The Experience API works similarly, tailoring and customizing data for certain consumers such as mobile apps, web portals, or partners.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why This Analogy Works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It reinforces &lt;strong&gt;separation of concerns&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It helps to understand &lt;strong&gt;where logic belongs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It promotes a &lt;strong&gt;layered approach&lt;/strong&gt; and emphasizes &lt;strong&gt;reusability&lt;/strong&gt;.
Of course, ALC is more infrastructure-focused and broader than MVC, but the ideas behind them are similar enough for learning and design discussions.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  8. Does API-Led Connectivity Align with Domain-Driven Development?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Yes
&lt;/h3&gt;

&lt;p&gt;Domain-Driven Design and API-Led Connectivity go well together. DDD tells you where to split your problem space into bounded contexts and models, and ALC gives you how to expose, compose, and consume those contexts via APIs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bounded contexts as API ownership&lt;/strong&gt;. In DDD, you break your domain into bounded contexts, each with its own model, language, and rules. In API-Led Connectivity, those contexts are exposed through APIs — but there’s no strict 1:1 formula. A bounded context might be represented by a single API, or by several System, Process, and Experience APIs. The key is that APIs respect the boundaries of the context and consistently preserve its Ubiquitous Language across integrations and channels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System APIs as Anti-Corruption layers&lt;/strong&gt;. When integrating a legacy system or another bounded context, DDD says you should use an Anti-Corruption Layer to translate foreign models into your own. The same thing goes for ALC’s System APIs. They wrap around SoRs or external services, change payloads into terms of your domain, and keep your model safe from leaking external schemas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process APIs as application services&lt;/strong&gt;. Within a bounded context, your domain services bring together aggregates, enforce business rules, and manage transactions. Similarly, ALC’s Process APIs compose multiple System APIs, set up workflows, and present broader operations in your Ubiquitous Language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience APIs as facades or UI adapters&lt;/strong&gt;. DDD keeps domain logic and presentation separate. ALC’s Experience APIs serve as presentation facades that shape and filter the output of Process APIs for specific channels like websites, mobile apps, and partners. They keep UI teams safe from complicated domains and let each channel grow on its own.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By combining DDD’s strategic slicing with ALC’s three-layer architecture, you get a system that is modular, well-governed, and highly cohesive. With this approach teams can work together to build, own, and enhance APIs that work well with domain models.&lt;/p&gt;




&lt;p&gt;We’ve set the stage, but the real challenges show up when it’s time to implement.&lt;br&gt;
In &lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-ii-5f81"&gt;Part 2&lt;/a&gt; and &lt;a href="https://dev.to/shandor_sharvari/api-led-connectivity-practical-questions-answered-part-iii-6dl"&gt;Part 3&lt;/a&gt;, we’ll talk about real-world questions that teams often ask when they start using API-Led Connectivity.&lt;/p&gt;




&lt;p&gt;This article is also available on &lt;a href="https://www.linkedin.com/pulse/api-led-connectivity-practical-questions-answered-shandor-sharvari-wgh4f" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://shandor-sharvari.medium.com/1bf355e3fe56?source=friends_link&amp;amp;sk=12bfe470758c688dab77dc90f884e2f2" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>api</category>
      <category>designpatterns</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>My Proven Code Review Method for Finding Bugs Others Miss</title>
      <dc:creator>Shandor Sharvari</dc:creator>
      <pubDate>Thu, 25 Sep 2025 23:51:48 +0000</pubDate>
      <link>https://dev.to/shandor_sharvari/my-proven-code-review-method-for-finding-bugs-others-miss-47j7</link>
      <guid>https://dev.to/shandor_sharvari/my-proven-code-review-method-for-finding-bugs-others-miss-47j7</guid>
      <description>&lt;h2&gt;
  
  
  What Most Code Reviews Actually Catch
&lt;/h2&gt;

&lt;p&gt;Most code review comments focus on conventions, variable names, styling, indentation, and missing unit tests. Simple and obvious mistakes are flagged too. Less frequently, reviewers comment on project and code structure, unhandled exceptions, basic optimizations, patterns, and best practices.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Code Reviews Often Miss — And Why
&lt;/h2&gt;

&lt;p&gt;But errors in algorithms and complex business logic are rarely highlighted during code reviews, along with performance bottlenecks and missed acceptance criteria. While these are difficult to catch, some can be spotted during code reviews, though they often require advanced approaches. Every issue found early significantly reduces the cost of fixing it and speeds up delivery.&lt;/p&gt;

&lt;p&gt;So why do we usually miss these issues?&lt;/p&gt;

&lt;p&gt;I think the main reasons are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CR tools display code differently from IDEs we’re used to. Fonts, colors, and backgrounds don’t match, so our brains don’t focus in the same way.&lt;/li&gt;
&lt;li&gt;Reviewers often read the code file-by-file in the order it appears in the CR. This can hide structure, context, dependencies, and execution order.&lt;/li&gt;
&lt;li&gt;Little time is allocated for CRs. Everyone is busy with their own tasks.&lt;/li&gt;
&lt;li&gt;Static code analysis, compilation warnings, and other advanced IDE features aren’t available in CR tools.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  My Deep Review Workflow for Complex Changes
&lt;/h2&gt;

&lt;p&gt;For small changes in familiar code, this isn’t a problem. But for brand-new apps, complex business logic, or deep refactoring, reading the code in a CR tool is not enough.&lt;/p&gt;

&lt;p&gt;In those cases, I take the “hard way”:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the user story and acceptance criteria.&lt;/li&gt;
&lt;li&gt;Review the code in the CR tool to understand the scope and spot complex areas.&lt;/li&gt;
&lt;li&gt;Open the branch in my IDE and build it. Compiler warnings and static analysis suggestions are good indicators of areas to improve. For some reason, many of them are ignored during development.&lt;/li&gt;
&lt;li&gt;Review from the entry point (for example, a Web API endpoint) or from updated business logic, following the runtime flow. Check the caller code too if it’s present.&lt;/li&gt;
&lt;li&gt;Sometimes, it’s useful to open the documentation or even the third-party library code to ensure correct usage (e.g., if the thrown exceptions are handled in our code).&lt;/li&gt;
&lt;li&gt;If I suspect input or edge case issues, I run the app and test it quickly, or even debug it.&lt;/li&gt;
&lt;li&gt;Use an AI agent to analyze the code. Here I’ve shared &lt;a href="https://dev.to/shandor_sharvari/my-favorite-ai-prompts-for-code-analysis-and-optimization-336f"&gt;useful AI prompts&lt;/a&gt; for it.&lt;/li&gt;
&lt;li&gt;Check the code coverage.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach is complicated and time-consuming. It may take hours, but it’s usually worth it.&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Write Review Comments
&lt;/h2&gt;

&lt;p&gt;How I write comments matters too:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I explain my reasoning and sometimes link to docs or articles.&lt;/li&gt;
&lt;li&gt;For repeating issues, I refer to the first comment or note that the fix applies in multiple places.&lt;/li&gt;
&lt;li&gt;If I’m unsure about the code’s purpose or correctness, I ask for clarification in my comment.&lt;/li&gt;
&lt;li&gt;I suggest authors mark comments as completed or reply to them as “done” rather than resolving them immediately, so I can double-check before approving the change.
Sometimes I have a short call with the author after the review.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;And how do you approach complex code reviews? What do you focus on?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>experience</category>
      <category>productivity</category>
      <category>codequality</category>
    </item>
    <item>
      <title>My Favorite AI Prompts for Code Analysis and Optimization</title>
      <dc:creator>Shandor Sharvari</dc:creator>
      <pubDate>Sat, 20 Sep 2025 08:22:23 +0000</pubDate>
      <link>https://dev.to/shandor_sharvari/my-favorite-ai-prompts-for-code-analysis-and-optimization-336f</link>
      <guid>https://dev.to/shandor_sharvari/my-favorite-ai-prompts-for-code-analysis-and-optimization-336f</guid>
      <description>&lt;p&gt;AI agents have mastered boilerplate generation, short algorithms, and unit tests—speeding up routine and repetitive tasks.&lt;br&gt;
But I tend to focus on &lt;strong&gt;code analysis&lt;/strong&gt; and &lt;strong&gt;improvement suggestions&lt;/strong&gt;. They’re especially helpful when writing &lt;strong&gt;performance-critical code&lt;/strong&gt; or conducting intense &lt;strong&gt;code reviews&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompts I Use for Code Analysis
&lt;/h2&gt;

&lt;p&gt;I usually ask the AI agent to analyze my code for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Performance issues&lt;/li&gt;
&lt;li&gt;High memory and CPU usage&lt;/li&gt;
&lt;li&gt;Memory leaks&lt;/li&gt;
&lt;li&gt;Poor scalability&lt;/li&gt;
&lt;li&gt;Unbounded collections&lt;/li&gt;
&lt;li&gt;Connection exhaustion&lt;/li&gt;
&lt;li&gt;Unnecessary allocations&lt;/li&gt;
&lt;li&gt;Deadlocks&lt;/li&gt;
&lt;li&gt;Starvation&lt;/li&gt;
&lt;li&gt;Inefficient loops and LINQ queries&lt;/li&gt;
&lt;li&gt;Inefficient serialization/deserialization&lt;/li&gt;
&lt;li&gt;Redundant computations&lt;/li&gt;
&lt;li&gt;Blocking calls&lt;/li&gt;
&lt;li&gt;Inefficient I/O operations&lt;/li&gt;
&lt;li&gt;Improper resource disposal&lt;/li&gt;
&lt;li&gt;Parallelization overhead&lt;/li&gt;
&lt;li&gt;Inefficient exception handling&lt;/li&gt;
&lt;li&gt;Unhandled exceptions&lt;/li&gt;
&lt;li&gt;Unhandled edge cases&lt;/li&gt;
&lt;li&gt;Algorithmic overcomplexity&lt;/li&gt;
&lt;li&gt;Inefficient object lifetimes&lt;/li&gt;
&lt;li&gt;Excessive thread creation and contention&lt;/li&gt;
&lt;li&gt;Overuse of locks or synchronization primitives&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prompts I Use for Improvement Suggestions
&lt;/h2&gt;

&lt;p&gt;I also ask it to explore potential improvements such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Performance optimizations&lt;/li&gt;
&lt;li&gt;Memory usage optimizations&lt;/li&gt;
&lt;li&gt;Concurrent or parallel execution&lt;/li&gt;
&lt;li&gt;Simultaneous async calls&lt;/li&gt;
&lt;li&gt;LINQ optimization or replacement with loops&lt;/li&gt;
&lt;li&gt;Resource reuse&lt;/li&gt;
&lt;li&gt;Read-only, frozen, or concurrent collections&lt;/li&gt;
&lt;li&gt;Lazy evaluation&lt;/li&gt;
&lt;li&gt;Weak references&lt;/li&gt;
&lt;li&gt;Pooling of connections, arrays, objects, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;And what are your favorite prompts?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>performance</category>
      <category>productivity</category>
      <category>codequality</category>
    </item>
  </channel>
</rss>
