app-state-diagram

This is a sample ALPS profile demonstrating the semantic descriptors and operations for a basic e-commerce system. It includes product listing, shopping cart management, and checkout process, serving as an educational example for ALPS implementation in online shopping contexts.

Semantic
Safe
Unsafe
Idempotent
Label:
Size:
Tags:

Semantic Descriptors

Type ID Title Contained Extra Info
address address def:schema.org/address
Cart Shopping Cart id
goProductList
goCheckout
doUpdateQuantity
doRemoveItem
def:schema.org/Carttag:collection
Checkout Checkout email
address
goPayment
description description def:schema.org/description
doAddToCart Add product to cart id
quantity
rt:#Cart
doPayment Complete payment rt:#ProductList
doRemoveItem Remove item from cart id rt:#Cart
doUpdateQuantity Update item quantity id
quantity
rt:#Cart
email email def:schema.org/email
goCart View shopping cart rt:#Cart
goCheckout Proceed to checkout rt:#Checkout
goPayment Proceed to payment rt:#Payment
goProductDetail View product details id rt:#ProductDetail
goProductList View product list id rt:#ProductList
id identifier def:schema.org/identifier
name name def:schema.org/name
Payment Payment doPayment def:schema.org/PayAction
price price def:schema.org/price
ProductDetail Product Detail id
name
description
price
goProductList
doAddToCart
def:schema.org/Producttag:item
ProductList Product List id
name
description
goProductDetail
goCart
goProductList
def:schema.org/ItemListtag:collection
quantity quantity def:schema.org/Quantity
<?xml version="1.0" encoding="UTF-8"?> <!-- Welcome to Alps Editor! Let's make API design fun and effective. Quick tips: - Press Ctrl + Space to show snippets for auto-completion (suggested terms are from Schema.org) - To start from scratch, delete all content and press Ctrl + Space, then select "Skeleton" (For JSON format, type "{" first) - Drag and drop an ALPS file (JSON, XML, or HTML) into the editor to open it (For HTML files, the ALPS profile contained within will be extracted) - Hit Ctrl + S to download your work anytime ALPS bridges vision and implementation, creating APIs that speak business and tech fluently. Learn more about ALPS: - Official ALPS website: http://alps.io/ - ALPS-ASD page: https://alps-asd.github.io/ Happy modeling! Remember, solid semantics supports the long-term evolution of your APIs. :) --> <alps xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://alps-io.github.io/schemas/alps.xsd"> <title>app-state-diagram</title> <doc>This is a sample ALPS profile demonstrating the semantic descriptors and operations for a basic e-commerce system. It includes product listing, shopping cart management, and checkout process, serving as an educational example for ALPS implementation in online shopping contexts.</doc> <!-- Ontology --> <descriptor id="id" def="https://schema.org/identifier" title="identifier"/> <descriptor id="name" def="https://schema.org/name" title="name"/> <descriptor id="description" def="https://schema.org/description" title="description"/> <descriptor id="price" def="https://schema.org/price" title="price"/> <descriptor id="quantity" def="https://schema.org/Quantity" title="quantity"/> <descriptor id="email" def="https://schema.org/email" title="email"/> <descriptor id="address" def="https://schema.org/address" title="address"/> <!-- Taxonomy --> <descriptor id="ProductList" def="https://schema.org/ItemList" title="Product List" tag="collection"> <descriptor href="#id"/> <descriptor href="#name"/> <descriptor href="#description"/> <descriptor href="#goProductDetail"/> <descriptor href="#goCart"/> <descriptor href="#goProductList"/> </descriptor> <descriptor id="ProductDetail" def="https://schema.org/Product" title="Product Detail" tag="item"> <descriptor href="#id"/> <descriptor href="#name"/> <descriptor href="#description"/> <descriptor href="#price"/> <descriptor href="#goProductList"/> <descriptor href="#doAddToCart"/> </descriptor> <descriptor id="Cart" def="https://schema.org/Cart" title="Shopping Cart" tag="collection"> <descriptor href="#id"/> <descriptor href="#goProductList"/> <descriptor href="#goCheckout"/> <descriptor href="#doUpdateQuantity"/> <descriptor href="#doRemoveItem"/> </descriptor> <descriptor id="Checkout" title="Checkout"> <descriptor href="#email"/> <descriptor href="#address"/> <descriptor href="#goPayment"/> </descriptor> <descriptor id="Payment" def="https://schema.org/PayAction" title="Payment"> <descriptor href="#doPayment"/> </descriptor> <!-- Choreography --> <descriptor id="goProductList" type="safe" rt="#ProductList" title="View product list"> <descriptor href="#id"/> </descriptor> <descriptor id="goProductDetail" type="safe" rt="#ProductDetail" title="View product details"> <descriptor href="#id"/> </descriptor> <descriptor id="goCart" type="safe" rt="#Cart" title="View shopping cart"/> <descriptor id="goCheckout" type="safe" rt="#Checkout" title="Proceed to checkout"/> <descriptor id="goPayment" type="safe" rt="#Payment" title="Proceed to payment"/> <descriptor id="doAddToCart" type="unsafe" rt="#Cart" title="Add product to cart"> <descriptor href="#id"/> <descriptor href="#quantity"/> </descriptor> <descriptor id="doUpdateQuantity" type="idempotent" rt="#Cart" title="Update item quantity"> <descriptor href="#id"/> <descriptor href="#quantity"/> </descriptor> <descriptor id="doRemoveItem" type="idempotent" rt="#Cart" title="Remove item from cart"> <descriptor href="#id"/> </descriptor> <descriptor id="doPayment" type="idempotent" rt="#ProductList" title="Complete payment"/> </alps>