# Ways to put a frontend together

From one app with clear modules to fully isolated iframes. Each card rates complexity, team independence and runtime performance from 1 to 5. Open one for how it works, the trade-offs and the reasoning behind every rating.

[Compare side by side](https://microfrontends.dev/compare) [Not sure? Take the check](https://microfrontends.dev/decide)

## All approaches

-   Build-time
    
    ### [Build-time packages](https://microfrontends.dev/approaches/build-time-packages)
    
    Versioned npm packages, built into one bundle.
    
    complexity 1
    
    independence 2
    
    performance 5
    
-   Runtime
    
    ### [Module Federation](https://microfrontends.dev/approaches/module-federation)
    
    Separate bundles, loaded at runtime with shared deps.
    
    complexity 4
    
    independence 4
    
    performance 3
    
-   Runtime
    
    ### [Native Federation / import maps](https://microfrontends.dev/approaches/native-federation-import-maps)
    
    Plain ES modules wired up by an import map.
    
    complexity 3
    
    independence 4
    
    performance 3
    
-   Runtime
    
    ### [single-spa](https://microfrontends.dev/approaches/single-spa)
    
    A root router that mounts apps in any framework.
    
    complexity 4
    
    independence 4
    
    performance 2
    
-   Runtime
    
    ### [Web Components](https://microfrontends.dev/approaches/web-components)
    
    Custom elements as the contract between teams.
    
    complexity 3
    
    independence 3
    
    performance 3
    
-   Runtime
    
    ### [iframes](https://microfrontends.dev/approaches/iframes)
    
    Each app in its own frame. Total isolation, full cost.
    
    complexity 2
    
    independence 5
    
    performance 1
    
-   Server
    
    ### [Server and edge composition](https://microfrontends.dev/approaches/server-and-edge-composition)
    
    HTML fragments stitched on the server or edge.
    
    complexity 4
    
    independence 4
    
    performance 4
    
-   Alternative
    
    ### [Modular monolith and monorepo](https://microfrontends.dev/approaches/alternatives)
    
    One app, one deploy, team-owned modules.
    
    complexity 2
    
    independence 2
    
    performance 5
    

Ratings 1–5 are editorial judgement for a typical team. Complexity: higher means harder to build and run. Independence and performance: higher is better.

Source: https://microfrontends.dev/approaches
