Skip to content

Reusable frontend architecture proposal ​

Features ​

We build features, not pages or apps. A feature is a self-contained piece of customer-facing functionality, owned by one team. The idea is build once, reuse often: you build a feature a single time, and it gets reused across channels instead of being rebuilt for each place it needs to appear.

A feature can be realised in multiple ways ​

Depending on where a feature needs to show up, it can be realised as:

RealisationWhat it isWhere it's used
Web applicationSelf-contained app with its own pageVisited directly, e.g. on ns.nl
WidgetEmbedded into another team's web page. See the widget documentation section for more detailsInside a host application's web page
WebviewThe web implementation shown inside the native appIn the NS app, via a web view
Native pluginFully native implementationIn the NS app, only when web can't do it

Frontpack helps teams build to multiple targets from a single feature codebase, so you write the feature once and ship it to every place it needs to run.

Still unsure which realisation fits your feature? Reach out to us.

Sharing components between teams/features ​

Besides sharing features, it's also important to share components between teams and features. Understanding the key differences between sharing features and sharing components matters:

ConceptWhat it isExampleIntegrationOwner release cycle
FeatureThe reusable unit of functionalityJourney plannerRun-timeFeature team
Shared componentReusable component via NexusGeneric form componentsBuild-timeConsuming team

Widgets are integrated at runtime and remain owned and deployed by the feature team, so updating a widget updates every host that uses it without the host redeploying.