Top Related Projects
The router for easy microfrontends
Implementation examples of module federation , by the creators of module federation
π¦ π Blazing fast, simple and complete solution for micro frontends.
Quick Overview
The neuland/micro-frontends repository is a curated list of resources, articles, and tools related to micro-frontends. It serves as a comprehensive guide for developers interested in implementing micro-frontend architecture, providing links to various resources and examples across different technologies and frameworks.
Pros
- Offers a wide range of resources on micro-frontends, catering to different skill levels and technologies
- Regularly updated with new content and community contributions
- Provides links to both theoretical concepts and practical implementations
- Includes resources for various frameworks and integration approaches
Cons
- Not a code library or tool itself, but rather a collection of links
- May require additional research to find the most suitable approach for specific use cases
- Some linked resources may become outdated over time
- Lacks a standardized approach or best practices, as it covers multiple implementation methods
Note: As this is not a code library, the code examples and getting started instructions sections have been omitted as per the request.
Competitor Comparisons
The router for easy microfrontends
Pros of single-spa
- More comprehensive framework with built-in lifecycle management
- Supports multiple frontend frameworks (React, Angular, Vue, etc.)
- Active development and larger community support
Cons of single-spa
- Steeper learning curve due to its complexity
- Requires more configuration and setup
- May introduce additional overhead for smaller applications
Code Comparison
micro-frontends:
<script src="https://unpkg.com/zone.js"></script>
<script src="https://unpkg.com/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<link rel="import" href="/components/app-container.html">
single-spa:
import { registerApplication, start } from 'single-spa';
registerApplication(
'app1',
() => import('./app1/app1.js'),
(location) => location.pathname.startsWith('/app1')
);
start();
Key Differences
- micro-frontends focuses on Web Components, while single-spa is framework-agnostic
- single-spa provides more advanced routing and lifecycle management
- micro-frontends has a simpler setup process, ideal for smaller projects
- single-spa offers better support for large-scale applications with multiple frameworks
Use Cases
- Choose micro-frontends for simpler projects or when focusing on Web Components
- Opt for single-spa in complex, large-scale applications with multiple frameworks or when requiring advanced routing and lifecycle management
Implementation examples of module federation , by the creators of module federation
Pros of module-federation-examples
- Extensive collection of examples showcasing various Module Federation use cases
- Demonstrates integration with popular frameworks like React, Vue, and Angular
- Provides real-world scenarios and best practices for implementing micro-frontends
Cons of module-federation-examples
- Focuses primarily on Webpack 5's Module Federation, limiting applicability to other approaches
- May be overwhelming for beginners due to the large number of examples
- Requires a deeper understanding of Webpack and module bundling concepts
Code Comparison
micro-frontends:
<script src="https://team-green.example.com/bundle.js"></script>
<script src="https://team-blue.example.com/bundle.js"></script>
<green-recos></green-recos>
<blue-basket></blue-basket>
module-federation-examples:
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin");
module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
remotes: { app2: "app2@http://localhost:3002/remoteEntry.js" },
}),
],
};
Summary
micro-frontends provides a simpler, framework-agnostic approach to micro-frontends, suitable for teams new to the concept. module-federation-examples offers a more advanced, Webpack-specific implementation with extensive examples, better suited for teams already familiar with module bundling and seeking to leverage Module Federation's capabilities.
π¦ π Blazing fast, simple and complete solution for micro frontends.
Pros of qiankun
- More comprehensive and feature-rich, offering a complete micro-frontend solution
- Better documentation and community support
- Provides built-in support for multiple frameworks (React, Vue, Angular)
Cons of qiankun
- Steeper learning curve due to its complexity
- Potentially heavier performance impact on applications
- More opinionated, which may limit flexibility in some scenarios
Code Comparison
micro-frontends:
<script src="https://micro-frontends.org/0.1.2/micro-frontends.min.js"></script>
<micro-frontends>
<fragment src="https://example.com/header"></fragment>
<fragment src="https://example.com/content"></fragment>
</micro-frontends>
qiankun:
import { registerMicroApps, start } from 'qiankun';
registerMicroApps([
{ name: 'app1', entry: '//localhost:8080', container: '#container', activeRule: '/app1' },
{ name: 'app2', entry: '//localhost:8081', container: '#container', activeRule: '/app2' },
]);
start();
The micro-frontends approach focuses on simplicity and uses a declarative HTML-based syntax for composing micro-frontends. In contrast, qiankun employs a more programmatic JavaScript-based approach, offering greater control and flexibility in registering and managing micro-applications.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Micro Frontends
Extending the Microservice Paradigms to Web Development
The actual site can be found at micro-frontends.org.
Author
Michael Geers @naltatis
Contribute
The site is hosted via Github Pages (see index.md
).
So feel free to contribute by submitting issues or pull requests.
License
The MIT License
Copyright (C) 2017-2023 neuland BΓΒΌro fΓΒΌr Informatik, Bremen, Germany
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Top Related Projects
The router for easy microfrontends
Implementation examples of module federation , by the creators of module federation
π¦ π Blazing fast, simple and complete solution for micro frontends.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot