Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introducing Store API

Introducing Store API

Why do we always struggle to articulate the benefits of an API-led architecture without using tech jargon. A developer-directed refresher on API design, evident headless scenarios, and the new Shopware Store API.

Avatar for Dominic Klein

Dominic Klein

June 19, 2020

Other Decks in Programming

Transcript

  1. What comes to mind and what do we use them

    for? Data transfer Connection Integration Headless SOA Performance Decoupling Synchronisation Webhooks REST SOAP Import/Export Communication Distribution
  2. cart order login product register search /cart /order /login /product

    /register /search /sales-channel-api * / = APIfication of a piece of logic
  3. PDP vs Sales-Channel API title gallery price description crossselling items

    configurator cms page /cart /order /register /login /product /search
  4. Store API vs Sales-Channel API title gallery price description crossselling

    items configurator cms page /cart /order /register /login /product /search /title /gallery /price /description /crossselling items /configurator /cms page slightly idealised visualisation / = APIfication of a piece of logic Routes
  5. There‘s a more general pattern to it Fetch product list

    ProductListingRoute Store API Detail page Listing page
  6. What are the benefits? Generalised exposal of business logic via

    API More freedom for frontend developers Functional atomisation / coverage Reusability and testability
  7. Why is it a new API? Required Rewrites in some

    parts Not applicable to our versioning system We can keep compatibility for Sales-Channel API Be able to provide new approach and more freedom
  8. What does it mean for my code? • We‘re not

    deprecating the Sales-Channel API yet • Rename your endpoints • Expose mid-level services via Routes • Return reponse DTOs • extend Shopware\Core\System\SalesChannel\StoreApiResponse