Learn

Architecture and boundaries

See where Ark MVP begins, what each role owns, and why no business framework is built into the packages.

v0.1.0-dev.1Beginner

Architecture and boundaries

Ark MVP constrains the presentation flow without prescribing how the application creates, stores, or executes business logic.

Four roles

RoleReceivesProducesOwns
Application compositionExisting business objectsModelBinding<Model>Business objects and their lifecycle
ModelCurrent business snapshots and allowed operationsOne immutable feature inputNo resources
PresenterModel and presentation environmentViewState, actions, ViewEffectPresentation-local state and resources
ViewViewState and Presenter APIRendered UI and user intentFramework rendering resources

Dependency direction

ark_mvp has no dependency on a state manager, DI container, storage package, or UI framework. ark_mvp_flutter adds only Flutter hosting. UseCase Forge can supply business state through application composition, but neither MVP package depends on it at runtime.

This preserves two valid uses:

  • a feature based on one or several UseCases;
  • a feature based on any other typed application-state boundary.

What the boundary rejects

A feature Model should not expose an HTTP client, database connection, or global container merely because composition can access them. It should expose the business information and operations the feature is allowed to use: reload(), saveDraft(), or signOut().

Likewise, View should not interpret execution phases, merge several managers, or localize raw domain values. These are Presenter responsibilities because they determine presentation meaning.

No hidden ownership

ModelBinding observes externally owned sources. PresenterSession owns one Presenter lifecycle. A Flutter MvpView owns its Presenter but never closes the UseCase or manager captured by the binding. The object that creates a resource remains responsible for closing it.

ARKTELOS

Purpose-built engineering systems for software that has to hold.