Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New FAQ about micro frontend communication #1465

Merged
merged 6 commits into from
Jul 14, 2020
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ This video which explains the basics of micro frontend architecture and how it c

No, Luigi itself does not deliver any micro frontends. It is a framework that helps you develop micro frontends and connect them to web applications.

### I don't want to use the default Fiori Fundamentals style. How can I style Luigi differently? How can I change the look of Luigi's UI?

There are a few options to do that at the moment:
- Use the Fundamental Styles theming capabilities which already allow you to achieve a lot by customizing the CSS variables. Find more info [here](https://github.com/SAP/theming-base-content).
- Manually overwrite the styles where needed. The documentation page you are on right now can be used as an example, as it was developed with Luigi.
- Turn off Luigi view components completely via the [hideNavigation](general-settings.md) parameter in the `settings:` section of your Luigi configuration. Then you can implement your own view components for header and navigation and use the [Luigi Core API](luigi-core-api.md) to set them up with Luigi.

### Is Luigi only useful in the context of SAP or very large corporate applications?

No, Luigi can be used independently of SAP for a variety of purposes. You can find one example in [this article](https://medium.com/swlh/luigi-micro-fronteds-orchestrator-8c0eca710151) which describes how to create a small hobby project using Luigi.
Expand All @@ -43,6 +50,14 @@ No, Luigi can be used independently of SAP for a variety of purposes. You can fi

The Luigi project can be found on [GitHub](https://github.com/SAP/luigi). Depending on the UI framework you use, there are different setups for Luigi. You can find more information here: [application setup](application-setup.md).

### Does Luigi provide micro frontend to micro frontend communication?

Yes. The simplest way to configure this type of communication is unidirectional via [linkmanager.navigate](luigi-client-api.md#linkmanager) where you can send additional data to the target micro frontend via [withParams](luigi-client-api.md#withparams).

Another possibility is to call [linkmanager.navigate](luigi-client-api.md#linkmanager) with the [preserveView](luigi-client-api.md#navigate) option set to `true`. This allows you to get a "return value" from the target micro frontend if it uses the [goBack](luigi-client-api.md#goback) function. Lastly, you can use custom events to model your own communication functionality.

Of course, Luigi also allows you to communicate between the core application (Luigi Core) and the micro frontend (Luigi Client). See [custom messages](communication.md) for more info.

### The distributed development possibilities seem like a big advantage; is that just an additional benefit from using Luigi, or was that a main factor behind it?

Development scalability was one of the main goals right from the beginning. There is a nice article on [martinfowler.com](https://martinfowler.com/articles/micro-frontends.html) explaining the benefits of a micro frontend architecture in general. All the disadvantages of the iframe approach mentioned in the article are solved with Luigi.
Expand All @@ -51,13 +66,6 @@ Development scalability was one of the main goals right from the beginning. Ther

It is crucial that all micro frontends in a solution follow the same design guidelines. Luigi's default UI styling is based on [Fundamentals](https://sap.github.io/fundamental-styles/) but it can be customised. If you don’t want to use Fundamentals, but Bootstrap, Material, or something else instead, you need to re-style the Luigi view components according to your design guidelines or replace them with your own components completely.

### I don't want to use the default Fiori Fundamentals style. How can I style Luigi differently?

There are a few options to do that at the moment:
- Use the Fundamental Styles theming capabilities which already allow you to achieve a lot by customizing the CSS variables. Find more info [here](https://github.com/SAP/theming-base-content).
- Manually overwrite the styles where needed. The documentation page you are on right now can be used as an example, as it was developed with Luigi!
- Turn off Luigi view components completely via the [hideNavigation](general-settings.md) parameter in the `settings:` section of your Luigi configuration. Then you can implement your own view components for header and navigation and use the [Luigi Core API](luigi-core-api.md) to set them up with Luigi.

### Luigi claims to be ‘technology agnostic’. Are you referring to the UI framework that can be used, or to some other technology?

The main point is that you can choose any base frontend technology you prefer, such as UI5, Angular, React, or Vue. You can even mix them in one solution. One micro frontend can use UI5, while another is written in Angular and Fundamentals. The only thing that matters is that HTML/JavaScript/CSS resources are provided and served via HTTPS in the end. The fact that a micro frontend is its own web application also means that you have full freedom regarding your development toolchain and CI/CD solutions, and the web server you want to use (such as Nginx, Apache, Tomcat, or Github Pages).
Expand Down