Product catalog and journal: where reuse must end

A boundary map for articles and product offers: owners, invariants, lifecycles and counterexamples for categories, media, prices and stock.

A paper metaphor for different product policies sharing technical mechanics.

A journal and a product catalog can easily appear to share the same fields: a title, description, category, photograph and visibility flag. This invites a shared Content entity with price and stock added as fields that remain empty for articles. The forms will indeed look similar. Yet the model still does not answer the central question: which changes does it permit, and who owns them?

A more useful comparison starts with two concrete promises. A journal gives readers a particular revision of an article. A product offer states the terms under which a particular product can be acquired. Both may have images, but correcting a paragraph and changing a price have different causes, consequences and owners. Reuse begins where responsibility matches and ends where one command represents different decisions.

The following conceptual map uses fictional entities. It records decisions to extract shared mechanics, retain separate rules and reject unsafe generalizations. It is a contract exercise rather than an executed store: there are no orders, reservations or payment integrations here.

Two entities and two clocks

Consider an article called “How to store pears” and an offer for “A crate of pears, 5 kg.” Their connection is clear to a reader, but it does not make them one object. The article has a body, a revision and a publication decision. The offer refers to a product and has its own commercial terms. One product might eventually have several offers; that requirement needs separate confirmation.

In the synthetic example, the editor publishes revision 3 at time 10. At time 12, the editor corrects an explanation and prepares revision 4. Independently, the offer owner sets a price of 240 UAH per crate starting at time 15. These numbers express a logical sequence, not a calendar schedule. In this exercise, an effective interval includes its start and excludes its end.

Replacing both times with a single updatedAt loses information. A price update must not make revision 4 public. A correction to the article must not move the offer's effective start. A shared time value type or technical clock is possible; a shared “publish everything” command is rejected here.

The public vocabulary also distinguishes these roles: Schema.org Article describes an article and its editorial properties, while Offer describes an offer to transfer rights to an item or provide a service. This helps establish terminology, but external markup does not determine an application's internal architecture.

Start the map with invariants

An invariant is a condition that an allowed operation must preserve. For the article in this exercise, the public body corresponds to the selected published revision. For the offer, an amount has meaning together with its currency, sale unit and effective interval. Sharing a field called title says nothing about these conditions.

Area Decision owner and invariant Reuse decision
Revision and effective price The editorial owner selects the public body; the offer owner selects effective commercial terms Keep operations and lifecycles separate
Section and classification The journal defines a reading path; the catalog defines permitted groupings and filters Neutral hierarchy mechanics may be shared; policies remain separate
Media reference Media mechanics identify the source; products determine a photo's role and suitability Separate the technical mechanism from selection policy
Visibility and purchase eligibility The editor controls publication; the offer owner determines eligibility Reject one universal status
Stock observation The inventory source owns the known snapshot; a future reservation process owns a separate action Keep observation separate; reservation lies outside this map

Every decision needs an example capable of disproving it. Otherwise, the table merely renames future classes. For the first row, that example is a price change while the article stays unchanged: if it triggers publication of the body, the boundary is wrong.

A category does not guarantee the same selection

In the journal, a “Garden” section helps readers find related articles. An editor may place an article in a collection because it explains a seasonal subject. In the catalog, a “Fruit” group might connect to filters for variety, package weight and available collection method. These are assumptions for the example, not universal requirements for every store.

The reuse candidate is narrow: neutral hierarchy validation, node identity, parent relationships and stable ordering. Its technical owner does not decide whether a product qualifies for a filtered result. The hierarchy lifecycle covers creating, moving and removing nodes; article membership and offer classification remain decisions of their respective products.

The counterexample is an editor moving the article from “Garden” to “Advice”: this must not change the pear crate's permitted filters. Similarly, renaming a commercial group must not silently change the editorial menu. A shared tree utility is worth considering only if separate catalogs retain their own identity scopes and selection policies.

A practical extraction check is simple: can a commercial filter be added without editing an editorial rule? If not, the general service already knows too much. This does not mean every product needs its own tree traversal algorithm; it means the algorithm must not replace policy.

A photograph can be shared while its role stays separate

Both entities refer to a photograph of a pear. A technical mechanism can accept a specific source and transformation parameters, create a derivative or report unavailability. Its invariant is that the result comes from the intended source using the specified parameters. Media mechanics own the lifecycle of the original and its derivatives.

The editor instead decides whether the photograph conveys the article's intent. The catalog owner decides whether it represents the product and its particular packaging. In this exercise, the primary photo must show the crate, while the cover can show a single pear. These are different suitability policies even when both images are technically sound.

The decision therefore has two parts: consider shared image transformation, but retain separate cover and primary-photo assignment. The counterexample is an editor replacing a cover with an artistic illustration. If the catalog then automatically uses that illustration as its packaging image, reuse has crossed the responsibility boundary.

A file reference also does not grant unconditional permission to delete the file. Another article may still need the same photograph. Concrete ownership, removal and display-permission policies must be agreed before implementation. The map does not propose a universal cascade that removes product images along with an article.

A visible page does not establish purchase eligibility

In our journal, a published article is available to read and a withdrawn article is not. A catalog may deliberately keep a product page visible after an offer expires: it explains the properties and reports that no offer is available. A particular product may choose a different policy, so that choice needs to be explicit.

Here, the editorial owner controls transitions from prepared to published to withdrawn. The offer owner controls the effectiveness of terms and purchase eligibility. The map's invariant is that page visibility does not authorize a commercial action. These lifecycles can meet in a presentation without becoming identical.

A universal active/inactive enum conceals the distinction. Adding cancelled and reusing it for orders is even more dangerous. The counterexample: an unavailable offer is not a cancelled order, and a withdrawn article is not a product with no stock. A shared badge color does not justify a shared state machine.

For the same reason, an article having no price does not make it a zero-price product. “Not applicable,” “unknown” and “equal to zero” have different meanings. A nullable price field on a shared entity cannot establish which meaning is permitted. The rule must belong to the operation type and its owner.

A stock snapshot does not reserve inventory

Suppose a source reports that two crates are known at time 20. In the map, this is an observation with a defined unit, scope and observation time. Its owner is responsible for the snapshot's meaning. A later observation can change the value independently of the article body, photograph or price.

Two visitors can see the same number. Reading it does not allocate a crate to either visitor. The counterexample to the generalization is that reading stock 2 twice does not prove that two future purchases will be accepted. That requires different concurrency, reservation and confirmation rules, which this exercise does not define.

The observation therefore remains a separate fact, and treating it as a guarantee is rejected. We are not designing a cart, order, payment or payment-result reconciliation here. Even a teaching “Buy” button without those rules would not demonstrate a complete commercial process.

Deciding what to extract

The comparison leaves two narrow candidates: neutral category mechanics and specified media transformations. They are candidates, not instructions to create a library immediately. Each still needs matching inputs, results, errors and compatibility rules. If one product needs a different lifecycle, narrow the contract or keep implementations separate.

Before making a change, record the owner, invariant, permitted transitions, “share / keep separate / reject” decision and counterexample. Then walk through independent changes: a new revision, new price, section move, photo replacement, offer expiry and a new inventory snapshot. Each should affect exactly the decisions owned by its domain.

The outcome is a responsibility map suitable for discussing a future implementation. It does not measure savings or establish commercial readiness. It does provide a concrete reason to stop generalizing: if explaining a price change requires explaining article publication, the shared contract already covers two different promises.

  1. Architecture When a shared capability is ready to leave the project
  2. Architecture Configuration or a new implementation: when to stop adding settings
  3. Article Engineering One gallery in several articles: order, captions and permission to reuse
  4. Products An order as a process: status, reservation and external payment in a teaching model