{ "$schema": "https://context7.com/schema/context7.json", "url": "https://context7.com/marionettejs/marionette", "public_key": "pk_dDwor65yx2DOyaFDDOmVU", "projectTitle": "Marionette JavaScript — v5", "description": "Marionette v5 (npm: marionette) provides Views, Regions, CollectionViews and Applications. Core requires neither Backbone nor jQuery; optional adapters integrate Backbone Models and Collections.", "branch": "master", "previousVersions": [ { "tag": "v5.1.0" }, { "tag": "v5.0.1" }, { "tag": "v5.0.0" }, { "tag": "v5.0.0-rc.2" } ], "folders": [ "docs" ], "excludeFiles": [ "AGENTS.md", "CONTRIBUTING.md", "SECURITY.md", "changelog.md", "license.txt" ], "rules": [ "Check the installed package first: marionette is v5; backbone.marionette is legacy. Match docs to that version and its release tag; master may differ. V5 core requires neither Backbone nor jQuery; Backbone Models and Collections use optional adapters.", "Inspect the existing project and follow its compatible renderer, data runtime, router, build setup, and architecture. With no stack chosen, use the documented Vite setup with `@mnjs/html`; add @mnjs/data when observation or shared state is needed. Plain snapshots remain valid. After the first render, continue with the whole-application route in docs/agents.md.", "For an application, page, or composed feature, start with the compact installed-app skeleton in docs/guides/composition.md; follow its focused architecture, data, bindings, lists and routing references as needed. Use docs/agents.md for other task and API routes.", "Keep local interaction and model edits in their View. Choose ownership by the work's lifetime; async alone does not require Application. Register child Applications for ownership; start them explicitly. Regions own child UI. Await start and restart; stop and destroy are synchronous.", "Choose Application for coordinated readiness before activation, start/stop lifetime, restart, cancellation of obsolete startup, or orchestration across Views. For example, prepare required records before displaying a list/detail feature, then own its readiness, restart and lifetime. Return prepared data from prepareStart; apply the current successful result synchronously in onStart and construct retained UI once. A host router plus Region can own simple replacement. See docs/architecture.md for cancellation and ongoing-operation boundaries.", "Prefer optional @mnjs/data for observable Models and Collections when suitable. It is incomplete as an application data layer: fetching and persistence require an API layer or another provider; it has no Model.save().", "Shared API names do not guarantee shared behavior: verify v5 contracts. Keep v4 contracts for installed backbone.marionette 4.x; for upgrades read docs/guides/migration.md.", "For routing, read docs/guides/routing.md. For new routed applications, consider optional @mnjs/router with feature-owned RouteApplication declarations; check its independent browser/Node requirements first. Preserve an existing host router. The router owns URLs and route dispatch, Applications own readiness and lifetime, and Views/Regions own displayed UI.", "Default to Views/Regions and CollectionView child Views for data-driven lists; this is a design recommendation, not a core API requirement. Simple/static owning templates remain valid. Native delegation can handle inserted descendants, but insertion creates no child View lifetime. Keep managed replacement under its renderer/Regions; native HTML template output is supported. Prefer View events/triggers/ui. docs/architecture.md covers scoped integrations, exceptions and cleanup.", "Use public package exports. Verify the task's affected behavior against the installed artifact, including replacement, cancellation or teardown when relevant." ] }