Patterns for Business-to-consumer E-Commerce Applications
E-commerce is one of the most important web applications. We present here a set of patterns that describe shopping carts, products, catalogue, customer accounts, shipping, and invoices. We combine them in the form of composite patterns, which in turn make up a domain model for business-to-consumer e-commerce. We also indicate how to add security constraints to this model. This domain model can be used as a computation-independent model from which specific applications can be produced using a model-driven architecture approach.
💡 Research Summary
The paper “Patterns for Business‑to‑Consumer E‑Commerce Applications” presents a systematic, pattern‑based approach to constructing a Computation‑Independent Model (CIM) for B2C e‑commerce systems, with the ultimate goal of supporting Model‑Driven Architecture (MDA) and automated code generation. The authors first review the concept of Semantic Analysis Patterns (SAPs) and argue that they are well suited to capture domain semantics, but that existing work lacks a cohesive, security‑aware domain model for e‑commerce.
Five core SAPs are identified, each described in detail with class diagrams, sequence diagrams, and activity diagrams:
-
Catalog Pattern – Models the product catalogue. The central
Productclass holds basic attributes (name, price, status). Detailed specifications are encapsulated inProductInfo. A self‑association (isSimilarTo) captures similarity relationships, enabling recommendation features. Change notification is realized through aProductObserverthat follows the classic Observer pattern, sendingNotificationobjects (e‑mail) to subscribed customers. The pattern also supports status flags for new products, price changes, and inventory updates. -
Shopping Cart Pattern – Represents the shopping experience.
ShoppingCartaggregatesCartItemobjects, each linking aProductwith a quantity and unit price. TheCustomerclass (and its associatedCustomerProfile) stores authentication data, address, and payment information. When the user checks out, anOrderand anInvoiceare automatically generated. The pattern includes aMemberconcept for loyalty programs, allowing discount coupons or special offers. The authors note that the pattern does not embed validation of credit‑card numbers or address correctness, leaving those concerns to later layers. -
Invoice Pattern – Formalizes invoice creation, validation, and payment.
InvoiceCreatordefines the interface for building an invoice, whileInvoiceValidatorchecks compliance against a set ofValidationRuleobjects and aBillingPolicy. ThePaymentclass models the actual monetary transaction, andPaymentValidatorenforces payment‑specific rules. Auditability is achieved by recording theEmployeewho validates the invoice or payment and theCustomerwho initiates the payment. The pattern is illustrated with a sequence diagram for the full life‑cycle (create → prepare → validate → pay) and an activity diagram that clarifies decision points. -
Order and Shipment Pattern – Connects an
Orderto its physical fulfillment. AnOrdercontains multipleLineItemobjects, each referencing a product type, quantity, and price. TheShipmentclass is linked to anOrderwith a 1‑to‑0..1 multiplicity, reflecting that an order may be cancelled before shipment. The model also allows substitution of ordered items with equivalent products, and it captures the possibility that the receiver of a shipment may differ from the original orderer. AnInvoiceis associated with each shipment, ensuring that billing follows delivery. Sequence and activity diagrams demonstrate the ordering, assembly, shipping, and receipt processes. -
Stock Manager Pattern – Handles inventory tracking across locations.
StockItemrecords the product, quantity, and storageLocation.StockManagerupdates quantities in response to manufacturing, sales, returns, or loss events. The pattern is deliberately generic so it can be applied to manufacturing, retail, or even library contexts.
After presenting each pattern in isolation, the authors integrate them into a Composite Domain Model for B2C e‑commerce (Section 7). The composite model shows how a customer navigates from the catalog, adds items to a cart, checks out to create an order, receives an invoice, and finally gets the product shipped while the stock manager updates inventory. The model respects the “traceability” principle: every high‑level business concept (product, order, shipment, invoice, stock) is represented by a concrete class, and relationships among them are explicitly modeled.
A notable contribution is the Security Extension (Section 8). The authors demonstrate how to embed security constraints directly into the pattern structures rather than as an after‑thought. For example:
ProductObserverandNotificationare equipped with access‑control lists (ACLs) so that only authorized customers receive change notifications.InvoiceCreatorandPaymentValidatorrequire authentication tokens and role‑based authorizations before they can be invoked, enforcing separation of duties.- Critical data exchanges between
OrderandShipmentare protected by digital signatures and hash verification to guarantee integrity and non‑repudiation.
These security augmentations illustrate a systematic way to weave authentication, authorization, and integrity checks into the domain model, thereby supporting secure code generation downstream.
The Related Work section (Section 9) surveys prior efforts on analysis patterns, stable analysis patterns, and their integration with MDA. The authors argue that while earlier studies have identified reusable patterns, none have presented a full‑fledged, security‑aware e‑commerce domain model ready for CIM‑to‑Platform Specific Model (PSM) transformation.
In the Conclusion (Section 10), the authors summarize the benefits of their approach: reusable, well‑documented patterns reduce design time; the composite model provides a clear, traceable blueprint for MDA pipelines; and the security extensions demonstrate that non‑functional requirements can be captured at the model level. Future work includes building tool support for automatic generation of Java/EJB or .NET code from the CIM, and extending the security framework to support policy‑driven, runtime enforcement.
Overall, the paper offers a comprehensive, pattern‑driven methodology for constructing a robust, extensible, and secure B2C e‑commerce domain model, positioning it as a valuable reference for both researchers interested in model‑centric software engineering and practitioners seeking a reusable architectural foundation for online retail systems.
Comments & Academic Discussion
Loading comments...
Leave a Comment