Model-Driven Single Page Application
Single Page Applications using the JavaScript SPA SDK for AEM are model-driven:
-
Front-end components register themselves to the Component Mapping Store.
-
Then the Container, once provided with a model by the Model Provider, iterates over its model content (
:items). -
If there is a page, its children (
:children) first get a component class from the Component Mapping and then instantiate it.
App Initialization
Each component is extended with the capabilities of the ModelProvider. Initialization therefore takes the following general form:
-
Each model provider initializes itself and listens for changes made to the piece of model that corresponds to its inner component.
-
The
PageModelManagermust be initialized as represented by the initialization flow. -
Once stored, the page model manager returns the complete model of the app.
-
This model is then passed to the front-end root Container component of the application.
-
Pieces of the model are finally propagated to each individual child component.
Was this content helpful?
Announcements
Get hands-on with agentic AI.
Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.
Find an event